Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-2332

If a URIResolver is provided, don't call SystemIDResolver.getAbsoluteURI in document() function

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.7.1, 2.7, 2.6
    • None
    • None
    • PatchAvailable

    Description

      If the user provides a URIResolver that returns the Source given the absolute URI of the stylesheet module doing the include/import and the relative URI from the href attribute, and if that Source has its system ID set, then there is no reason for the XSLT processor to get involved with the contents of the URIs. The user has provided the full management of stylesheet URIs, to resolve all included/imported Source stylesheet modules and their absolute URIs.

      The URIs are supposed to be legitimate URIs, but wheter or not they actually are should be in the user's control. For example the URIs might be of the form "file:///..." with directories or filenames that have characters in them that are not allowed in legitimate URIs.

      On the other hand, if the user hasn't provided a URIResolver, or that resolver doesn't return a Source, or that Source doesn't have its system ID set, then the fallback of using SystemIDResolver to get the base URI of the included document is OK. If the URIs are not legitimate, the services provided by this class may throw MalformedURIException.

      Attachments

        1. j2332.patch
          3 kB
          Kevin Cormier
        2. j2332-test.zip
          2 kB
          Kevin Cormier
        3. MyResolver.java
          3 kB
          Kevin Cormier

        Issue Links

          Activity

            People

              minchau@ca.ibm.com Brian Minchau
              nsushkin Nicholas Sushkin
              Christine Li Christine Li
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: