xsl-list
[Top] [All Lists]

Re: [xsl] Tutorial for collection()

2007-05-17 07:57:53
On 5/17/07, Jesper Tverskov <jesper(_at_)tverskov(_dot_)dk> wrote:
As a follow-up to "the collection() function" thread,
http://www.biglist.com/lists/xsl-list/archives/200705/msg00369.html

I have made a tutorial for how to use the collection() function in XSLT 2.0:

"Collection() and REGEX in XSLT",
http://www.xmlplease.com/collection

You dont need the xpath for construct "for $x in ... return $x":

<xsl:for-each select="for $x in
collection('file:///c:/someDir/?select=*.*') return $x">

as it's equivalent to:

<xsl:for-each select="collection('file:///c:/someDir/?select=*.*')">

...unless you're using saxon:discard-document(), which frees up the
memory after the document is processed (if your collection is large
you quickly run out of memory):

http://ajwelch.blogspot.com/2006/11/using-collection-and-saxondiscard.html

cheers
andrew

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