[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [office] OpenDocument TC coordination call minutes 2007-08-13
Hi Bruce,
The attribute dependent example that you provided is not possible in
XSD. The parent element based example that I gave will still work - but
I think that is at the very edge of XSD's expressiveness...
Something like this will achieve the desired effect...
<element name="doc">
<complexType><xs:sequence>
<element name="a" type="a-in-doc"/>
<element name="b">
<complexType><sequence>
<element name="a" type="a-in-b"/>
</sequence></complexType>
</element>
</sequence>
</complexType>
</element>
<complexType name="a-in-doc">
<sequence>
<element ref="x"/>
<element ref="y"/>
<element ref="z"/>
</sequence>
</complexType>
<complexType name="a-in-b">
<sequence>
<element ref="x"/>
<element ref="y"/>
</sequence>
</complexType>
[... definition of x,y,z...]
Bruce D'Arcus wrote:
> Lars Oppermann wrote:
>
>> Yes this is possible in Relax NG (and XSD).
>
> Oh, and are you sure about the last point? XSD is a really dumb language
> for context-specific validation.
>
> Bruce
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]