[prev in list] [next in list] [prev in thread] [next in thread]
List: xml-cocoon-users
Subject: XSL: for-each not working
From: jeffh () castleweb ! com (Jeff Hitchcock)
Date: 1999-12-18 15:46:56
[Download RAW message or body]
I am having problems getting Cocoon to render a document using a for-each
block in the associated XSL style sheet. If anyone has a working example of
this, I would appreciate a sample.
Here's my code that doesn't work:
XML:
<dtqdata>
<dtqid>DTQ-19990912042956</dtqid>
<dtqdate type="published">7 Dec 1999</dtqdate>
<dtqdate type="updated">10 Dec 1999</dtqdate>
</dtqdata>
XSL:
<xsl:template match="dtqdata">
<font size="-1"><i>
<xsl:value-of select="dtqid"/>
<xsl:for-each select="dtqdate">
<xsl:choose>
<xsl:when match=".[@type='published']">
<br/>
Original posting
<xsl:value-of select="dtqdate"/>
</xsl:when>
<xsl:when match=".[@type='updated']">
<br/>
Updated
<xsl:value-of select="dtqdate"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</i></font>
</xsl:template>
Jeff Hitchcock - jeffh@castleweb.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic