W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2000

anonymous types and extensions

From: <Mike_Leditschke@nemmco.com.au>
Date: Thu, 21 Dec 2000 11:25:55 +1000
To: xmlschema-dev@w3.org
Cc: jwollas@ue.com.au
Message-ID: <OF82C25DD5.07FD019C-ON4A2569BC.00066175@nemmco.com.au>
The examples I have seen using the derivation by extension
mechanism have all used an existing type as the base. Is it
possible to use an anonymous type in this situation?

For example, if I wish to have an element with simple content
consisting of a 10 character string and having a single checksum
attribute taking a value between 0 and 9, is the following legal?
(XMLSpy doesn't think so).


  <element name="Simple">
             <restriction base="string">
               <length value="10"/>
           <attribute name="checksum" use="required">
               <restriction base="integer">
                 <minInclusive value="0"/>
                 <maxInclusive value="9"/>


<Simple checksum="5">abcdefghij</Simple>

I'm basically trying to avoid having to define a type for the simple
content of the element.

Received on Wednesday, 20 December 2000 20:31:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:48 UTC