Subject: [xsl] XPath Problem. From: Sandeep_Karandikar@xxxxxxxx Date: Wed, 8 Jan 2003 13:51:20 -0600 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Stupid beginner question:, Wendell Piez | Thread | Re: [xsl] XPath Problem., Wendell Piez |
Re: [xsl] Stupid beginner question:, Wendell Piez | Date | [xsl] Announce: Upcoming XSLT and X, G. Ken Holman |
Month |