Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Designing a recursive XML schema >Thread Next - Re: Designing a recursive XML schema Re: Designing a recursive XML schemaTo: NULL Date: 9/16/2008 11:29:00 PM
Tue, 16 Sep 2008 20:37:42 +0100, /Susan Harris/:
[...]
> Where I'm really struggling is in how to get the name and nodes OR
> items. Looks like I need an xs:all with an xs:choice underneath it, but
> that doesn't seem to be allowed.
Does the following content model group suit you?
(((item | nodes), name) | (name, (item | nodes)))
<xs:choice>
<xs:sequence>
<xs:choice>
<xs:element ref="item" />
<xs:element ref="nodes" />
</xs:choice>
<xs:element ref="name" />
</xs:sequence>
<xs:sequence>
<xs:element ref="name" />
<xs:choice>
<xs:element ref="item" />
<xs:element ref="nodes" />
</xs:choice>
</xs:sequence>
</xs:choice>
--
Stanimir
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
