Subject: [xsl] gettin value of a node From: "Earl Spencer" <eapencer74@xxxxxxxxxxx> Date: Fri, 20 Jul 2001 18:23:59 +0000 |
I have an xml like this which <a> <b1> <x>1</x> <y>hi</y> <z>hello</z> </b1> <b2> <x>1</x> <y>hi</y> <z>hello</z> </b2> <b3> <x>2</x> <y>u</y> <z>king</z> </b3> <b4> <x>3</x> <y>hi</y> <z>queen</z> </b4> </a>
<group> <b4> <x>1</x> <y>hi</y> <z>hello</z> </b4> <b4> <x>2</x> <y>u</y> <z>king</z> </b4> <b4> <x>3</x> <y>hi</y> <z>queen</z> </b4> </group>
for this i used an xpath like this <xsl:for-each select="//x[not(. = following::x)]"> <xsl:variable name="pos"> <xsl:value-of select="."/> </xsl:variable>
which gets me all the unique x values now when i write a statement like the below <xsl:value-of select="//y[//x=$pos]"/>
Thanx Spencer
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] recursive parsing?, Janning Vygen | Thread | Re: [xsl] gettin value of a node, David Carlisle |
[xsl] DOCTYPE/DTD, Samina Islam | Date | Re: [xsl] Element Existence, Kevin Shallow |
Month |