This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Scanning the directory. Re: Cross-references



>  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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]