RE: [xsl] Directory listing, as xml file

Subject: RE: [xsl] Directory listing, as xml file
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sun, 1 Jun 2008 18:21:06 +0100
> 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.

Michael Kay
http://www.saxonica.com/

Current Thread