W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2001

"default" and "ref" with attributes

From: Gesmann, Dr., Michael <Michael.Gesmann@softwareag.com>
Date: Fri, 4 May 2001 13:28:20 +0200
Message-ID: <2B1792E820ACD411AD5A00508BF9A3FC01FFAFDB@daemsg03.software-ag.de>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
I'm trying to understand the meaning of "default" and "fixed" when defining
attributes.

This is, what I hope is correct:
Attribute declarations can define "default" or "fixed" values, independent
of whether it is a global (parent is schema) or a local (parent is not
schema) declaration. In particular, this is also possible for referencing
attribute declarations i.e. the "ref" attribute is present (src-attribute).
If referencing and global attribute declaration have a value constraint and
one describes as fixed value, the other value constraint must also describe
the same fixed value (au-props-correct.2). 

Now my question:
What is the correct semantics if global and local "default" values are
different? 
E.g. <xs:attribute name="myAttr" default="myValue1" .../> 
and in some other place: <xs:attribute ref="myAttr" default="anotherValue"
... >
(Is this described in the XML-Schema Rec., if yes where?)


While trying to understand this and comparing "default" and "fixed" between
attribute and element declarations, another question came up:
Why does XML-Schema allow for definition of "default" and "fixed" values in
referencing attribute declarations but not in referencing element
declarations?

Regards and many thanks for help

	Michael
Received on Friday, 4 May 2001 07:28:38 GMT

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