[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Distinct items?
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|