OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xml-dev] unbounded element within an <all> tag



Ronald Bourret wrote:

> Sorry. The <all> tag doesn't support this. Children in an "all" content
> model must occur 0 or 1 times.


Yes, this is one of the unfortunate limitations of W3C XML Schema.

Workarounds include:

- changing the design of your vocabulary to impose an order :(
- choosing a more flexible and less intrusive schema language --RELAX 
NG, Schematron and even Examplotron allow unordered content models.
- changing your schema to allow any sub-element at this location using 
the xs:any wildcard and eventually embedding a Schematron rule to 
perform the checks that will no longer be done by W3C XML Schema.

Hope this helps,

Eric


> 
> -- Ron
> 
> Stefán F. Stefánsson wrote:
> 
>>Hello all.
>>
>>I've been going out of my mind trying to figure this one out... and I've
>>seen it asked elsewhere but I could not for the life of me find an
>>answer to it.
>>
>>I just do not understand why I haven't been able to find an answer to
>>this question... this must be a FAQ.
>>
>>My question is:
>>
>>How can I define an XML Schema that defines an element which has certain
>>child elements and I need them all to appear but don't want to constrain
>>the order of the children (so far this is just <xsd:all> but here's the
>>twist) but I want one (or more...) of the elements to appear 0 or more
>>times (not constrained to only one time as the <all/> does).
>>
> 

-- 
Rendez-vous à Paris pour une visite guidee de la nebuleuse XML.
                                           http://dyomedea.com/formation/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------