[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] Getting specific elements from a list
Subject: RE: [xsl] Getting specific elements from a list From: "Simon, Jb" <jb.simon@xxxxxxxx> Date: Thu, 26 May 2005 17:24:39 -0400 |
> -----Original Message----- > From: Dimitre Novatchev [mailto:dnovatchev@xxxxxxxxx] > Sent: Thursday, May 26, 2005 5:08 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Re: [xsl] Getting specific elements from a list> > > The correct XPath expressions to use are, therefore: Snip > > (.//EnumValueDescription)[1] > > and > > (.//EnumValueDescription)[last()] > > > > Of course, in this particular case it is best *not* to use the "//" > abbreviation. What would suffice is just: > > tblEnumValues/EnumValueDescription[1] > > and > > tblEnumValues/EnumValueDescription[last()] > > > -----Original Message----- > From: JBryant@xxxxxxxxx [mailto:JBryant@xxxxxxxxx] > Sent: Thursday, May 26, 2005 5:09 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Re: [xsl] Getting specific elements from a list > Snip > <xsl:variable name="EVDs" select="//EnumValueDescription"/> > > <xsl:template match="tblEnumeratedTypes"> > test ( > int, > <xsl:value-of select="EnumeratedType"/>, > <xsl:value-of select="$EVDs[1]"/>, > <xsl:value-of select="$EVDs[last()]"/> > ); > </xsl:template> Thanks to all ... I ended up using Jay Bryant's Solution, I could not get Dimitres' solution to work, Kept getting blanks, although I now understand what was going on and it looks like his solution should also work. I just had to change Jay's solution from > <xsl:variable name="EVDs" select="//EnumValueDescription"/> To <xsl:variable name="EVDs" select=".//EnumValueDescription"/> Thanks to All ! Joe Simon Lockheed Martin, Systems Integration, Owego, NY
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Getting specific elements, Michael Kay | Thread | RE: [xsl] Getting specific elements, JBryant |
Re: [xsl] Getting specific elements, JBryant | Date | RE: [xsl] Getting specific elements, JBryant |
Month |
Keywords