- From: Bailey, Stephen <SBailey@erac.com>
- Date: Mon, 10 Sep 2001 11:58:28 -0500
- To: "'Guillaume Rousse'" <rousse@ccr.jussieu.fr>, xmlschema-dev@w3.org
Guillaume, Tags that must be present, but the value is not known can be declared using the nillable attribute as follows... <xs:element name="foo" type="xs:integer" nillable="true"/> In the instance document, when the value is known you can declare the element <foo>25</foo> or when this element has unknown value you can declare the element <foo xsi:nil="true"/> Steve -----Original Message----- From: Guillaume Rousse [mailto:rousse@ccr.jussieu.fr] Sent: 10 September 2001 hh:mm:ss 11:44 To: xmlschema-dev@w3.org Subject: 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:58:26 UTC