cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <tkr...@attglobal.net>
Subject XSLT Problem - need help
Date Tue, 14 Dec 1999 20:58:50 GMT
I am trying to transform the attached XML file with Cocoon into a simple HTML table presentation
with ID and DESCRIPTION as table header. I tried different things, read the specs, but I am
stucked. Depending whether I put a select in the "apply-templates" or not I get either only
the table heading or all the text appearing just before the table.
I would be grateful for any help
 
Thanks,
Thomas
 
--- XML file ---
<page>
<rowset>
<row>
    <id>1</id>
    <descr>blah</descr>
</row>
<row>
    <id>2</id>
    <descr>some other blah</descr>
</row>
</rowset>
</page>
 
--- XSLT-file ----
<xsl:template match="page">
<html>
    <head>
        <title>
            Some Title
        </title>
    </head>
    <body>
        <table border="2">
            <tr>
                <td>ID</td>
                <td>Short Description</td>
            </tr>
 
      <xsl:apply-templates select="rowset"/>
 
        </table>
    </body>
</html>
</xsl:template>
 
<xsl:template match="row">
<tr>
    <td>
        <xsl:value-of select="id"/>
    </td>
    <td>
        <xsl:value-of select="descr"/>
    </td>
</tr>
</xsl:template>



Mime
View raw message