OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

trouble with 'all' in schema :(



Hi!

When validating the xml document (with xmlspy 3.5)
i get an error:

"This file is not valid: Mandatory elements expected in 'testdoc' after
'A3': A1,A2,A3."

Whats wrong with this ??? this must be so simple problem that i dont get

it :(
(dont want to use 'sequence' because i dont want to restrict the order
...)

changed the elementFormDefault to "unqualified" but that did not help
.... :(

    S.S


testdoc.xml
---------------------
<?xml version="1.0" encoding="UTF-8"?>
<testdoc xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="E:\temp\testdoc.xsd">
 <A1>1</A1>
 <A2>2</A2>
 <A3>3</A3>
</testdoc>

testdoc.xsd
---------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema";
elementFormDefault="qualified">
 <xsd:element name="testdoc">
  <xsd:complexType>
   <xsd:all>
    <xsd:element name="A1" type="xsd:string"/>
    <xsd:element name="A2" type="xsd:string"/>
    <xsd:element name="A3" type="xsd:string"/>
   </xsd:all>
  </xsd:complexType>
 </xsd:element>
</xsd:schema>