[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Order of elements in a complex-type

From: maddy pawar <madhuvanti@hotmail.com>
Date: Wed, 28 Nov 2001 20:40:30 +0800
To: <xmlschema-dev@w3.org>
Message-ID: <OE338VLiVeXRAllpXjK0000f73d@hotmail.com>
xml schema order of elements
 Hi Seema,
 Simply replace the "xsd:sequence" with "xsd:all"

> > How do I define it such that they may appear any number of times inside
> Form  in any sequence ?
 ..insert  maxOccurs="unbounded"
 so it becomes:

> > <xsd:complexType name="FormType" >
> > <xsd:all>
> > <xsd:element name="TextBox" type="TextBoxType" minOccurs="0"
> maxOccurs="unbounded"/>
> > <xsd:element name="TextArea" type="TextAreaType" minOccurs="0"
> maxOccurs="unbounded"/>
> > <xsd:element name="Header" type="HeaderType" minOccurs="0"
> maxOccurs="unbounded"/>
> > </xsd:all>
> > </xsd:complexType>
>
> Cheers!
> Maddy
> ----- Original Message -----
> From: "Seema Kumar" <2kseema@sun20.datamatics.com>
> To: <xmlschema-dev@w3.org>
> Sent: Wednesday, November 28, 2001 8:26 PM
> Subject: Order of elements in a complex-type
>
>
> > Hello all,
> >
> > I am relatively new to XML schema and am facing a few problems while
> > defnining complex types.
> >
> > Is there any mechanism where the order of elements in a complex-type may
> be
> > made immaterial in a complex-type defnition ?
> >
> > For eg  in the following defnition :
> > <xsd:complexType name="FormType" >
> > <xsd:sequence>
> > <xsd:element name="TextBox" type="TextBoxType" minOccurs="0"/>
> > <xsd:element name="TextArea" type="TextAreaType" minOccurs="0"/>
> > <xsd:element name="Header" type="HeaderType" minOccurs="0"/>
> > </xsd:sequence>
> > </xsd:complexType>
> >
> > the schema parser expects the elements TextBox, TextArea and Header to
> > appear in the same sequence.
> > How do I define it such that they may appear any number of times inside
> Form
> > in any sequence ?
> > Thanks in advance.
> >
> > Bye
> > Seema
> >
> >
> >
>
Received on Wednesday, 28 November 2001 08:36:41 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.