- To: "'xml-dev@lists. xml. org'" <xml-dev@l...>
- Subject: Another XML Schema one....
- From: Soren Kuula <dongfang@d...>
- Date: Tue, 13 Dec 2005 01:56:16 +0000
- User-agent: Mozilla Thunderbird (X11/20050322)
Hi there,
It appears to me that simple content complex types can have attributes
(apart from any inherited ones) declared in two different places:
<complexType
abstract = http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#boolean : false
block = (#all | List of (extension | restriction))
final = (#all | List of (extension | restriction))
id = http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#ID
mixed = http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#boolean : false
name = http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#NCName
{any attributes with non-schema namespace . . .}>
Content: (http://www.w3.org/TR/xmlschema-1/#element-annotation?,
(http://www.w3.org/TR/xmlschema-1/#element-simpleContent
| http://www.w3.org/TR/xmlschema-1/#element-complexContent
| ((http://www.w3.org/TR/xmlschema-1/#element-group | http://www.w3.org/TR/xmlschema-1/#element-all
| http://www.w3.org/TR/xmlschema-1/#element-choice | http://www.w3.org/TR/xmlschema-1/#element-sequence)?,
((http://www.w3.org/TR/xmlschema-1/#element-attribute
| http://www.w3.org/TR/xmlschema-1/#element-attributeGroup)*,
http://www.w3.org/TR/xmlschema-1/#element-anyAttribute?))))
-- the type definition, aaaaand
<restriction
base = http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#QName
id = http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#ID
{any attributes with non-schema namespace . . .}>
Content: (http://www.w3.org/TR/xmlschema-1/#element-annotation?,
(http://www.w3.org/TR/xmlschema-1/#element-simpleType?,
(http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#element-minExclusive
| http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#element-minInclusive
| http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#element-maxExclusive
| http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#element-maxInclusive
| http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#element-totalDigits
| http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#element-fractionDigits
| http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#element-length
| http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#element-minLength
| http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#element-maxLength
| http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#element-enumeration
| http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#element-whiteSpace
| http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#element-pattern)*)?,
((http://www.w3.org/TR/xmlschema-1/#element-attribute
| http://www.w3.org/TR/xmlschema-1/#element-attributeGroup)*,
http://www.w3.org/TR/xmlschema-1/#element-anyAttribute?))
</restriction>
<extension
base = http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#QName
id = http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#ID
{any attributes with non-schema namespace . . .}>
Content: (http://www.w3.org/TR/xmlschema-1/#element-annotation?,
((http://www.w3.org/TR/xmlschema-1/#element-attribute
| http://www.w3.org/TR/xmlschema-1/#element-attributeGroup)*,
http://www.w3.org/TR/xmlschema-1/#element-anyAttribute?))
</extension>
-- in the restriction or extension, of
present.
I wonder if you can use both at the same
time, kind of cumulatively, and, if there is a conflict (same-name attr
declared in both), which has the final say?
Thanks.
Søren
|
|