Subject: Re: [xsl] use-when in the xsl:inlcude From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Sat, 30 Aug 2008 09:23:46 -0400 |
Ken,
<xsl:include href="..." use-when="document('configuration:data')/data/xs:boolean(@xxx)"/>
Except that it won't work. Your use-when= above relies on *some* document context in order to determine the argument values for the document() function...
As you might understand, I have some configuration defining xslt to run. E.g. Andrew has proposed to define all required compositions.
I was thinking of conditional xsl:include.
This has nothing in common with source input tree during transformation.
This works (if I'm not wrong), as doc() function is available in the context where values of @use-when are evaluated. See http://www.w3.org/TR/xslt20/#conditional-inclusion.
"However, there are severe constraints on the information provided in its evaluation context. These constraints are designed to ensure that the expression can be evaluated at the earliest possible stage of stylesheet processing, without any dependency on information contained in the stylesheet itself or in any source document."
Sorry, if I was not clear about the problem I was asking about.
-- Upcoming XSLT/XSL-FO hands-on courses: Wellington, NZ 2009-01 Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] use-when in the xsl:inlcu, Vladimir Nesterovsky | Thread | Re: [xsl] use-when in the xsl:inlcu, Vladimir Nesterovsky |
Re: [xsl] use-when in the xsl:inlcu, Vladimir Nesterovsky | Date | Re: [xsl] Commented contents not co, Dimitre Novatchev |
Month |