Subject: Re: [xsl] import, xslt 2.1 From: Dave Pawson <davep@xxxxxxxxxxxxx> Date: Sat, 13 Mar 2010 08:53:15 +0000 |
On 12/03/10 16:37, Michael Kay wrote:
<xsl:import href="fred.xsl" use-when="doc-available('../dirName')"/>
That sort of thing? Sounds like a kludge Mike?
I'm sorry that you think so. We wanted a general purpose feature for conditional compilation, and we introduced one which I think is in many ways superior to the conditional compilation features found in other languages, where they exist at all.
It's not clear to me why so many people ask for some kind of run-time conditional xsl:include. It shows a complete lack of understanding of the XSLT processing model. Dynamic loading as practiced in Java, for example, could be an interesting feature, but I don't think anyone would expect it to be done using xsl:include.
Should I read xml:import and your complaints about xsl:include as being in the same category?
btw I can't get
<xsl:import href="fred.xsl" use-when="doc-available('../dir/filename.xml')"/>
to work, even when the relative file exists.
any suggestions please?
Because of the restrictions on available evaluation context! (including access to external documents) I.e. it's no good whatsoever for my use case.
-- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] import, xslt 2.1, Dave Pawson | Thread | Re: [xsl] import, xslt 2.1, Florent Georges |
Re: [xsl] import, xslt 2.1, Dave Pawson | Date | Re: [xsl] import, xslt 2.1, Florent Georges |
Month |