Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-529

Validation: Why can't the schemaLocation be pulled from the xml document?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Incomplete
    • 2.2.0
    • None
    • None
    • Operating System: Windows NT/2K
      Platform: PC
    • 14876

    Description

      I've been reviewing the DOMEcho example provided in JAXP (inside the
      java_xml_pack-summer-02_01 download from sun) and it is not clear to me
      why we have to set the schemaSource on the DocumentBuilderFactory. I feel that
      if the schemaSource is set to null (or not set at all), the DocumentBuilder(s)
      that are created from that factory should take into account the schemaLocation
      from inside of the xml document. By ignoring the schemaLocation declarations
      within an xml document, Xerces will not be able to handle localized namespace
      declarations and the use of multiple independent schemas by one document.

      It is also not convenient to have to go into an xml document to extract the
      schemaLocation so that we can set the schemaSource before we try
      parsing/validating the document. This means we need to parse twice whenever we
      want to validate.

      I know that the Xerces2-J parser does provide a Parser class that can do this.
      I can see it in the Dom.Count example. Why can't we integrate that same
      behavior under the JAXP APIs?

      Please feel free to contact me for any clarifications.
      Thanks.

      Attachments

        Activity

          People

            Unassigned Unassigned
            edgar.valenzuela@contentguard.com Edgar Valenzuela
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: