Hi Joerg,

with that code I got the values from 5 elements and
these elements are sorted according to all elements.

Marcel


> Doesn't this sort only the first 5 elements?
> 
> <xsl:for-each select="/all/message">
>    <xsl:sort select="."/>
>    <xsl:if test="position() &lt; 6">
>      <xsl:value-of select="."/>
>    </xsl:if>
> </xsl:for-each>
> 
> Joerg
> 
> Conal Tuohy wrote:
> > How about something like this, then?
> > 
> > <xsl:variable name="m" select="/all/message"/>
> > 
> > <xsl:for-each select="$m[position()&lt;6">
> >     <xsl:sort select="."/>
> >     <!-- sample output here -->
> >     <xsl:value-of select="."/>
> > </xsl:for-each>
> > 
> > Or you might want to look at:
> >
>
http://www.dpawson.co.uk/xsl/sect2/N6461.html#d6361e489
> > 
> > Really you should ask this kind of question on the
> mulberrytech xsl list;
> > you'll get more response! :-)
> > 
> > Con
> > 
> >>-----Original Message-----
> >>From: Marcel Jurk [mailto:[EMAIL PROTECTED]]
> >>Sent: Sunday, 15 December 2002 18:52
> >>To: [EMAIL PROTECTED]
> >>Subject: RE: RE: xsl:copy-of Problem
> >>
> >>
> >>Hi Con,
> >>
> >>thanks for the hint with the RTF. But my problem
> is,
> >>that I want first sort the elements and afterwards
> I
> >>want output only the first five elements.
> >>With your example
> >><xsl:variable name="m" select="/all/message"/>
> >>is no sorting possible.
> >>
> >>Regards,
> >>Marcel
> 
> 
>
---------------------------------------------------------------------
> Please check that your question  has not already
> been answered in the
> FAQ before posting.    
> <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:    
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:  
> <[EMAIL PROTECTED]>
>  

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Weihnachts-Einkäufe ohne Stress! http://shopping.yahoo.de

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

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to