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

problems in elements definitions

From: Korenfeld, Boris <Boris_Korenfeld@icomverse.com>
Date: Mon, 30 Jul 2001 04:40:05 -0400 (EDT)
Message-ID: <767720C6032ED511AE8C00508BE3518E488245@ISMAILWEB>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
I have two problems. Both problems concerns protocol Xmtp:
1) I have an element called "Body". I want to define that this element can
contain CDATA (type) or element with name "Parts".
    How I can define it ?
2) there are known mime headers in Mime format like "subject", "to", "from".
But there are also user defined headers that can have any name.
    if I define known headers and after it element "any" so every XML passes
validation. And I just want that in the begining of XML will be permitted 
    known headers after that any element and after that "Body" element. In
the following schema everything is permitted when "any" element appears.
    How can I change the situation ?
<xsd:complexType name="MimeType">


<xsd:element ref="Content-Type" minOccurs="0"/>

<xsd:element ref="Content-Transfer-Encoding" minOccurs="0"/>

<xsd:element ref="Date" minOccurs="0"/>

<xsd:element ref="From" minOccurs="0"/>

<xsd:element ref="Importance" minOccurs="0"/>

<xsd:element ref="Subject" minOccurs="0"/>

<xsd:element ref="To" minOccurs="0"/>



<xsd:any namespace="##any" processContents="skip" minOccurs="0"

<xsd:element ref="Flags" minOccurs="0"/>

<xsd:element ref="Body" minOccurs="0"/>


<xsd:attribute name="size" type="xsd:nonNegativeInteger"/>


Thank you very much in advance.

Received on Wednesday, 22 August 2001 05:43:29 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:52 UTC