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

Re: Re: Assignment no, dynamic scoping si (was: Wishes

Subject: Re: Re: Assignment no, dynamic scoping si (was: Wishes forXSL revisions ...
From: Mark Nahabedian <naha@xxxxxxxxxx>
Date: Fri, 28 Dec 2001 14:58:17 -0500
mark nahabedian
Mike Haarman writes:
 > On Fri, 28 Dec 2001, Gunther Schadow wrote:
 > 
 > > There is even a simpler approach using only XSLT: I can make all
 > > templates use an argument that is a constructed node-set
 > > containing name-value pairs (the dynamic environment) and references
 > > to the bindings in this environment would be supported by some
 > > xpath selects in that environment node-set.
 > >
 > 
 > Thanks for the insight.  Can the dynamic environment be incorporated into
 > the internal subset via parameter entities?  Such a solution does not
 > leave interoperability entirely in crutches.

For each variable for which you would like dynamic scoping behavior,
you could include it as a parameter in all relevant template
definitions and activation sites.  If this is too cumbersome one could
develoop a shorthand for it and employ an XSLT -> XSLT transformation
to expand it.

There's still the issue of being able to override the passed in
"dynamic" value with a new one.  XSLT doesn't allow this though
[http://www.w3.org/TR/xslt#local-variables]:

    A binding shadows another binding if the binding occurs at a point
    where the other binding is visible, and the bindings have the same
    name. It is an error if a binding established by an xsl:variable
    or xsl:param element within a template shadows another binding
    established by an xsl:variable or xsl:param element also within
    the template.

so one would need to do tricky expression groveling and name mangling
to pull it off.


I've been reasobly confortable with declaring parameters and passing
them (or some derivative value) along as needed though and don't see a
shorthand for this as being worth the effort.


 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.