Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Question about validating schema with xml file [Thread Next] Re: Question about validating schema with xml fileTo: NULL Date: 7/2/2008 7:32:00 PM
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/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
