You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by David Sheldon <dw...@decisionsoft.com> on 2002/09/20 18:04:14 UTC
Re: Process content for attributes
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: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org