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

[F&O] 15.1 zero-or-one, one-or-more, exactly-one

From: Dimitre Novatchev <dnovatchev@yahoo.com>
Date: Sat, 22 Nov 2003 04:53:13 -0800 (PST)
Message-ID: <20031122125313.8531.qmail@web41115.mail.yahoo.com>
To: public-qt-comments@w3.org

Section 15.1 Functions and Operators on Sequences defines the
functions  zero-or-one(), one-or-more(), exactly-one().

The function definitions are:

   fn:zero-or-one($srcval as item*) as item?
   fn:one-or-more($srcval as item*) as item+
   fn:exactly-one($srcval as item*) as item

The main purpose of these functions is to raise an error if the property
they name is not true for the parameter-sequence. 

Such functions are not necessary and useful, because, had their type been
specified as:

   fn:zero-or-one($srcval as item?) as item?
   fn:one-or-more($srcval as item+) as item+
   fn:exactly-one($srcval as item) as item

then the error would be raised automatically if $srcval was not of the
correct type.

Such automatic errors would be raised for any function when passed
parameters not matching the defined types of its arguments -- therefore
the above three functions are not necessary at all.

Solution: remove the functions fn:zero-or-one(), fn:one-or-more() and

Dimitre Novatchev

Do you Yahoo!?
Free Pop-Up Blocker - Get it now
Received on Saturday, 22 November 2003 07:53:20 UTC

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