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

deriving mixed content types

From: jeroen bekaert <jbekaert@lanl.gov>
Date: Tue, 15 Mar 2005 23:46:07 -0700 (MST)
Message-ID: <54450.>
To: xmlschema-dev@w3.org

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

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

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

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:07 UTC