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

error in specifications?

From: Forge <forge@neonics.com>
Date: Wed, 28 Mar 2001 17:40:35 +0000 (UTC)
To: xmlschema-dev@w3.org
Message-ID: <Pine.LNX.4.21.0103281736080.531-100000@fire>

Hi there,

I checked the xml specs and it says:

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?))))
</complexType>


Which means to me that the following is valid:

<xsd:complexType name="bla">
  <xsd:simpleContent>
    <xsd:restriction ....>
  </xsd:simpleContent>
  <xsd:attribute name="..."/>
</xsd:complexType>

However, XMLSpy does not think so.. 


Then I found this example:

<xs:complexType name="length1">
 <xs:simpleContent>
  <xs:extension base="xs:non-negative-integer">
   <xs:attribute name="unit" type="xs:NMTOKEN"/>
  </xs:extension>
 </xs:simpleContent>
</xs:complexType>


Is XMLSpy wrong?

Then:

I just wish to declare a tag like  <blah blah="blah">blah</blah>

This is not possible with an anonymous complexType definition. How come?

What I would like to do is:

<element name="blah" type="xsd:string">
  <complexType>
    <xsd:attribute ...>
  </complexType>
</element>

but this is not possible if element is not below the root node (haven't
tested it when it's below the root node, however..)

Any clarifications on this?

Thanks a lot!
Received on Wednesday, 28 March 2001 10:32:44 GMT

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