Re: [xsl] XSLT collection function to get filenames

Subject: Re: [xsl] XSLT collection function to get filenames
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 18 Mar 2008 14:02:58 GMT
collection() returns a  sequence of document (/) nodes so it can't do
the equivalent of a sequence of calls to unparsed-text() which would be
a sequence of strings.


However collection() could return a sequence of document nodes each of
which had a single text node containing the contents of the file, but
to do that you would have to supply saxon the (java class name of) a SAX
parser that just took a text file and returned (the sax events
equivalent to) a document node and a single text node. The saxon
documentation for example has example of using an html parser instead
of an xml one. Presumably if you know anything about writing a sax
parser (which rules me out:-) then writing one which, for any file,
returns the entire contents of the file as a text node must be
trivial....



David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

Current Thread