W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2003

expand the capability of the <xsd:all> tag to maxOccurs="unbounded"

From: by way of <bartelh@itereu.de>
Date: Mon, 07 Jul 2003 14:49:06 -0600
Message-Id: <>
To: W3C XML Schema Comments list <www-xml-schema-comments@w3.org>

I propose to expand the capability of the <xsd:all> element such that the 
restriction of maxOccurs="1" is removed and maxOccurs="unbounded" becomes a 
legal attribute in the <xsd:all> element.

Atherwise it seems impossible to me to decribe simple data structures in 
which an element has 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 that 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.

Either I am missing something or is this a flaw in XML Schema version 1.0 
which should be corrected in XML Schema 1.1.

Hans-Werner Bartels                            Phone: +49 89 3299 4173
ITER Garching JWS                             Fax:     +49 89 3299 4313
2                                    e-mail:  bartelh@merlin.itereu.de
85748 Garching
Received on Monday, 7 July 2003 16:49:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:09:00 UTC