deriving mixed content types

Hi all,

I am wondering whether the derivation by extension constructs of the XML
schemas below are correct:

SCHEMA 1 defines a DIDBaseType, and several Complex Types (e.g.
didmodel:StatementType) derived by extension from the DIDBaseType.

SCHEMA 2 defines several Complex Types (e.g. didl:StatementType) derived
by extension from the like-named (didmodel) Complex Types in Schema 1.

Derivation by extension can be used to append new content after the
content of the base type; however - if not mistaken - the structure of the
base type must be kept unchanged. As such, it is not possible to derive a
mixed content model from an element-only content model (and vice versa).

The content type of the base type definition of SCHEMA 1 below is empty.
Is it correct to derive (by extension) a content type 'mixed' of a base
type definition with an empty content type? Can someone point me to the
clause of the W3C XML Schema spec confirming/forbidding the below
extension constructs?

Many thanks
Best regards
Jeroen Bekaert


SCHEMA 1:
....
<complexType name="DIDBaseType" abstract="true"/>
....
<element name="Statement" type="didmodel:StatementType" abstract="true"/>
<complexType name="StatementType">
  <complexContent>
    <extension base="didmodel:DIDBaseType"/>
  </complexContent>
</complexType>
....


SCHEMA 2 (imports SCHEMA 1):
....
<element name="Statement" type="didl:StatementType"
    substitutionGroup="didmodel:Statement"/>
<complexType name="StatementType" mixed="true">
  <complexContent mixed="true">
    <extension base="didmodel:StatementType">
      <sequence>
        <any namespace="##any" processContents="lax" minOccurs="0"/>
      </sequence>
      <attribute name="mimeType" type="string" use="required"/>
      <attribute name="ref" type="anyURI"/>
    </extension>
  </complexContent>
</complexType>
....


--
Digital Library Research and Prototyping team
Los Alamos National Laboratory
PO Box 1663, MS P362
Los Alamos, NM, 87545, USA
tel. +1 (505) 664 0580

Received on Wednesday, 16 March 2005 06:46:35 UTC