xsl-list
[Top] [All Lists]

Re: Re: Re: The Perils of Sudden Type-Safety in XPath 2.0

2003-02-20 04:13:28
Dimitre,

I'm not disagreeing with your position. I have had some fundamental
objections to the introduction of data-typing within XSLT almost from

the moment that it first appeared in the specifications. I've worked 
with XSLT often enough to state that the number of times I can point 
to where static typing would have come in handy can be counted on one

hand, and usually there was some work-around there. I see the type 
mechanisms as a big step backwards, but one that is unfortunately 
driven by a few vendors (principally Microsoft) who are convinced 
that dynamic typing is bad and dangerous. I can think of a few cases 
where I would agree, but many more where dynamic typing is far 
preferable to dealing with static type.

As to the function mapping, I'm a little more ambivalent. The example

I gave there was pedagogical in nature, meant to illustrate the 
principle. I do believe, however, that the principle advantage that 
there are two principle advantages of the <xsl:function> element:

1) It makes it easier to develop a consistent set of libraries that 
can be utilized repeatedly. You may end up using this function only 
once in a given stylesheet, but if you use the same function imported

into multiple stylesheets then you've significantly reduced your 
overhead.

2) It makes it possible to create class-like architectures within
well
defined namespaces, a definite plus as I see it in creating a 
comprehensive framework for development. For instance, you can define

a matrix namespace:

[Nice examples skipped]

Kurt,

We agree on everything said. My comments were addressing the specific
example, I am fully aware of the benefits of xsl:function and grouping
related functions into modules.






=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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