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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--