xsl-list
[Top] [All Lists]

RE: ordering nodes

2006-01-30 15:33:57
Cocoon does not understand "collection()". Any other ideas?

-----Original Message-----
From: bokluk [mailto:bokluk(_at_)gmx(_dot_)net] 
Sent: Monday, January 30, 2006 10:35 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] ordering nodes

Answer is ok.
But what happens if xml files are in two different folders?

-----Original Message-----
From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com] 
Sent: Monday, January 30, 2006 12:05 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] ordering nodes

P.S. I'm using cocoon 2 processor

I'm not familiar with the cocoon 2 processor, but if it's an XSLT 2.0
processor you can use:

<xsl:for-each select="for $x in
collection('pathToXMLDirectory?select=*.xml;recurse=yes;on-error=warn')
                      return $x//defnition">
  <xsl:sort select="youdidntsay"/>


I'm not sure what the current position is regarding using Saxon under
cocoon; however, you need to be aware that the above depends not just on
XSLT 2.0, but on Saxon, since the interpretation of the URI passed to the
collection() function is implementation-defined. With luck other processors
will imitate this syntax, but it's not in the spec.

Michael Kay
http://www.saxonica.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>
--~--



--~------------------------------------------------------------------
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>
--~--



--~------------------------------------------------------------------
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>