This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The expression count((document {()})/..) is testing document has an empty parent. The formal semantics state statEnv |- axis parent:: of DocumentType : empty Therefore I think we can infer this during static analysis and it is valid to throw [err:XPST0005].
Similarly in fn-name-16 for $h in ($input-context1/works/employee[2]) return fn:count(fn:name($h/self::div)) $h has a static type of "element employee" $h/self::div is expecting "element div" so the expression types as empty (8.2.3.1.1 of the formal semantics is the relevant section) Therefore I think [err:XPST0005] is valid (and is effectively what the test is trying to test - but in a dynamic fashion)
Nick: Correct. Changed the catalog entry for "fn-name-16" to reflect your suggestion. "Constr-docnode-parent-1" seems to have the same illness. Changed the entry as well. Please close the bug if in agreement. Thanks, Carmelo
fn-name-16 seems to be fixed in the latest catalog file, but Constr-docnode-parent-1 doesn't appear to be changed. Nick