xsl-list
[Top] [All Lists]

Re: [xsl] The collection() function

2007-05-16 02:10:37
On 5/15/07, Jesper Tverskov <jesper(_at_)tverskov(_dot_)dk> 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

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