Subject: RE: [xsl] Question: Pairing sibling nodes From: <Jarno.Elovirta@xxxxxxxxx> Date: Tue, 15 Nov 2005 11:57:43 +0200 |
Hi, >I have an xml fragment as following: > ><PNR> > > <LNameInfo> > <LName>A.</LName> > </LNameInfo> > ><LNameInfo> > <LName>Smith</LName> > </LNameInfo> > ><LNameInfo> > <LName>Johnson</LName> > </LNameInfo> > ><FNameInfo> > <FName>Ahsan</LName> > </FNameInfo> > ><FNameInfo> > <FName>Brad</FName> > </FNameInfo> > ><FNameInfo> > <FName>Dave</FName> > </FNameInfo> > ></PNR> > >I need to print the first Lname with the first Fname, and the >second with the second, and so on. <xsl:for-each select="LNameInfo"> <xsl:variable name="i" select="position()"/> <xsl:value-of select="LName"/> <xsl:text> </> <xsl:value-of select="../FNameInfo[position() = $i]/FName"/> </> Jarno
Current Thread |
---|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Question: Pairing sibling nod, Ahsan Ali | Thread | Re: [xsl] Question: Pairing sibling, Ahsan Ali |
RE: [xsl] Conditionally use attribu, Jarno.Elovirta | Date | Re: [xsl] Conditionally use attribu, David Carlisle |
Month |