Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - problem using document('') to read component XSL [Thread Next] Re: problem using document('') to read component XSLTo: NULL Date: 12/7/2007 6:19:00 PM
No.
document('')
selects the root node of the current stylesheet file.
However, you could define the global $rule variable in the same stylesheet,
ehere the template witrh the 'xx:rule"' attribute is.
Then, just reference the $rule variable from other stylesheets.
Cheers,
Dimitre Novatchev.
"John D" <JohnD@d...> wrote in message
news:D1883739-FF78-4BB0-8A39-0DF36B1E2DF5@m......
>I would like to define a variable in one component file and the bind
>variable
> in another (all using xsl:include).
>
> For example,
> // Rule1.xsl
> <xsl:include href="vars.xsl"/>
> <xsl:template match="/" rule:ruleId="1">...</>
>
> //vars.xsl
> <xsl:variable name="rule"
> select="document('')//xsl:template/@rule:ruleId"/>
> <xsl:variable name="page" select="//page[@rule=$rule]"/>
>
> The problem is that $rule is never defined. I assumed that the
> document('')
> function would apply after all included component files have been loaded
> into
> memory, building the entire XSLT dom tree, but this doesn't appear to be
> the
> case. Any tips?
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
