[Bug 5288] [XQuery] XPST0005 and conditional expressions

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 UTC