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

re
http://lists.w3.org/Archives/Public/public-qt-comments/2003Jun/0082.html
http://lists.w3.org/Archives/Public/public-qt-comments/2003Jun/thread.html#82

Hi

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
$position])

[[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 
have.

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

Tobi

-- 
http://www.pinkjuice.com/
Received on Thursday, 12 June 2003 09:25:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:26 GMT