Re: Several same elements

>
>
>> However, if you do it this way you can't control the number of 
>> chapter elements that can appear on each level. If you need to do 
>> this you have to specify one complexType for each level. Also, note 
>> that you must have minOccurs="0" on the "inner" chapter element 
>> otherwise you'll get an infinite content model that parsers can't 
>> handle.
>
>
> With this solution I've got still the possiblity to have as much level 
> in the hierarchy I'd like to have, so it isn't bounded. Would there be 
> a way to handle this? 


Not unless you define a separate complexType for each level which means 
you can control the number of chapter elements each level can have. This 
will become hard though if you have many levels of chapters.
If you don't mind adding a few embedded Schematron rules you could 
probably check this constraint but this would add some more processing 
to your application. See [1] for more info on this.

Cheers,
/Eddie

[1] http://www.topologi.com/public/Schtrn_XSD/Paper.html

Received on Monday, 26 August 2002 03:41:25 UTC