xsl-list
[Top] [All Lists]

RE: lightweight counterpart for collation()

2005-08-20 00:27:02
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(_dot_)staudinger(_at_)gmail(_dot_)com] 
Sent: 19 August 2005 23:09
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] 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

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