xsl-list
[Top] [All Lists]

Re: Xsl:variable question

2005-09-26 13:21:05
(Resending this, as my client's spam filter, which I detest, marked your 
message as spam. My apologies to the list for the filter, my oversight in 
removing the spam tag, and a double response - for those of you whose own 
spam filters don't block the first one. Given a choice, I don't use spam 
filters, as I detest damned idiot machines that try to think for me.)

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(_dot_)Emerson(_at_)FMR(_dot_)COM> 
09/26/2005 02:56 PM
Please respond to
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com


To
<xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>