schema 'all' compositor trouble ... whats wrong with this...

Status
Not open for further replies.

Seppo Smolander

Usenet Archive
Joined
Nov 29, 2001
Messages
1
Reaction score
0
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 ...)

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>
 

Tuija Sonkkila

Usenet Archive
Joined
Oct 15, 2001
Messages
128
Reaction score
0
Seppo Smolander wrote:
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."

Odd behaviour of XMLSpy with xsd:all is reported also on xml-dev, see the thread 'XML won't validate against schema', available at http://lists.xml.org/archives/xml-dev/200104/threads.html

Tuija
 
Status
Not open for further replies.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
548,051
Messages
3,104,251
Members
248,135
Latest member
tobystanx

Latest Threads

Top