- From: Bob Schloss <rschloss@us.ibm.com>
- Date: Sun, 12 May 2002 14:03:52 -0400
- To: ValaR - Netlife <gavrilovets@netlife.de>, xmlschema-dev@w3.org
If the result element was declared to be of complexType resultType, complexType result type could be a defined as a sequence consisting of two particles: 1) the element STATUS 2) a model group with a choice compositor a) one branch of the choice has a sequence of Key1, Key2, Key3, Key4 b) the other branch of the choice has a particle element ERROR. (There are other ways to do this: such as having the 2nd model group be a sequence of Key1, Key2, Key3, Key4 and ERROR, each of which has minOccurs ="0"). Please consult http://www.w3.org/TR/xmlschema-0 or one of the books on XML Schema which have been published in the last few months for details. Bob Schloss IBM Watson Research Center Valeri Gavrilovets <valar@rambler.ru>@w3.org on 05/10/2002 09:14:55 AM Please respond to ValaR - Netlife <gavrilovets@netlife.de> Sent by: xmlschema-dev-request@w3.org To: xmlschema-dev@w3.org cc: Subject: The problem with XML Schema definition Hopefully anyone helps me by this "trivial" problem. I have two kinds of possible xml documents: First--------- <callResult type="java.util.Hashtable" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://host/schema/newSession.xsd"> <result type="java.util.Hashtable"> <STATUS>OK</STATUS> <Key1>123</Key1> <Key2>234</Key2> <Key3>324</Key3> <Key4>256</Key4> </result> </callResult> Second------- <callResult type="java.util.Hashtable" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://host/schema/newSession.xsd"> <result type="java.util.Hashtable"> <STATUS>INIT</STATUS> <ERROR>200</ERROR> </result> </callResult> Now the newSession.xsd schema should describe these two kinds of xml. Could you help me giving some good ideas?
Received on Sunday, 12 May 2002 14:05:50 UTC