RE: [xsl] A list of useful functions that aren't in the core of xsl.

Subject: RE: [xsl] A list of useful functions that aren't in the core of xsl.
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 21 Mar 2003 06:00:17 -0800 (PST)
---- "bryan" <bry@xxxxxxxxxx> wrote:

> This is because they(the fxsl stylesheets) depend on a node-set()
> function which is an extension function under xslt 1.0
> 
> Exslt has a node-set() function in the exsl namespace so that one 
> could be processor independent, at least if processors used support 
> exsl.
> 
> The native xalan node-set() function is named nodeset() if I remember
> correctly (I keep saying that cause it's a hell of a long time since
I
> used xalan), which means that it is not name-compatible with others.
> 
> Most processors have node-set() so that if what one needs to do is 
> just use node-sets one can have the following
> 
> ns:node-set($mynode)
> and then bind the ns prefix to whichever node-set implementation one
> wants. 
> 
> Fxsl could have used fallbacks etc., I suppose, to make it all 
> processor independent, not sure why this wasn't done other than not 
> wasting processing power. 

I'm not using function-available() because I hate spaghetti-like code.

In XSLT 2.0 this problem will simply not exist. For XSLT 1.0 the
optimal solution will be to have just one FXSL edition for all XSLT
processors that implement exsl:node-set() (Saxon and Xalan do) and some
separate editions for some of the rest.

I should find some time to create an FXSL version for XSLT 2.0. Not
only the nasty RTF type is gone there, but one can use xsl:function so
it will be possible to express compactly in one XPath expression code
that now occupies many lines.

Another big expectation is that sequences will work a lot faster, which
(I hope) will make some costly operations with node-sets a lot faster
-- e.g. I expect adding an element at the start of a sequence to take
only O(1) time -- that is the previous sequence should be shared -- but
probably I hope too much as such behaviour is not likely to be demanded
by a future recommendation and will be left at the discretion of
individual implementors.

I have also to think how to implement in XSLT 2.0 lists of lists --
probably as a sequence of nodes, whose value is a sequence.

Probably Mike could comment on these?





=====
Cheers,

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

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

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


Current Thread