xsl-list
[Top] [All Lists]

Re: [xsl] xsl:sort on fn:collection() ?

2008-03-21 07:08:36
Robert Koberg wrote:

Is it possible to sort a collection based on filename?

For example:

<xsl:apply-templates select="collection($model-path)" mode="model">
  <xsl:sort/>
</xsl:apply-templates>

By default, it does not seem to apply in file system order. If I use
xsl:sort, what would I sort on?

If you want to sort on the file name then you could try
  <xsl:sort select="tokenize(document-uri(/), '/')[last()]"/>

--

        Martin Honnen
        http://JavaScript.FAQTs.com/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>