Hi,
I am new to XSLT, so this question may have been answered other times. I've searched but I did not found anything :(
I need to parse an XML like this
<ns1:tagName1>
<ns2:tagName2>
This is the content
</ns2:tagName2>
</ns1:tagName1>
And I using this XSL for that
<xsl:template match="ns1:tagName1">
<resultns1>
<xsl:if test="ns2:tagName2">
<resultns2>
<xsl:value-of select=".">
</resultns2>
</xsl:if>
</resultns1>
</xsl:template>
The result that I expect is
<resultns1>
<resultns2>
This is the content
</resultns2>
</resultns1>
but instead of it, all that I get is
<resultns1/>
If both tags use the same namespace, all works as expected, but if the outer tag is in ns1 and the inner one is in ns2, then the inner one is not detected. Any clues on why this is happening ?
Thanks !