W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2003

XML Schema for multiple elements in arbitrary order

From: Hans-Werner Bartels <bartelh@itereu.de>
Date: Thu, 03 Jul 2003 09:25:40 +0200
Message-Id: <5.0.2.1.2.20030703092004.02983db0@194.59.170.38>
To: xmlschema-dev@w3.org
I am wonder ing if XML Schema can be used to decribe XML data structures 
with elements which have at least 2 different child elements which may 
occur more than once in arbitrary order. To give an example from XHMTL:

1. version of a <p> element:
<p>This is a <b>paragraph</b> with <b>bold</> and <u>underlined</u>content. 
It seems <u>impossible</u> to properly decribe this in XML schema.</p>

2. version of a <p> element
<p>This is a <u>paragraph</u> with <b>bold</> and <u>underlined</u>content. 
It seems <u>impossible</u> to properly decribe this in XML schema.</p>

My problem is the the <xsd:sequence> tags would request a knowledge of the 
exact sequence of <b> and <u> tags which is impossible. The only way would 
be to use the <all> tag, but then I am only allowed to use 1 occurance of 
<b> or <u> which seems to be an unacceptable restriction. Or I can use the 
<xsd:any> tag but then validation becomes meaningless.

Am I missing something or is this a flaw in XML Schema?






Hans-Werner Bartels                            Phone: +49 89 3299 4173
ITER Garching JWS                             Fax:     +49 89 3299 4313
Boltzmannstr. 
2                                    e-mail:  bartelh@merlin.itereu.de
85748 Garching
Germany
Received on Thursday, 3 July 2003 04:52:23 GMT

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