[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: redirecting ouput to a different file?

Subject: Re: redirecting ouput to a different file?
From: Dan Vint <dvint@xxxxxxxxx>
Date: Fri, 19 Aug 2011 08:17:02 -0700
Re:  redirecting ouput to a different file?
thanks

Given that I have the mapping file I should be able to use it as the list of documents to process as you suggest, which would give me additional control and options within kernow.

..dan

At 01:56 AM 8/19/2011, you wrote:
> 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

voice: 619-938-3610

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.