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

JAXP should at least report a warning for <xs:import>s that failed to resolve

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • 9
    • None
    • xml

      If I try to compile the enumeration.xsd with SchemaFactory.newSchema, I get an error message that says

      [ERROR] src-resolve: Cannot resolve the name 'xml:lang' to a(n) 'attribute declaration' component.

      Even though the schema actually imports xml.xsd.

      It turns out that this problem happens because xml.xsd has a DOCTYPE declaration that does not resolve, so it failed to parse. But Xerces does not report any error nor warning.

      I know the schema spec is broken in that it allows (or was it required?) implementations to recover from failed <xs:import> attempts, but the end result is that the users have to somehow find problems without any help from JAXP.

      <xs:import>s can fail for million reasons such as incorrect references, not wellformed schema documents, proxy configuration error, and etc. If only JAXP can report a warning that says
      "Hey, this import failed for such and such reason but I'll just go on", then it would really
      save time for developers.

      Specifically, the code in question is in XSDHandler.java 1588. If it is not 'mustResolve', it should report a warning.
      ###@###.### 2005-2-09 01:09:38 GMT
      Please also see the description I put in 6433546.

            joehw Joe Wang
            kkawagucsunw Kohsuke Kawaguchi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: