Re: [xsl] The collection() function

Subject: Re: [xsl] The collection() function
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Wed, 16 May 2007 10:10:20 +0100
On 5/15/07, Jesper Tverskov <jesper@xxxxxxxxxxx> wrote:
I have a feeling that the implementation of collection() in Saxon
could be improved for documents with a DTD. I don't think their
loading can be turned off?

If a directory contains just a handful of XHTML documents loading DTDs
over the net, even the most simple use of collection() like for
generating a list of filenames in a directory can take minutes. When I
delete the DTD declarations as a test, the function is generating the
same list in a few seconds.

Kernow has a CustomStandardCollectionURIResolver which uses a CustomEntityResolver just for this purpose - it caches the DTDs referenced in the XML files when they're read using the collection() function.

This way they are only fetched once per transform and then re-used.
If you prefer you can save local copies and point Kernow at the local
directory so that it doesn't access the net at all.

Kernow can now be run 3 ways - using the GUI, called from Java using
its API or run from Ant so it has the potential to slot in wherever
you are currently using Saxon.

http://kernowforsaxon.sourceforge.net/

cheers
andrew

Current Thread