Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Directory listing, as xml file

From: "Andrew Welch" <andrew.j.welch@--------->
To:
Date: 6/2/2008 10:02:00 AM
2008/6/1 Michael Kay <mike@xxxxxxxxxxxx>:
>> Any suggestions how this might be done (mostly) with xslt?
>
> I think that all three currently-available XSLT 2.0 processors allow you to
> do
>
> <xsl:for-each select="collection('file:///temp/dir')">
>  <xi:include href="document-uri(.)"/>
> </xsl:for-each>
>
> though it's a bit painful as it's likely to involve actually parsing each of
> the documents in the collection, which is of course unnecessary if you only
> want the names. Also it will give you an absolute URI rather than a relative
> one.

This is the way I've done it 95% of the time (with
saxon:discard-document to prevent memory issues)

On the odd occasion where parsing the XML is overly time consuming
I've just called out to Java from Saxon - I don't have the code to
hand to cut and paste into the email but it's simple enough.

Some code is here:

http://www.biglist.com/lists/lists.mulberrytech.com/xsl-list/archives/200607/msg00568.html

-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent