[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

can't get xsl:sort to work

Subject: can't get xsl:sort to work
From: UlyLee <ulyleeka@xxxxxxxxx>
Date: Mon, 19 Sep 2005 03:58:08 -0700 (PDT)
xsl stylesheet version 2.0
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() &lt; $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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.