This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: XSL theory questions
- To: xsl-list at lists dot mulberrytech dot com
- Subject: RE: [xsl] XSL theory questions
- From: "Clapham, Paul" <pclapham at core-mark dot com>
- Date: Tue, 29 May 2001 08:25:08 -0700
- Reply-To: xsl-list at lists dot mulberrytech dot com
1. I've used a lot of programming languages, and I can't remember any of
them (except perhaps Fortran with named Common blocks) that allowed you to
use a variable outside of the scope it was declared in. Seems to me that
would lead to considerable difficulty in specifying the language. For
example, what if you had two variables X that both declared themselves to be
global? (Remember that there are <xsl:include> and <xsl:import> to
complicate this.)
2. Verbose? That's a global function of XSL, not just of <xsl:choose>!
Anyway, many of the languages I've used provide both the if-then-else
construct and the case-when-otherwise construct, for programming
convenience, even though the latter can theoretically be simulated by nested
if-then-elses. (In one language I used which didn't have
case-when-otherwise, I found myself coding a 45-level-deep if-then-else
clause. Yecch.)
-----Original Message-----
From: Zak McGregor [mailto:zak@mighty.co.za]
Sent: May 29, 2001 04:47
To: xsl-list@lists.mulberrytech.com
Subject: [xsl] XSL theory questions
Hi all
Could anyone please explain a few things to me?
1 - Why the XSL spec does not allow for scoping of variables outside of
logical blocks? Would it have been that dificult to have added a scope
attribute to the <xsl:variable> declaration so that a variable could be
globally scoped?
2 -
<xsl:coose><xsl:when>...</xsl:when><xsl:otherwise>...</xsl:otherwise></xsl:c
hoose>
seems awfully verbose. And slightly redundant, if you consider something
like <xsl:if>...</xsl:if> and the possibility of having similar
functionality within the <xsl:if> elements. Surely it would be easier to
have all tests with <xsl:if> elements, and having that itself inside
another element to get the equivalent of the <xsl:when> funcionality
without having introduced several elements for similar results?
Thanks
Cheers
Zak
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list