On Wed, Sep 18, 2002 at 05:28:26PM +0100, Graham Mann wrote:

> I've been using the example DOMCount (with switches -n -s -v=always)
> from Xerces 2.1.0 to validate a document against a schema.
>
> I believe I've uncovered a problem with wildcard attributes and the
> processContents setting:
> 
> So for an element which has an attributes declared like
>       <xs:attribute name="Good" type="xs:NMTOKEN"/>
>       <xs:anyAttribute namespace="##other" processContents="strict"/>
> 
> Changing the schema setting for  processContents setting and
> validating a document like
>       <TESTELEMENT Good="OK" Bad="AlsoOK" OTHER_NS:WhatEver="49" />
> 
> Note there is no schema for the OTHER_NS

I believe that xerces is acting correctly in this case, if a little
unintuitively. The ##other in the anyAttribute definition is relative to
the 
  " targetNamespace [attribute] of the <schema> ancestor element
  information item "
  (http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#declare-openness
  referenced from
  http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-anyAttribute)


The namespace that the Bad attribute is in is the null namespace. It is
unlikely that your schema containing TESTELEMENT is in the null
namespace. In this case the Bad attribute is in another namespace. Hence
Bad should be treated the same as OTHER_NS:WhatEver, if you are using
##other, or ##any for your anyAttribute.

That said, your interpretation was what I expected until I read the spec
in detail. 

David
-- 
David Sheldon, Client Services        DecisionSoft Ltd.
Telephone: +44-1865-203192            http://www.decisionsoft.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to