Subject: Re: [xsl] redirecting ouput to a different file? From: Dan Vint <dvint@xxxxxxxxx> Date: Fri, 19 Aug 2011 08:17:02 -0700 |
> Using Kernow I can easily run this stylesheet against a directory and it > will recreate the same filename with the changed content. That gets me > halfway there. > > The question here is, can I read file of one name and output all this > result to a new file name based upon the values in the mapping file?
You can do:
<xsl:template match="/">
<xsl:variable name="output-filename" select=" construct the filename here "/>
<xsl:result-document href="/path/to/output/{$output-filename}">
...which will give you control over the output filename. The default output file will probably still be created, so you would need to take that into consideration with the output file path.
Alternatively, move from the 'directory' tab to the 'standalone' tab, change your transform to pull in the source xml itself:
<xsl:template name="main"> <xsl:for-each select="collection(...)"> <xsl:variable name="output-filename" select=" construct the filename here "/> <xsl:result-document href="/path/to/output/{$output-filename}">
-- Andrew Welch http://andrewjwelch.com
--------------------------------------------------------------------------- Danny Vint
Panoramic Photography http://www.dvint.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] redirecting ouput to a di, Andrew Welch | Thread | [xsl] stop the processing of defaul, dvint |
Re: [xsl] AVT use and doc() functio, David Carlisle | Date | Re: [xsl] AVT use and doc() functio, Dan Vint |
Month |