managing unknown values

I'm thinking about best way to manage unknown values in xml schema.

I would like to keep minOccurs="0" semantic to elements that could not exist, 
and thus manage differently elements that must exist but whose value can be 
unavailable.

I was planning to use a choice for every such element, this way
<choice>
  <element name="foo" type="integer" minOccurs="1" maxOccurs="1"/>
  <element name="foo" type="UnknownType" minOccurs="1" maxOccurs="1"/>
</choice>
<simpleType name="UnknownType"/>
Resulting in either <foo>24</foo> or <foo/>

Has anybody better sugestions ?
-- 
Guillaume Rousse <rousse@ccr.jussieu.fr>
GPG key http://lis.snv.jussieu.fr/~rousse/gpgkey.html

Received on Monday, 10 September 2001 12:45:45 UTC