Hello,

 try to make them members of the substitution group of the EmbeddedFile
element.

Cheers
          Radovan


Radovan Chytracek                     CERN, Division IT/API, Geant4
Collaboration
e-mail: [EMAIL PROTECTED]     WWW: http://home.cern.ch/chytrace
phone:  +41 22 76 78871               fax: +41 22 76 78630


-----Original Message-----
From: David Schulze [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 20, 2002 8:50 PM
To: [EMAIL PROTECTED]
Subject: Elements allowed anywhere


I want to define an element in my schema that is allowed to wrap any other
element(s).  I have been wrapping all my other elements with refs to the
"anywhere element"
like the example below.  EmbeddedFile is an element that can come before,
after, (not at all) or in the middle of any of the other elements.  Problem
with this approach is that I have to put refs to EmbeddedFile in the
definition of every other element in my schema.

        <xsd:complexType name="VolumeType">
                <xsd:sequence>
                        <xsd:element ref="EmbeddedFile" minOccurs="0"
maxOccurs="unbounded"/>
                        <xsd:element ref="MetaData" minOccurs="0"
maxOccurs="1"/>
                        <xsd:element ref="EmbeddedFile" minOccurs="0"
maxOccurs="unbounded"/>
                        <xsd:element ref="Driver" minOccurs="0"
maxOccurs="unbounded"/>
                        <xsd:element ref="EmbeddedFile" minOccurs="0"
maxOccurs="unbounded"/>
                </xsd:sequence>
                <xsd:attribute name="id" type="IDAttribType"
use="required"/>
                <xsd:attribute name="label" type="LabelAttribType"
use="optional"/>
                <xsd:attribute name="version" type="VersionAttribType"
use="optional"/>
        </xsd:complexType>

I'm hoping that someone knows a better way to express this.

Thanks
David Schulze
DeLorme Mapping
Yarmouth, ME, USA


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to