This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Comp-notation-*, while it should be possible to infer the types correctly, unfortunately fail to static type check when following the rules in the formal semantics due to a quantifier mismatch (: Name: Comp-notation-1 :) (: Written by: Andreas Behm :) (: Description: notation comparison :) (: insert-start :) import schema namespace myns="http://www.example.com/notation"; declare variable $input-context as document-node(schema-element(myns:allTypes)) external; (: insert-end :) fn:not($input-context//*:NOTATION1 eq $input-context//*:NOTATION3) // normalizes to descendant-of-self() [FS 4.2] This always has quantifier '*' [FS 8.2.2.1.8] The step expression becomes a FLWOR expression [FS 4.2] This returns a type with the quantifier of the descendant-or-self() [FS 4.8.2] statEnv |- Expr1 : Type1 ... ------------------------- statEnv |- for $VarName1 in Expr1 return Expr2 : Type2 ยท quantifier(Type1) Therefore the static typing of the path expression will always have the '*' quantifier which causes a static typing exception with the operators, like eq, which expect a quantifier of one. If should theoretically be possible to infer a type without the '*' quantifier for the descendant-or-self() step in these tests due to the schema information, so I can report this as a bug in the Formal Semantics instead if people think that is more appropriate. Otherwise, could // be replaced by the full path?
A fix has been attempted in CVS, XQTS_current.zip is updated. If the resolution is satisfactory, feel free to change status to CLOSED. Otherwise, reopen this report. If no feedback is returned within two weeks, status will be changed to CLOSED. Thanks for reporting!
Thanks. All of them looked fixed except Comp-notation-11 which doesn't parse (missing right parenthesis); I think also the first exactly-one is in the wrong place (should be inside the boolean?)
comp-notation-11 seems to parse OK, but it is now comparing a boolean to a notation because the parens are in the wrong place. (When I see queries that have been made as unreadable as this, I really wonder what attraction anyone sees in implementing the static typing rules.)
*** Bug 5056 has been marked as a duplicate of this bug. ***
A fix has been attempted in CVS, XQTS_current.zip is updated. If the resolution is satisfactory, feel free to change status to closed. Otherwise reopen this report. If no feedback is given within two weeks, status will be set to closed.
Thanks. It now works.