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 14.1.9.1 end with the following sentence:

"Note:

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
fn:root().


Once again -- congratulations for the correct function definition.

Thank you.

Dimitre Novatchev.





__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
Received on Thursday, 27 November 2003 14:25:12 GMT

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