This may be a really simple question, but its one I can't seem to get and am tearing my hair out over. I have the following XML:
<?xml-stylesheet type="text/xsl" href="email.xsl"?>
<Example xmlns="">
<Name xmlns="urn:rnb.fulfilment.bus.contracts.public.exampleBookName.v1">Mark</Name>
</Example>
And am trying to use the following XSLT:
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:template match="/">
<html>
<body>
<table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<p>AUTOMATED CONFIRMATION: This confirmation email is unable to take replies. For further assistance please visit our Help pages or Contact us</p>
<p>Dear <xsl:value-of select="Name"/>,</p>
<p>Thank you for blah blah... </p>
</td>
</tr>
</table>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
I cannot get the Name to appear when I am using the xmlns=urn:rnb.fulfilment.bus.contracts.public.exampleBookName.v1
in the XML feed, when I remove the xmlns
, the name displays fine.
Is there some syntax I'm missing? I've tried adding the namespace to the <xsl:stylesheet>
element:
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rpg="urn:rnb.fulfilment.bus.contracts.public.exampleBookName.v1"
>
Then using the prefix I gave to the XSLT in the XPath expression:
<xsl:value-of select="Name"/>
But this doesn't work either. Can anyone help? Thanks in advance.