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 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.
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.
I am closing this as INVALID, since I believe the test is correct. Please reopen with an explanation if you don't agree.