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

Re: Parameter/Variable values as attribute values

Subject: Re: Parameter/Variable values as attribute values
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Tue, 28 Nov 2000 14:13:19 +0000
parameter variable
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


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.