xsl-list
[Top] [All Lists]

Re: [xsl] XSLT collection function to get filenames

2008-03-18 07:03:28


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. 
________________________________________________________________________

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