Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4644285

Schemas can not be "imported"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P2 P2
    • None
    • 1.2.0
    • xml

      The parser can not load an imported schema within a schema document. I suspect the underlying Xerces is buggy as well as it does not work for both cases.

      The files are attached. The properties should be changed to get the appropriate location for your setting. You can also find the related file in
      http://javaweb.eng/~umit/jaxp12_bugs/test/ directory in importtestfails.

      Here is an example of the run:

      ***********PARSER TEST importtestfails with Props file = /home/umit/projects/DTD2Schema/test/importtestfails/Properties

      Schema Location: file:/home/umit/projects/DTD2Schema/test/importtestfails/Test1.xsd

      Using JAXP schemaSource setting:

      Location of Schema is: file:/home/umit/projects/DTD2Schema/test/importtestfails/Test1.xsd

      Warning: URI=null
      Line=-1: src-import.0: Failed to read imported schema document 'http://www.w3.org/2001/xml.xsd'.

      Error: URI=null
      Line=-1: src-resolve: Cannot resolve the name 'xml:lang' to a(n) attribute declaration component.

      Error: URI=null
      Line=-1: src-ct.0.1: Complex Type Definition Representation Error for type 'description'. Element 'attribute' is invalid, misplaced, or occurs too often.

      Error: URI=file:/home/umit/projects/DTD2Schema/test/classes/../importtestfails/instance.xml
      Line=8: cvc-complex-type.3.2.2: Attribute 'xml:lang' is not allowed to appear in element 'a'.

      Tag <b> occurs 1 times
      Tag <a> occurs 1 times
      Tag <foobar> occurs 1 times
      Tag <c> occurs 1 times

      ###@###.### 2002-02-27

      One thing to add, I also tried "file" URIs in the import declaration and it fails to load as well.

            nbajajsunw Neeraj Bajaj (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: