Scanning the directory. Re: Cross-references

Subject: Scanning the directory. Re: Cross-references
From: Paul Tchistopolskii <paul@xxxxxxx>
Date: Thu, 13 Jul 2000 02:07:52 -0700
>  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


Current Thread