If I have this xml:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope>
<m:RgWsPublicFirmActRtUser>
<m:firmActDescr>ΑΛΛΟ ΛΙΑΝΙΚΟ ΕΜΠΟΡΙΟ ΣΕ ΜΗ ΕΞΕΙΔΙΚΕΥΜΕΝΑ ΚΑΤΑΣΤΗΜΑΤΑ</m:firmActDescr>
<m:firmActKind>2</m:firmActKind>
<m:firmActKindDescr>ΔΕΥΤΕΡΕΥΟΥΣΑ</m:firmActKindDescr>
<m:firmActCode>47191000</m:firmActCode>
</m:RgWsPublicFirmActRtUser>
<m:RgWsPublicFirmActRtUser>
<m:firmActDescr>ΛΙΑΝΙΚΟ ΕΜΠΟΡΙΟ ΕΙΔΩΝ ΔΩΡΩΝ ΓΕΝΙΚΑ</m:firmActDescr>
<m:firmActKind>2</m:firmActKind>
<m:firmActKindDescr>ΔΕΥΤΕΡΕΥΟΥΣΑ</m:firmActKindDescr>
<m:firmActCode>47191008</m:firmActCode>
</m:RgWsPublicFirmActRtUser>
</env:Envelope>
And I use this XSLT:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h3>Δραστηριότητες</h3>
<table border="1">
<tr bgcolor="#9acd32">
<th style="text-align:left">Δραστηριότητα</th>
<th style="text-align:left">Αριθμός δραστηριότητας</th>
<th style="text-align:left">Περιγραφή δραστηριότητας</th>
<th style="text-align:left">Κωδικός δραστηριότητας</th>
</tr>
<xsl:for-each select="Envelope/RgWsPublicFirmActRtUser">
<tr>
<td><xsl:value-of select="firmActDescr"/></td>
<td><xsl:value-of select="firmActKind"/></td>
<td><xsl:value-of select="firmActKindDescr"/></td>
<td><xsl:value-of select="firmActCode"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
All works fine, but when I have a namespace in the input XML:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://gr/gsis/rgwspublic/RgWsPublic.wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Instead of no namespaces:
<env:Envelope>
The XSLT won't work
My problem is that the XML is received from a 3rd party and I can't control the content. I need to process it as it is. Maybe I can replace the big env:Envelope and the small env:Envelope within an inside server process, but is there anyway I can make the XSLT work without changing the XML?