W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2008

[Bug 5288] [XQuery] XPST0005 and conditional expressions

From: <bugzilla@wiggum.w3.org>
Date: Wed, 23 Jan 2008 14:52:39 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1JHgxz-0001rW-PA@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5288





------- Comment #3 from tim@cbcl.co.uk  2008-01-23 14:52 -------
Another problem with it is that it makes the XQuery Formal Semantics very
fragile.

e.g. consider the static typing rule for fs:item-sequence-to-node-sequence

statEnv |-  Type <: attribute*,
(element|document|text|processing-instruction|comment|xs:string| xs:float|
...|xs:NOTATION)*
---------------------------------------------------------------------------
statEnv |-  (FS-URI,"item-sequence-to-node-sequence") (Type) : attribute*,
(element|text|processing-instruction|comment)*

Imagine we were to add a specialization of this rule for the case where Type is
empty-sequence().  The corresponding return type would be empty-sequence().  

Introduce such a rule and suddenly XPST00005 is thrown when you create an empty
element, e.g. <foo />.
Received on Wednesday, 23 January 2008 14:52:50 GMT

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