- From: Klaus Triendl <klaus.triendl@m-box.at>
- Date: 26 May 2005 16:47:14 -0600
- To: www-xml-schema-comments@w3.org
what i would highly appreciate for future versions is that the "minOccurs"
attribute can have a value calculated out of a condition.
i use the xml schema to define the communication interface (which is in
xml).
one situation i encounter very often is that one element must or must not
be present dependant on another element's value.
i think this is a good and necessary feature as it ensures data integrity
already at the data definition level.
1)
<datarequest>
<include_specialdata>true</include_specialdata>
<specialdata/>
</datarequest>
2)
<datarequest>
<include_specialdata></include_specialdata>
</datarequest>
for this i would need something like this:
<schema>
<element name="datarequest">
<complextype>
<sequence>
<element name="include_specialdata" type="boolean"/>
<element name="specialdata" type=".."
minOccurs="(include_specialdata = true) ? 1 : 0"/>
</sequence>
</complextype>
</element>
</schema>
--
klaus triendl
fa. daten unlimited
tel: +43 (0)5242 72717
mobil: +43 (0)650 4020319
email: klaus.triendl@m-box.at
support: support@m-box.at
Received on Thursday, 26 May 2005 22:47:31 UTC