Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Re: optional, but at least one required >Thread Next - Re: optional, but at least one required RE: optional, but at least one requiredTo: "'Pete Cordell'" <petexmldev@--------------.--->, "'Marie Bilde Rasmussen'" <mariebilderas@-----.---> Date: 10/11/2007 3:38:00 PM
> XSD1.1 is looking at adding an xs:assert schema directive
> that includes a set of xpath expressions that a construct
> (sequence/choice/etc.) must satisfy. I would be interested
> to know how complicated such an expression for this use-case
> would be if anyone cared to submit an example.
You can write it as
<xs:sequence>
<xs:element ref="a" minOccurs="0"/>
<xs:element ref="b" minOccurs="0"/>
</xs:sequence>
<xs:assert test="a|b"/>
Michael Kay
http://www.saxonica.com/
From petexmldev@t... Thu Oct 11 14:39:07 2007
R | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
