You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2001/06/26 15:44:54 UTC
[Bug 2326] New: - with NO schemaLocation="..." reports error
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2326
*** shadow/2326 Tue Jun 26 06:44:54 2001
--- shadow/2326.tmp.24929 Tue Jun 26 06:44:54 2001
***************
*** 0 ****
--- 1,67 ----
+ +============================================================================+
+ | <import> with NO schemaLocation="..." reports error |
+ +----------------------------------------------------------------------------+
+ | Bug #: 2326 Product: Xerces-J |
+ | Status: NEW Version: 1.4 |
+ | Resolution: Platform: PC |
+ | Severity: Normal OS/Version: Windows NT/2K |
+ | Priority: Other Component: Schema-Structures |
+ +----------------------------------------------------------------------------+
+ | Assigned To: xerces-j-dev@xml.apache.org |
+ | Reported By: mhuffman@ca.ibm.com |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ The namespace="..." and schemaLocation="..." attributes on an <import> item are
+ both OPTIONAL. However, the parser throws an error:
+
+ "Schema error: Could not get the doc root for imported Schema file: ,."
+
+ when an <import> item is missing schemaLocation="...". Here's an example:
+
+ 4_2_3v09.xsd
+ ============
+ <schema xmlns ="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.Test.org/4_2_3sv">
+
+ <import namespace="http://www.Test.org/4_2_3svimp"/>
+
+ <element name="root">
+ <complexType>
+ <sequence>
+ <any namespace="http://www.schemaTest.org/ibm4_2_3svimp"
+ processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <anyAttribute namespace="http://www.schemaTest.org/ibm4_2_3svimp"
+ processContents="lax"/>
+ </complexType>
+ </element>
+
+ </schema>
+
+ 4_2_3v09.xml
+ ============
+ <?xml version="1.0"?>
+ <sv:root xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:svimp ="http://www.Test.org/4_2_3svimp"
+ xmlns:svimp2 ="http://www.Test.org/4_2_3svimp2"
+ xmlns:sv ="http://www.Test.org/4_2_3sv"
+ xsi:schemaLocation="http://www.Test.org/4_2_3sv
+ 4_2_3v09.xsd"
+ svimp:string="string" svimp:int="10">
+
+ <svimp:AnyElem>Any elements from "svimp:" are allowed here.
+ <Child/>
+ <svimp2:Child>10</svimp2:Child>
+ <svimp:Child>some text</svimp:Child>
+ </svimp:AnyElem>
+
+ <svimp:AnyElem>
+ <Child/>
+ </svimp:AnyElem>
+
+ <svimp:AnyElem2>Any elements from "svimp:" are allowed here.</svimp:AnyElem2>
+
+ </sv:root>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
Re: [Bug 2326] New: - with NO schemaLocation="..." reports
error
Posted by Ian Roberts <ir...@decisionsoft.com>.
On 26 Jun 2001 bugzilla@apache.org wrote:
> The namespace="..." and schemaLocation="..." attributes on an
> <import> item are both OPTIONAL. However, the parser throws an
> error:
>
> "Schema error: Could not get the doc root for imported Schema file:
> ,."
>
> when an <import> item is missing schemaLocation="...". Here's an
> example:
Just a thought, how does this interact with the new external schema
location property? It would be good if an import with no schemaLocation
could consult this and see if there is a mapping given for the namespace.
Ian
--
Ian Roberts, Software Engineer DecisionSoft Ltd.
Telephone: +44-1865-203192 http://www.decisionsoft.com
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org