RE: [xsl] Speeding up collection()

Subject: RE: [xsl] Speeding up collection()
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 10 Jun 2009 09:37:04 +0100
> I don't know whether with collection() the processor has the 
> freedom not to load the document into memory until its 
> needed, but I suspect it would have to be a specific 
> optimisation to not load it for document-uri()

The optimization is permitted by the spec (it's a general rule that the
processor is never obliged to do work that is needed only to detect errors
that would otherwise be missed); but it's not an optimization that Saxon
attempts.

Another way to do this would be to write a custom CollectionURIResolver; but
that involves writing Java code, whereas the method suggested by Andrew
doesn't.

Regards,

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

Current Thread