Oxygen XML Editor
 
[XML-DEV Mailing List Archive Home] [By Thread] [By Date]

Another XML Schema one....


  • To: "'xml-dev@lists. xml. org'" <xml-dev@...>
  • Subject: Another XML Schema one....
  • From: Soren Kuula <dongfang@...>
  • 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 = boolean : false
  block = (#all | List of (extension | restriction))
  final = (#all | List of (extension | restriction))
  id = ID
  mixed = boolean : false
  name = NCName
  {any attributes with non-schema namespace . . .}>
  Content: (annotation?, (simpleContent | complexContent | ((group | all | choice | sequence)?, ((attribute | attributeGroup)*, anyAttribute?))))

-- the type definition, aaaaand

<restriction
  base = QName
  id = ID
  {any attributes with non-schema namespace . . .}>
  Content: (annotation?, (simpleType?, (minExclusive | minInclusive | maxExclusive | maxInclusive | totalDigits | fractionDigits | length | minLength | maxLength | enumeration | whiteSpace | pattern)*)?, ((attribute | attributeGroup)*, anyAttribute?))
</restriction>

<extension
  base = QName
  id = ID
  {any attributes with non-schema namespace . . .}>
  Content: (annotation?, ((attribute | attributeGroup)*, 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



 
© 2002-2008 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy
This website was created & generated with <oXygen/> XML Editor