[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: lightweight counterpart for collation()

Subject: RE: lightweight counterpart for collation()
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sat, 20 Aug 2005 08:27:02 +0100
collectionuriresolver
If you want to customize the effects of the collection() function, Saxon 8.5
allows you to write your own CollectionURIResolver to achieve the effects
that you want. You could do this by subclassing the existing
StandardCollectionURIResolver, or by copying-and-pasting its code into your
own.

You can discard documents once read using saxon:discard-document(). This is
true whether they were originally loaded using the collection() function, or
using document() or whatever. If you probe into the code a bit, you can
probably work out how to do the same thing from within your
CollectionURIResolver. Using this function is slighly "unclean", in that you
lose certain guarantees about the language semantics, but it's highly
unlikely to be a problem in practice.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Manfred Staudinger [mailto:manfred.staudinger@xxxxxxxxx] 
> Sent: 19 August 2005 23:09
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  lightweight counterpart for collation()
> 
> Hi list,
> 
> As I recently ran into storage problems with collation()
> I would like to see a lightweight counterpart with the
> following features:
> - syntax like in collation() for one directory
> - on invocation gets a sequence (dir-seq) representing
>   the documents in the directory, the order determined 
>   by the full URI, including the member-name. If the 
>   function is called again, it reuses the dir-seq.
> - each document is fetched only once from directory 
>   when it is referenced for the first time. It will be discarded
>   automatically if an other document from the same dir-seq 
>   is referenced and it will not be re-fetched later on.
> With the Saxon implemented collation() I noticed that the
> sequence I got was not ordered by the URI and I had
> to use sort, which in terms of memory usage can become
> very costly indeed.
>   
> Any thoughts will be appreciated
>   
> Manfred

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.