Subject: [xsl] Distinct items? From: eric@xxxxxxxxxxxx (Eric Vitiello) Date: Tue, 27 Mar 2001 11:22:25 -0500 |
Hi, I would like to retrieve a list of items such as: 1998 1999 2000 from the following XML: <projects> <item> <year>1998</year> </item> <item> <year>1998</year> </item> <item> <year>1999</year> </item> <item> <year>2000</year> </item> <item> <year>2000</year> </item> </projects> I have tried: <xsl:for-each select="projects/item"> <xsl:variable name="x" expr="year"/> <xsl:if test='not(from-following-siblings(*[year=$x]))'> <xsl:value-of select="year"/> </xsl:if> </xsl:for-each> which was modified from an example written to this list in 1999 (http://www.biglist.com/lists/xsl-list/archives/199907/msg00225.html), but that doesn't work in the MSXML3 parser. I receive the error: 'following-siblings' is not a valid XSLT or XPath function. not(-->from-following-siblings(*[year=$x])<--) any ideas on how I can make this work for this parser? Thanks! --Eric XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [XSL-FO] Re: RE: [xsl] element-, Christopher R. Maden | Thread | RE: [xsl] Distinct items?, Edmund Mitchell |
Re: RE: [xsl] element-available() q, Dago Flores | Date | RE: [xsl] Distinct items?, Edmund Mitchell |
Month |