Altova Mailing List Archives


[xsl] Re: Spam:[xsl] Xsl:variable question

From: JBryant@---------
To:
Date: 9/26/2005 8:11:00 PM
Hi, Matt,

For the most part, yes. However, beware of circular definitions (which no 
language can handle).

<xsl: variable name="a">
  some processing dependent on the value of $b
</xsl:variable>

<xsl: variable name="b">
  some processing dependent on the value of $a
</xsl:variable>

will break.

And while it looks simple in this very obvious case, it can be hell to 
figure out in practice, when it's halfway through 3,000 lines of souce 
code in multiple files. So I try to keep those kinds of things together in 
the same file and write comments so that I can figure out what I did when 
I come back to that stretch of code next year.

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)




"Emerson, Matt" <Matt.Emerson@xxxxxxx> 
09/26/2005 02:56 PM
Please respond to
xsl-list@xxxxxxxxxxxxxxxxxxxxxx


To
<xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
cc

Subject
Spam:[xsl] Xsl:variable question






Hello,

If I declare more than one global variable in a document, can I be
ensured that the global variables will be instantiated in a particular
order?

For instance, if I do this,

<xsl:stylesheet>

                 <xsl:variable name="A">
                                 some processing...
                 </xsl:variable>

                 <xsl:variable name="B">
                                 some processing dependent on B
                 </xsl:variable>

                 <xsl:variable name="C">
                                 some processing dependent on A,B,etc.
                 </xsl:variable>

                 <xsl:template match="/">
                                 transform
                 </xsl:template>
</xsl:stylesheet>

Will I be ensured that C will be processed after B and after A,etc?

Thanks,

Matt

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.