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

DocumentBuilder.setEntityResolver() does not work for modular DTD's

XMLWordPrintable

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



      Name: krC82822 Date: 07/24/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

      I have created a custom EntityResolver to resolve my DTD's. In 1.3 this worked
      fine, but under JDK 1.4Beta, it fails to resolve pieces of the DTD which are
      included in the main DTD as modules. With debugging code added, I see that my
      EntityResolver is being called for the initial DTD referenced in the document I
      feed to DocumentBuilder.parse(), but it is not called for the modules. My main
      DTD is included here:

      <!-- NCBI_BlastOutput.dtd
        This file is built from a series of basic modules.
        The actual ELEMENT and ENTITY declarations are in the modules.
        This file is used to put them together.
      -->
      <!ENTITY % NCBI_Entity_module PUBLIC "-//NCBI//NCBI_Entity.mod//EN"
      "NCBI_Entity.mod">
      %NCBI_Entity_module;

      <!ENTITY % NCBI_BlastOutput_module PUBLIC "-//NCBI//NCBI_BlastOutput.mod//EN"
      "NCBI_BlastOutput.mod">
      %NCBI_BlastOutput_module;


      The EntityResolver is never called for NCBI_Entity.mod, and it then throws the
      following:

      org.xml.sax.SAXParseException: Relative URI "NCBI_Entity.mod"; can not be
      resolved without a document URI.
      (Review ID: 127185)
      ======================================================================

            egoei Edwin Goei (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: