|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Parameter/Variable values as attribute values
Zeljko,
> <saxon:output file="$file" method="xml" version="1.0" encoding="UTF-8"
indent="yes">>
[snip]
> So it seems the parameter has been passed correctly. But unfortunately the
> parameter nor variable is evaluated within the attribut of the <saxon:output>
> tag, thus a file with the name "$file" is created which contains the copy of the
> original document.
The 'file' attribute of saxon:output is an attribute value template,
which means that if you want it to evaluate an expression to give the
name of the file (as you do here), then you have to put the bit that
you want evaluated between curly brackets ({}s). Try:
<saxon:output file="{$file}" method="xml" version="1.0"
encoding="UTF-8" indent="yes">
instead. This has the advantage that you can append the extension to
the filename (for example) without making the variable take that
value. For example:
<saxon:output file="{$file}.xml" method="xml" version="1.0"
encoding="UTF-8" indent="yes">
would create a file called myFilename.xml.
I hope that helps,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








