[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] can't get xsl:sort to work
hello! i'm working on an xml file that needs to convert into a table (html format). and i have this xsl coding: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <table cellspacing="10"> <thead> <tr align="left"> <th>Col. 1</th> <th>Col. 2</th> <th>Col. 3</th> </tr> </thead> <tbody> <xsl:for-each select="//complexarticle | //simplearticle | //dummyarticle"> <xsl:sort select="@entry"> <tr valign="top"> <td><xsl:value-of select="@id"/></td> <td><xsl:value-of select="@entry"/></td> <td><xsl:variable name="x" select="count(.//xref)"/> <xsl:for-each select=".//xref"> <xsl:value-of select="."/> <xsl:if test="position() < $x"> <br/> </xsl:if> </xsl:for-each> </td> </tr> </xsl:sort> </xsl:for-each> </tbody> </table> </xsl:template> </xsl:stylesheet> i'm using version 2.0 coz i need to output multiple files. but when i run the transformation (i'm using xmlspy) i get and error "Expected select attribute or non empty content not both" but i have a select attribute. what's wrong with my xsl file. UlyLee __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
|
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
|