|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XPath Problem.
Hello All,
I have a wierd problem parsing the following XML data.
<RootNode>
<DInfo name="D1">
<TInfo name="t1"></T1>
<TInfo name="t2"></T2>
</DInfo>
<DInfo name="D2">
<DInfo name="D3">
<TInfo name="t1"></T1>
<TInfo name="t2"></T2>
</DInfo>
<DInfo name="D4">
<DInfo name="D5">
<TInfo name="t3"></T1>
<TInfo name="t4"></T2>
</DInfo>
<DInfo name="D6">
<TInfo name="t3"></T1>
<TInfo name="t4"></T2>
</DInfo>
</DInfo>
</DInfo>
</RootNode>
Required Output:-
<xsl:key name="TInfo-Key-By-Name" match="TInfo" use="@name"/>
<xsl:for-each
select="TInfo[count(.|key('TInfo-Key-By-Name',@name)[1]) = 1]">
<xsl:call-template name="ShowTInfo">
</xsl:for-each>
1. So when I have the RootNode Selected this works correctly and displays me
t1, t2, t3 , t4 only once.
2. When I am on <DInfo name="D2"> I need to display t1, t2, t3, t4. However
only t3 and t4 get displayed since it thinks that t1 and t2 have already
been displayed.
Not sure what I am missing here...!
Thanks
Sandeep.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








