Thanks for the reply. Actually, the XSL is valid and it should work
according to the W3 Recommendations. The only conclusion left is that there
is a bug in Cocoon2, which is what I am trying to verify. So it was posted
in the correct list.

-----Original Message-----
From: Stefan Seifert [mailto:[EMAIL PROTECTED]]
Sent: August 13, 2001 8:39 AM
To: [EMAIL PROTECTED]
Subject: AW: Why doesn't Cocoon2 recognize [position() < last()] ??


I supposed it is not valid XSL, but i'm not sure.
Anyway i find the second approach quite easier to read and it works...
But this is not the right list for such a question - take a look at the
mulberry-list for XSL:
http://www.mulberrytech.com/xsl/xsl-list/index.html

Stefan

> -----Ursprüngliche Nachricht-----
> Von: Hewko, Doug [mailto:[EMAIL PROTECTED]]
> Gesendet: Montag, 13. August 2001 14:29
> An: '[EMAIL PROTECTED]'
> Cc: ':[EMAIL PROTECTED]'
> Betreff: RE: Why doesn't Cocoon2 recognize [position() < last()] ??
> 
> 
> Thanks! Using your help, I did get the expected output by 
> replacing "last()"
> with the eventual translation, "4". So my new line read " <xsl:if
> test="position()&lt;4"> ". 
> 
> Now, can you please explain what you meant by a 
> "XSL-Problem"? Should my
> original line work according to the W3 recommendations, or is 
> it the way the
> parsers interpret things? Again, it works using MSXML4.0 but 
> not Cocoon2.
> Just wondering so I could identify future instances that are similar.
> 
> Thanks again.
> 
> -----Original Message-----
> From: Stefan Seifert [mailto:[EMAIL PROTECTED]]
> Sent: August 13, 2001 8:19 AM
> To: [EMAIL PROTECTED]
> Subject: AW: Why doesn't Cocoon2 recognize [position() &lt; last()] ??
> 
> 
> 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:[EMAIL PROTECTED]]
> > Gesendet: Montag, 13. August 2001 14:01
> > An: '[EMAIL PROTECTED]'; 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: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> ---------------------------------------------------------------------
> 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: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 
> 
> 

---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to