|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Tool for transforming files in folder structures
Saxon will handle this.
Use the collection() function to read the input files, in conjunction with
saxon:discard-document() to make sure that each file is discarded from
memory after processing.
It would be something like
<xsl:template name="main">
<xsl:for-each
select="collection('file:///c:/input-dir/?select=*.xml;recurse=yes')/discard
-document(.)">
<xsl:result-document href="{replace(document-uri(.), '/input-dir/',
'/output-dir/')}"/>
<xsl:apply-templates select="."/>
</xsl:result-document>
</xsl:for-each>
</xsl:template>
and then the template rules to do the transformation.
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: Stefan Krause [mailto:stf@xxxxxxxx]
> Sent: 06 November 2008 23:23
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Tool for transforming files in folder structures
>
> Hello,
>
> I have to transform a set of about 120000 files in a nested
> folder structure (about 8000 Directories). I need a tool,
> which transforms these files (all by the same stylesheet) and
> recovers the folder tree in the output directory.
>
> Any suggestions?
>
>
> Stefan Krause
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








