W3C home > Mailing lists > Public > public-qt-comments@w3.org > June 2003

Re: SAG-FO-01: Too many functions (general comment)

From: Tobias Reif <tobiasreif@pinkjuice.com>
Date: Thu, 12 Jun 2003 15:25:36 +0200
Message-ID: <3EE87F50.10100@pinkjuice.com>
To: public-qt-comments@w3.org



I am a developer; not an implementer but a user of XSLT and XPath. If 
the WG would scrap all those functions, I could implement them myself, 
in XSLT+XPath, but they wouldn't be as fast as they could be when they 
are implemented by the XSLT processor (or other XPath implementation), 
eg in C or C++.
And I'd have to ship my implementation with each of my XSLT apps.

Thus the WG should continue to design and specify a comprehensive 
standard library of useful functions.
(Else, initiatives like EXSLT will.)
A very small set of functions would leave too much to be desired on the 
side of the "user" (developer, not implementer).

Really redundant stuff like context-item() can be deleted.

But empty(), ends-with(), exists(), index-of(), insert-before(), 
item-at(), remove(), subsequence(), etc (plus possible future additions) 
are *not* "trivial syntactic sugar", but are a lot more expresive and 
clear than alternatives you list such as

for $i in 1 to count($s) return
       if ($s[$i] eq $v) then $i else ()

[[for index-of()]]

($target[position() lt $position], $inserts, $target[position() ge

[[for insert-before()]]

The intent is expressed more directly; this aids maintainability. 
subsequence() for example is very handy and expresses the intend nicely 
(pretty "self-documenting") when iterating over a sequence by recursing, 
when calling the current function with the rest of the sequence.

If implementers feel that implementing the whole lib is too much work, 
(remember that after having listed cost of implementation as major 
motivation for your request, for nearly every functuion you emphasize 
how simple it is to implement) then the spec could define an additional 
type of conformance level (in addition to schema-aware and -unaware):
One category of XSLT processors which implement the standard lib, and 
the other category of processors which do not. This should satisfy all 
the requirements or wishes of vendors such as those Software AG seems to 

Then let each user decide which type of processor is more useful for him.


Received on Thursday, 12 June 2003 09:25:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:12 UTC