XML Schema for multiple elements in arbitrary order

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 UTC