[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Another XML Schema one....

  • 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)

schema one
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



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.