This may be a very simple question, but I seem to be unable to get it, and I will tear my hair apart. 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 I'm 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 that will be displayed when I use xmlns=urn:rnb.fulfilment.bus.contracts.public.exampleBookName.v1 in the XML feed, when I delete xmlns , the name is displayed normally.
Is there any syntax that I am missing? I tried adding a 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 XSLT in the XPath expression:
<xsl:value-of select="Name"/>
But that will not work either. Can anyone help? Thanks in advance.
source share