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

unbounded element within an <all> tag

  • From: Stefán F. Stefánsson <stefanf@s...>
  • To: xml-dev@l...
  • Date: Fri, 12 Oct 2001 10:08:11 +0000

xsd all unbounded
Hello all.

I've been going out of my mind trying to figure this one out... and I've
seen it asked elsewhere but I could not for the life of me find an
answer to it.

I just do not understand why I haven't been able to find an answer to
this question... this must be a FAQ.

My question is:

How can I define an XML Schema that defines an element which has certain
child elements and I need them all to appear but don't want to constrain
the order of the children (so far this is just <xsd:all> but here's the
twist) but I want one (or more...) of the elements to appear 0 or more
times (not constrained to only one time as the <all/> does).

Here's an example that describes what I want (only problem is that it's
illegal... so I can't have it):

<xsd:complexType name="foo">
  <xsd:all>
    <xsd:element name="bar1" type="someType"/>

    <!-- The following line produces an error because "unbounded" is not
allowed within an all tag -->
    <xsd:element name="bar2" type="someType" minOccurs="0"
maxOccurs="unbounded"/>

    <xsd:element name="bar3" type="otherType"/>
    <xsd:element name="bar4" type="thirdType"/>
  </xsd:sequence>
</xsd:complexType> 

There must be some way to do this right?  I feel very bad that I haven't
found it yet :(.

Can you please help?

Kind regards,
	Stefan Freyr

--------------------------------------------
Stefan Freyr Stefansson
Software Developer
deCODE Genetics, Inc.
http://www.decode.com

Phone: (+354) 570 2854
GSM:   (+354) 861 1718
Fax:   (+354) 491 3782
BEGIN:VCARD
VERSION:2.1
N;ENCODING=QUOTED-PRINTABLE:;=01
REV:20001030T115142Z
END:VCARD

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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-2013 All Rights Reserved.