W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2006

Re: Default and Fixed Attribute declarations

From: George Cristian Bina <george@oxygenxml.com>
Date: Tue, 03 Oct 2006 10:17:55 +0300
Message-ID: <45220EA3.3030502@oxygenxml.com>
To: lists@jeffrafter.com
CC: xmlschema-dev@w3c.org

Xerces J implements this link to the spec (and oXygen exposes that in 
its interface) when reporting errors, in this case it points to
3.1 If there is among the {attribute uses} an attribute use with an 
{attribute declaration} whose {name} matches the attribute information 
item's [local name] and whose {target namespace} is identical to the 
attribute information item's [namespace name] (where an ·absent· {target 
namespace} is taken to be identical to a [namespace name] with no 
value), then the attribute information must be ·valid· with respect to 
that attribute use as per Attribute Locally Valid (Use) (§3.5.4). In 
this case the {attribute declaration} of that attribute use is the 
·context-determined declaration· for the attribute information item with 
respect to Schema-Validity Assessment (Attribute) (§3.2.4) and 
Assessment Outcome (Attribute) (§3.2.5).
which refers directly to 3.5.4 Attribute Use Validation Rules 
http://www.w3.org/TR/xmlschema-1/#cvc-au that Mike cited.

Best Regards,
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

Michael Kay wrote:
>> I did a quick check with XMLSpy 2006. It reports this as a 
>> validation error. So as you say, (a) is the answer.
> Really, trying out implementations is no way to find out what the spec says.
> The answer is in Schema Part 1 section 3.5.4:
> For an attribute information item to be.valid. with respect to an attribute
> use its .normalized value. must match the canonical lexical representation
> of the attribute use's {value constraint} value, if it is present and fixed.
> Given <xs:attribute name="foo" type="xs:string" fixed="bar" />, there is an
> attribute use with a {value constraint} that is fixed and has the value
> "bar". The .normalized value. of the attribute information item is "", which
> does not match.
> Michael Kay
> http://www.saxonica.com/
Received on Tuesday, 3 October 2006 07:17:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:11 UTC