DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10433>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10433 validator fails to find root element declaration Summary: validator fails to find root element declaration Product: Xerces2-J Version: 2.0.1 Platform: Sun OS/Version: Solaris Status: NEW Severity: Normal Priority: Other Component: SAX AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I have two schemas :- a.xsd ----- <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ordnancesurvey.co.uk/xml/namespaces/a" elementFormDefault="qualified" xmlns:a="http://www.ordnancesurvey.co.uk/xml/namespaces/a"> <element name="Root" type="a:RootType"/> <element name="_Content" type="a:AbstractContentType" abstract="true"/> <complexType name="RootType"><sequence><element ref="a:_Content"/></sequence></complexType> <complexType name="AbstractContentType" abstract="true"><attribute name="id" type="ID" use="optional"/></complexType> </schema> b.xsd ----- <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ordnancesurvey.co.uk/xml/namespaces/b" elementFormDefault="qualified" xmlns:b="http://www.ordnancesurvey.co.uk/xml/namespaces/b" xmlns:a="http://www.ordnancesurvey.co.uk/xml/namespaces/a"> <import namespace="http://www.ordnancesurvey.co.uk/xml/namespaces/a" schemaLocation="a.xsd"/> <element name="content" type="b:contentType" substitutionGroup="a:_Content"/> <complexType name="contentType"> <complexContent> <extension base="a:AbstractContentType"> <sequence> <element name="string" type="string"/> <element name="date" type="date"/> </sequence> </extension> </complexContent> </complexType> </schema> I can't then find any way of getting the following XML instance document to validate :- <?xml version="1.0" encoding="UTF-8"?> <a:Root xmlns:a="http://www.ordnancesurvey.co.uk/xml/namespaces/a" xmlns:b="http://www.ordnancesurvey.co.uk/xml/namespaces/b" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ordnancesurvey.co.uk/xml/namespaces/b b.xsd"> <b:content id="content"> <b:string>content blurb.</b:string> <b:date>2002-06-12</b:date> </b:content> </a:Root> I have tried the following combinations for the xsi:schemaLocation attribute with differing results :- option 1 -------- b.xml has xsi:schemaLocation="http://www.ordnancesurvey.co.uk/xml/namespaces/b b.xsd " xerces complains it can't find the root declaration (a:Root) option 2 -------- b.xml has xsi:schemaLocation="http://www.ordnancesurvey.co.uk/xml/namespaces/b b.xsd http://www.ordnancesurvey.co.uk/xml/namespaces/a a.xsd" xerces complains that b:content can't be used in place of a:_Content option 3 -------- b.xml has xsi:schemaLocation="http://www.ordnancesurvey.co.uk/xml/namespaces/b b.xsd http://www.ordnancesurvey.co.uk/xml/namespaces/a b.xsd" xerces complains that the targetnamespace of b.xsd is not what it expected but validates everything else correctly. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
