This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 3867 - Static type checking of Constr-docnode-parent-1
Summary: Static type checking of Constr-docnode-parent-1
Status: RESOLVED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 1.0.1
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-26 12:30 UTC by Nick Jones
Modified: 2007-01-22 12:42 UTC (History)
0 users

See Also:


Attachments

Description Nick Jones 2006-10-26 12:30:16 UTC
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].
Comment 1 Nick Jones 2006-10-26 16:27:44 UTC
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)
Comment 2 Carmelo Montanez 2006-12-13 16:06:41 UTC
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
Comment 3 Nick Jones 2007-01-22 12:42:21 UTC
fn-name-16 seems to be fixed in the latest catalog file, but Constr-docnode-parent-1 doesn't appear to be changed.

Nick