Re: Question about validating schema with xml file



jh3an wrote:
Error message differs:
from http://www.xmlme.com/Validator.aspx :
Schema Error: System.Xml.Schema.XmlSchemaException: Expected schema
root. Make sure the root element is and the namespace is 'http://
www.w3.org/2001/XMLSchema' for an XSD schema or 'urn:schemas-microsoft-
com:xml-data' for an XDR schema. at
System.Xml.Schema.XmlSchemaCollection.SendValidationEvent(XmlSchemaException
e) at System.Xml.Schema.XmlSchemaCollection.Add(String ns, XmlReader
reader, XmlResolver resolver) at
System.Xml.Schema.XmlSchemaCollection.Add(String ns, XmlReader reader)
at Validator.Button1_Click(Object sender, EventArgs e)

That sounds as if you have presented the wrong file as the schema.


from http://tools.decisionsoft.com/schemaValidate/ :
Well Formed: VALID
Schema Validation: INVALID

The following errors were found:
TYPE LOC MESSAGE
Warning 3, 44 SchemaLocation: schemaLocation value = 'test.xsd' must
have even number of URI's.

That is what I told you, the schemaLocation is a list of pairs of the namespace URI and the schema URL.

Validation 4, 9 cvc-complex-type.2.4.a: Invalid content was found
starting with element 'number'. One of '{"":number}' is expected.

Yes, your schema needs elementFormDefault="qualified", as I already told you.

--

Martin Honnen
http://JavaScript.FAQTs.com/
.