Hi all,

I am using xerces 1.4.2 to validate an XML document against a very simple schema
which contain an xs:choice. When I try to run my code I have the following error:

[Error] :6:14: Element type "aaa" must be declared.
[Error] :7:9: The content of element type "pipo" must match "(aaa|bbb)".


For reference, the XML document:

<?xml version='1.0'?>
<pipo    xmlns='http://www.pipo.org'
         xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
         xsi:schemaLocation='http://www.pipo.org choice.xsd'>

        <aaa>asdfasdfa</aaa>
</pipo>



And the schema 'choice.xsd':

<?xml version="1.0"?>
<xs:schema targetNamespace="http://www.pipo.org"; 
            xmlns:xs="http://www.w3.org/2001/XMLSchema";>

    <xs:element name="pipo" type="pipoType"/>

    <xs:complexType name="pipoType">
       <xs:choice>
          <xs:element name="aaa" type="xs:string"/>
          <xs:element name="bbb" type="xs:string"/>
       </xs:choice>
    </xs:complexType>
</xs:schema>


Is it me who is missing something obvious or is there a problem with xs:choice?

Thanks 

Seb

-- 
There is a theory which states that if ever anyone discovers exactly what the
Universe is for and why it is here, it will instantly disappear and be replaced
by something even more bizarre and inexplicable. There is another theory which
states that this has already happened.
       -- Douglas Adams, The Restaurant at the End of the Universe

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to