[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
RE: [xml-dev] Use xsd to specify multiple instances of existing element
- From: "Michael Kay" <mike@saxonica.com>
- To: "'Rick Jelliffe'" <rjelliffe@allette.com.au>
- Date: Mon, 22 Sep 2008 17:25:40 +0100
> > 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
http://www.saxonica.com/
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]