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

[F&O] Function root() and static typing

From: Dimitre Novatchev <dnovatchev@yahoo.com>
Date: Thu, 27 Nov 2003 11:22:49 -0800 (PST)
Message-ID: <20031127192249.19637.qmail@web41109.mail.yahoo.com>
To: public-qt-comments@w3.org

fn:root() is defined as follows:

"14.1.9 fn:root
fn:root() as node() 
fn:root($arg as node()?) as node()? "

The examples in end with the following sentence:


We could make the final three examples type-safe by wrapping their
operands with fn:exactly-one()."

This is the correct way to define a function without sacrificing its type
definition by allowing node()* as done elsewhere (see my comments in this
list on this anomaly in the definition of min(), max() and avg()).

I want to congratulate the authors for the correct definition and examples
of fn:root().

I strongly recommend that all other function definitions, in which the
type definitions are severely underspecified by allowing node()* or 
item()* (and which alters the normally accepted behaviour of these
functions and makes them less meaningful and actually defeats the purpose
of type-checking) be defined properly as this is done with the function

Once again -- congratulations for the correct function definition.

Thank you.

Dimitre Novatchev.

Do you Yahoo!?
Free Pop-Up Blocker - Get it now
Received on Thursday, 27 November 2003 14:25:12 UTC

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