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>
Hi,
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:all>

<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:all>

<xsd:sequence>

<xsd:any namespace="##any" processContents="skip" minOccurs="0"
maxOccurs="unbounded"/>

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

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

</xsd:sequence>

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

</xsd:complexType>

 
Thank you very much in advance.
 
Boris.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

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