This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Managing Generation of Output Filenames
- From: "Jonathan Perret" <jonathan at holylabs dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 7 Feb 2002 16:37:02 +0100
- Subject: Re: [xsl] Managing Generation of Output Filenames
- References: <3C629B8C.41623254@isogen.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
I may be completely missing the point, but can't you do something
like :
<xsl:template name="make-filename">
(insert business logic here, returning a string)
</xsl:template>
When you later need a filename, generate it to a variable :
<xsl:variable name="filename">
<xsl:call-template name="make-filename" />
</xsl:variable>
Then when you need an attribute :
<sampleoutputelement sampleattribute="{$filename}" />
When you need an href for xsl:document :
<xsl:document href="{$filename}" />
I completely omitted the parameters you will want to pass
to the business-logic template, but this shouldn't be much
of a problem, hopefully.
Sorry if I didn't understand your problem...
Hope this helps,
--Jonathan
----- Original Message -----
From: "W. Eliot Kimber" <eliot@isogen.com>
To: "xsl list" <xsl-list@lists.mulberrytech.com>
Sent: Thursday, February 07, 2002 4:21 PM
Subject: [xsl] Managing Generation of Output Filenames
> We have an HTML output script that is creating lots of output files
> where the filenames we use for the generated files have to be both
> meaningful and reflect some pre-defined business rules for how the names
> are constructed.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list