[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Assignment no, dynamic scoping si (was: Re: RE: Wi

Subject: Re: Assignment no, dynamic scoping si (was: Re: RE: Wishes for XSL revisions ...
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 3 Jan 2002 14:12:09 GMT
Re: Assignment no
Gunther

> So, what are the disadvantages of dynamic scoping?
> I can see only two

There are others, not least that having two kinds of scoping working in
parallel is confusing. There are languages that do this but normally one
has either one sort of scope or the other. Especially in XSLT dynamic
scope could have some surprising consequences due to the template match
mechanism.

Unlike some other more traditional languages, in XSLT the calling order
of the templates is not at all explict in the program source and is
driven by whatever document is passed in as data.  This means that
normally templates need to be written to work wherever they happen to
match and _without_ regard to the particular calling sequence that
caused them to fire. Dynamic scope would radically change that and mean
that the behaviour of a template would much more directly depend on the
stack of "currently active" templates. It is not at all clear to me that
this would make XSLT an easier language to understand or work with.
At present any dependency on previously called templates is (a) rare and
(b) explictly flagged by the declaration and passing or parameters.
This is a good thing (I believe) Of course the fact that the syntax for
passing parameters is so verbose (even by XSL standards) means that it
is sometimes a pain, but there have been some "syntactic sugar"
proposals to help with that without changing the underlying execution
model.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.