Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Combining maxOccurs="unbounded" with all indicator

From: Frans Englich <frans.englich@-----.--->
To: Jeni Tennison <jeni@------------.--->
Date: 11/1/2004 5:55:00 PM
On Monday 01 November 2004 13:26, Jeni Tennison wrote:
> Hi Frans,

Hello Jeni,

Thanks for your extensive reply.

>
> > How do I achieve this -- allow multiple unbounded elements to be
> > freely mixed with each others and simple elements?
>
> This is probably the most frequent of FAQs.
>
> DTDs have a similar restriction, and the traditional approach is to
> define the model using something like:
>
>   ((include | group)*, kcfgfile, (include | group)*)
>
> However, this allows zero <include> or <group> elements. To get the
> minimum of one for both of these elements requires a content model
> that's really quite complex, although if you use groups that will make
> it easier to specify.
>
> Another approach is to accept that you can't express this constraint
> using XML Schema and instead use a more forgiving content model, such
> as:
>
>   (include | kcfgfile | group)*
>
> and express the extra constraints about the number of times each of
> these elements can appear in a separate schema language, such as
> Schematron.
>
> Or you can define the content model with order constrained, as in:
>
>   (include+, kcfgfile, group+)
>
> and use a (XSLT) transformation to get from your unordered XML to an
> ordered XML which you then validate against the schema.
>
> Or you can change your markup language so that you only accept the
> elements in a constrained order.
>
> Or you can change your schema language to RELAX NG, which supports
> this kind of constraint very easily.

In other words, one _have_ to use other technologies in order to solve my 
case. And I who switched from DTD to XML Schema in order to get rid of 
exactly this problem.

Why does this limitation exist in the XML Schema? Wasn't it a known limitation 
in the DTD language..? Will this be fixed in future versions? (perhaps this 
is documented somewhere)


Cheers,

		Frans


From ekimber@i... Mon Nov 01 20:51:57 2004
Received: from lisa.w3.org ([128


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent