This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Scanning the directory. Re: Cross-references
- To: xsl-list at mulberrytech dot com
- Subject: Scanning the directory. Re: Cross-references
- From: Paul Tchistopolskii <paul at qub dot com>
- Date: Thu, 13 Jul 2000 02:07:52 -0700
- Organization: The Qub Group
- References: <396D9CD0.23937.5C0AAB@localhost>
- Reply-To: xsl-list at mulberrytech dot com
> I want the stylesheer to "scan" a directory for chapters.
>
> Any suggestions?
No way with standard XSLT.
Way 1.
Simple perl script which generates master.xml scanning the directory.
Then stylesheet is invoked, accessing the generated document
with document()
Variant - write a CGI which will generate the desired xml and access
it with document("http://localhost/cgi-bin/scan.cgi") ( I assume that
this 'mainstream' XSLT way is to assume that today everybody has
http server installed ).
Way 2.
Write XSLT-processor specific extension function
in Java ( the function will scan directory and return
XSLT-processor specific node-set ). You may hack
ls.java from Ux distribution at http://www.pault.com/Ux/
Way 3.
Download Ux, understand it and invoke your stylesheet( say, my.xsl )
in Ux command-line mode, like:
ux "ls.class /dir/to/scan | my.xsl"
Or use Ux hack: document("/! ls /dir/to/scan/" ) inside my.xsl and
invoke
ux "my.xsl"
Rgds.Paul.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list