473,474 Members | 1,324 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Occurrence problem

Hello,

I cannot find a schema structure that would accommodate the following
occurence and ordering restrictions. Please note that this is only an
example and that a typical RootElement has around 20 children element.
<xs:element name="RootElement">
<xs:complexType mixed="true">
<xs:???>
<xs:element ref="A" minOccurs="0" />
<xs:element ref="B" minOccurs="0"/>
<xs:element ref="C" minOccurs="1"/>
<xs:element ref="D" minOccurs="1"
maxOccurs="unbounded"/>
<xs:element ref="E" minOccurs="1"/>
<xs:element ref="F" minOccurs="0"/>
</xs:???>
</xs:complexType>
</xs:element>

In the xml document being validated, elements appear in no particular
order.

would anyone have a schema patern that would meet these criteria?

Thanks

Martin
Jul 20 '05 #1
3 1368
ma**************@gmail.com (Martin Perreault) writes:
<xs:element name="RootElement">
<xs:complexType mixed="true">
<xs:???>
<xs:element ref="A" minOccurs="0" />
<xs:element ref="B" minOccurs="0"/>
<xs:element ref="C" minOccurs="1"/>
<xs:element ref="D" minOccurs="1"
maxOccurs="unbounded"/>
<xs:element ref="E" minOccurs="1"/>
<xs:element ref="F" minOccurs="0"/>
</xs:???>
</xs:complexType>
</xs:element>


?? -> all
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Jul 20 '05 #2
I think <xs:all> doesn't support "unbounded".

Martin

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #3
Hi Martin,

You're right - you can't use maxOccurs="unbounded" with xs:all.

Your choices would be to
1. specify that they must appear in order
2. use a repeating choice group, which can't enforce that any of the
elements are required
3. put in an extra level, e.g. a <DList> element that contains all the
<D> elements as children.

Hope that helps,
Priscilla
-----------------------------------------------------
Priscilla Walmsley
Author, Definitive XML Schema (Prentice Hall PTR)
http://www.datypic.com
-----------------------------------------------------

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: pulu | last post by:
Hi, In the datawarehouse DB (under MS commerce server 2002) a table stores the referer domain name. Table structure is like refererdomainid <binary>,domainInternalFlag...
1
by: Robert | last post by:
How can I query an existing table and update a field in each record in the table with the occurrence count of each record e.g. update field to 1 (= first record occurrence), update field to 2 for...
5
by: comp.lang.php | last post by:
$orderBy = 's.app_date desc, s.last_name asc, s.first_name asc, s.mi asc'; if ($_REQUEST) { $ascArray = array('asc' => 'desc', 'desc' => 'asc'); // ARRAY OF ALL ORDERING POSSIBILITIES $junk =...
8
by: sherifffruitfly | last post by:
Hi, I've been searching as best I can for this - coming up with little. I have a file that is full of lines fitting this pattern: (?<year>\d{4}),(?<amount>\d{6,7}) I'm likely to get a...
10
by: tkpmep | last post by:
For any list x, x.index(item) returns the index of the FIRST occurrence of the item in x. Is there a simple way to identify the LAST occurrence of an item in a list? My solution feels complex -...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.