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

Incorrect location information on SAX when using XInclude

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.9.0
    • 2.9.1
    • XInclude 1.0
    • None

    Description

      Hi,

      If there is a file that includes another one with xi:include Xerces will report to a content handler events from the included file (startElement, characters, endElement, etc.). However the locator that is set in the content handler does does not report the locations in the included file, instead it remains at the xi:include location in the master file.
      Looking inside the XIncludeHandler class I see that there is some code that tries to deal with this:

      // we do this to ensure that the proper location is reported in errors
      // otherwise, the locator from the root document would always be used
      fErrorReporter.setDocumentLocator(locator);

      but the locator is updated only on the error reporter.

      The problem is that if one registers a content handler there is no possibility to know the location of the notified SAX events.

      Thanks,
      George

      Attachments

        Activity

          People

            mrglavas@ca.ibm.com Michael Glavassevich
            george@sync.ro George Cristian Bina
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: