Thanks to this board for assistance with a prior related post.
Apologies for what I am sure are the most basic questions regarding XML. I am a newbie for XML.
My XSL works properly if I remove all the attributes from the DataContext node at the top of the tree.
The minute I add them back into the node, my XSL stops displaying values in the output.
Through a bit of research I see the xmlns is actually a reserved attribute. I have done a bit of reading but still don't quite understand why it is having this result.
Here is my XSL:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>My Text XSL</h2>
<table border="1">
<tr>
<th>attr9</th>
</tr>
<xsl:for-each select="/DCXT/ATRs/ATR">
<tr>
<td><xsl:value-of select="@attr9"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Here is my XML with the names changed to protect the innocent.
Specific issue is in the topmost node, the DCXT node.
(carriage returns put in for your convenience, they do not exist in the actual xml
<DCXT xmlns="http://www.xxxx.c0m" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" contactPerson="xxxx" ourId="xxxx" version="xxxx" dbPrefix="xxx"
xsi:schemaLocation="http://www.xxx.c0m/a/b/yyyy-dd filename_aa.bb.cc.xsd">
<Desc>Text description</Desc>
<dbc>
<drv>text for drv</drv>
<prm/>
<hsNode>text for hsNode</hsNode>
<ptNode>text for ptNode</ptNode>
<sName>text for sname</sName>
<prd/>
</dbc>
<DSPs attr4="aaaa" attr5="1" attr3="bbb">
<dsp attr6="1" attr7="true" attr8="1">
<Desc>text for desc</Desc>
</dsp>
<!--... multiple 'Dsp' nodes defined defined ...-->
</DSPs>
<ATRs>
<ATR attr9="true" attr10="text for attr">
<FRs>
<FR attr11="xxx" attr12="text for attr">
<MPs>
<MP attr13="xxx" attr14="yyyy"/>
<!-- .... multiple MP nodes defined -->
</MPs>
</FR>
<!--... multiple FR nodes defined ...-->
</FRs>
<DPY>
<RDFs>
<SOF attr15="xxx" attr16="0"/>
</RDFs>
<BFRs>
<sof attr17="xxx" attr18="0"/>
</BFRs>
</DPY>
</ATR>
<!-- multiple ATR nodes defined -->
</ATRs>
<!-- more nodes defined at this level but removing for brevity-->
</DCXT>