[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Re: Assignment no, dynamic scoping si (was: Re: RE: Wishes for XSL revisions ...


Subject: [xsl] Re: Assignment no, dynamic scoping si (was: Re: RE: Wishes for XSL revisions ...
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Mon, 31 Dec 2001 09:49:44 -0800 (PST)

Gunther Schadow <gunther at aurora dot regenstrief dot org> wrote:

[snip]

> Now assume you figure out deep down in a special case
> that you nee d to add one more parameter (e.g., text color).

This is accomplished very simply by passing just ***one*** parameter, which is a
nodeset with some definite structure The nodes/subtrees of this nodeset represent
your (multitude of) parameters. To add a new (text-colour in your example)
parameter, simply add a new node in an appropriate place within the node-set.

> You then need to rewrite the entire template library

You don't need to re-write anything. The XPath expressions that selected prior
"parameters" will not need to be changed at all.

> to add text color as a parameter to every template and
> make sure every template passes on that new parameter.

Absolutely not -- the templates continue to deal with the single node-set parameter
as before.

> This is a HUGE impact of a minor change. Put this into
> a distributed template development environment and library
> which you can't all change and where others who do not
> care about text color will concurrently maintain. It
> becomes impossible.

The arguments above prove that your reasoning was not correct.

Cheers,
Dimitre Novatchev.


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

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



Current Thread
Keywords