Re: Need string-compare()

John,

Without discussing the utility of the function itself, I think the 
process of adding potentially useful XPath function to XForms just as 
they come up is broken. Of course we've been doing this in the past 
already. This is not what I would call "designing a function library".

This would be ok if functions were always in a namespace, or if there 
was a rigorous effort to backport the XPath 2.0 function library to 
XPath 1.0, but we haven't done any of this so far. One risk is that we 
keep polluting the space of function names.

BTW XPath 2.0 has a compare() function that does exactly this.

-Erik

John Boyer wrote:
> 
> XPath has a string-length() function.  It also has comparators, but the 
> less-than operator always uses numbers only, never strings.
> 
> This means we cannot use the new Xforms 1.1 while attribute to sort data 
> unless we also have a string-compare() function.
> 
> We also cannot find the proper place where new data should be inserted 
> into an ordered list.
> 
> Must be all those extension libraries and XPath 2 users that have 
> resulted in this not floating up in priority, but it should be part of 
> the core language.
> 
> Cheers,
> John


-- 
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/

Received on Wednesday, 14 February 2007 09:57:57 UTC