cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seifert" <sseif...@pro-vision.de>
Subject AW: Why doesn't Cocoon2 recognize [position() &lt; last()] ??
Date Mon, 13 Aug 2001 12:19:11 GMT
Its not a cocoon, but a XSL-Problem. Try the following:

<xsl:template match="Member">
  <xsl:for-each select="*">
    <xsl:if test="position()>1">
      <xsl:value-of select="$delimiter"/>
    </xsl:if>
    <xsl:value-of select="."/>
  </xsl:for-each>
</xsl:template>

Stefan

> -----Urspr√ľngliche Nachricht-----
> Von: Hewko, Doug [mailto:Doug.Hewko@ccra-adrc.gc.ca]
> Gesendet: Montag, 13. August 2001 14:01
> An: 'cocoon-users@xml.apache.org'; cib
> Betreff: Why doesn't Cocoon2 recognize [position() &lt; last()] ??
> 
> 
> Hi! I have an XSL stylesheet that I typed from a tutorial and 
> it would not
> work under Cocoon2. Yet, it worked fine when I used MSXML4. 
> (Thus, the only
> difference between Cocoon and MS is the parser.)
> 
> If requested, I can attach the entire stylesheet and XML 
> documents, but the
> offending template is:
> <xsl:template match="Member">
> 	<xsl:for-each select="*[position() &lt; last()]">
> 		<xsl:value-of select="."/>
> 		<xsl:value-of select="$delimiter"/>
> 	</xsl:for-each>
> 	<xsl:value-of select="*[last()]"/>
> </xsl:template>
> 
> For some reason, Cocoon does not go through each node in the 
> "<xsl:for-each
> select="*[position() &lt; last()]">" line. The best I could 
> get Cocoon2 to
> do is to only look at the last node. Does anyone know why?

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message