|
Subject: RE: [xsl] import, xslt 2.1 From: Scott Trenda <Scott.Trenda@xxxxxxxx> Date: Sat, 13 Mar 2010 16:40:02 -0500 |
I don't know much about XSLT2 or Saxon's extensions, but the errors from your second case here seem fairly simple to fix:
<xsl:import href="f/func-exp.xsl"
use-when="system-property('System.getenv("f")')= 'true'" />
Putting the quotes around f made that attribute into invalid XML. Does that work?
~ Scott
-----Original Message-----
From: Dave Pawson [mailto:davep@xxxxxxxxxxxxx]
Sent: Saturday, March 13, 2010 5:00 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] import, xslt 2.1
Tried using use-when with an environmental variable.
<xsl:import href="f/func-exp.xsl"
use-when="system-property('System.getenv('f')')= 'true'" />
Error on line 14 of fxslexamples.xsl:
XPST0003: Error in use-when expression. XPath syntax error at char 32
on line 14 in
{...-property('System.getenv('f...}:
expected ")", found name "f"
Failed to compile stylesheet. 1 error detected.
Changed the quotes to
<xsl:import href="f/func-exp.xsl"
use-when="system-property('System.getenv("f")')= 'true'" />
and get
Error on line 14 column 43 of fxslexamples.xsl:
SXXP0003: Error reported by XML parser: Element type "xsl:import"
must be followed by
either attribute specifications, ">" or "/>".
Failed to compile stylesheet. 1 error detected.
Looks like it can't be done.
regards
--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] import, xslt 2.1, Michael Kay | Thread | Re: [xsl] import, xslt 2.1, Dave Pawson |
| Re: [xsl] import, xslt 2.1, Liam R E Quin | Date | [xsl] Conditional Execution in XSLT, Jacobus Reyneke |
| Month |