W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2002

RE: Attribute Uses

From: John Verhaeg <jverhaeg@metamatrix.com>
Date: Fri, 7 Jun 2002 09:55:02 -0500
Message-ID: <C7CDD3E67B05D411A45800E018C1614E7D5E56@mail>
To: "'Jeni Tennison'" <jeni@jenitennison.com>, xmlschema-dev@w3.org, ht@cogsci.ed.ac.uk

I hadn't gotten to the Attribute Use Correct constraint yet, so now that
you've pointed that out, everything makes a bit more sense.  So just to
verify, it now appears to me that XML Spy does indeed have a problem in that
it allows you to both change the fixed value specified in a global
declaration to another value, and it also allows you to specify a default
value in a "use" when the declaration contains a fixed value.  Does this
sound correct?

John P. A. Verhaeg
JVerhaeg@MetaMatrix.Com
MetaMatrix, Inc.
11477 Olde Cabin Road Suite 400
Creve Coeur, MO 63141
(314) 739-3190 x150


-----Original Message-----
From: Jeni Tennison [mailto:jeni@jenitennison.com]
Sent: Friday, June 07, 2002 5:31 AM
To: xmlschema-dev@w3.org; ht@cogsci.ed.ac.uk
Cc: John Verhaeg
Subject: Re: Attribute Uses


Henry wrote:
> Misunderstanding: In the interesting case, i.e. where there is a local use
> with a ref to a global attr decl:
>
>   1) If the global has a fixed value, the local must have the same fixed
>   value, or no fixed or default at all.  In either case the fixed
>   value will be enforced.
>
>   2) When restrictions are checked, the same fallback is applied to
>   ensure that no change of fixed value occurs

Ah, right, thanks. I'd missed the fact that in Validation Rule:
Attribute Locally Valid
(http://www.w3.org/TR/xmlschema-1/#cvc-attribute), the attribute is
being checked against the {value constraint} of the attribute
*declaration*, and that there is a separate check against the {value
constraint} of the attribute *use* in Validation Rule: Attribute
Locally Valid (Use) (http://www.w3.org/TR/xmlschema-1/#cvc-au).

I'd also missed the Schema Component Constraint: Attribute Use Correct
(http://www.w3.org/TR/xmlschema-1/#au-props-correct) which states
that the attribute use must have the same value for its value
constraint it the attribute declaration's value constraint is fixed.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Friday, 7 June 2002 10:55:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:31 GMT