This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: xsl:variable with expr
- From: Peter Davis <pdavis152 at attbi dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 8 Jul 2002 21:46:10 -0700
- Subject: Re: [xsl] xsl:variable with expr
- References: <PCEPJCKNCDPGBBNJPNNJKEMMCHAA.sanghamitra.das@itreya.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
On Monday 08 July 2002 21:27, sanghamitra das wrote:
> XSLT Error (javax.xml.transform.TransformerConfigurationException): "expr"
> xsl:variable element!
> Can anu tell me the reason.
> <xsl:variable name="DebugOpts" expr="abc123"/>
Yes, the reason is painfully obvious. This is not valid XSLT.
You probably want:
<xsl:variable name="DebugOpts" select="'abc123'"/>
which will assign $DebugOpts to the string "abc123". Note the use of "select"
instead of "expr".
--
Peter Davis
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list