Thank you Jarno. This works.
Cheers,
Ahsan
On 11/15/05, Jarno(_dot_)Elovirta(_at_)nokia(_dot_)com
<Jarno(_dot_)Elovirta(_at_)nokia(_dot_)com> wrote:
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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--
Muted Musings - http://doubleletter.blogspot.com
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--