Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: problem using document('') to read component XSL

From: "Dimitre Novatchev" <dimitren@---.---.-->
To: 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? 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent