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


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] Use xsd to specify multiple instances of existing element

> > Yes, in either of two ways. Either by defining an assertion on the 
> > type of the containing element, or by using conditional type 
> > assignment (where the type of the element depends on the 
> values of its attributes).
> >   
> The conditional way does not seem to meet Ian's order 
> constraint. So I think the assertions are the only mechanism 
> for XSD 1.1 for Ian's particular problem.

Fair enough. Perhaps you want a combination of the two. On the Category
element, use conditional type assignment to say that if the scheme is X, the
type must be T and thus constrain term, while if the scheme is Y, the type
must be U. On the parent of the Category element, use assertions to specify
that the first Category must be of type T and the second of type U.

Or you could do it all with assertions - but the danger with complex
assertions is that the diagnostics when they are not satisfied can get
rather obscure.

Michael Kay

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS