This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Managing Generation of Output Filenames


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]