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 8098 - test ValLax/vallax-ins-004 should not rise an error
Summary: test ValLax/vallax-ins-004 should not rise an error
Status: RESOLVED INVALID
Alias: None
Product: XQuery Update Facility Test Suite
Classification: Unclassified
Component: XQuery Update Facility Test Suite (show other bugs)
Version: 1.0.0
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-27 23:04 UTC by Cezar Andrei
Modified: 2009-11-05 11:18 UTC (History)
0 users

See Also:


Attachments

Description Cezar Andrei 2009-10-27 23:04:12 UTC
The test is inserting attribute 'trash' in ITEM element. The ITEM has the type itemType which is a complex type using:
<xs:anyAttribute namespace="##other" processContents="lax"/>
Since trash attribute is not in the http://ns..../books namespace, it is allowed, i.e. the validation should pass without errors.

I think that the query should not rise an error.
Comment 1 Michael Kay 2009-10-28 14:48:07 UTC
I think you have misunderstood the meaning of namespace="##other". It allows attributes that are in a namespace other than the target namespace. It does not allow attributes that are in no namespace.

Referring to XSD 1.0 section 3.10.2, the {namespace constraint} of the attribute wildcard is "not http://../books". The rule "wildcard allows namespace name" in 3.10.4 then tells us that:

2 All of the following must be true:
2.1 The constraint is a pair of not and a namespace name or ·absent· ([Definition:]  call this the namespace test).
2.2 The value (i.e. the namespace) must not be identical to the ·namespace test·.
2.3 The value must not be ·absent·.

In this case the namespace is ·absent·, so 2.3 fails, so the attribute fails to match the wildcard.

Comment 2 Michael Kay 2009-11-05 11:18:18 UTC
I am closing this as INVALID, since I believe the test is correct. Please reopen with an explanation if you don't agree.