Uploaded image for project: 'XalanC'
  1. XalanC
  2. XALANC-676

XalanTransformer's EntityResolver fails to work on Posix platforms in case of entity file absence

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.10
    • CurrentCVS
    • XalanC
    • None
    • Solaris 5.9, 5.10

    Description

      A custom EntityResolver is not called when operating with XalanTransformer in situation when an ``entity'' file is absent.

      The root of this problem goes from Xerces-C++ bug https://issues.apache.org/jira/browse/XERCESC-1807

      But IMHO Xalan-C code is some kind miss-designed in one point (sorry for such brave suggestion): XSLT/XSLTProcessorEnvSupportDefault.cpp:145 (rev. 471584), when getting an URL from the ``urlString'' with the mechanism of local directory structure. The ``URISupport::getURLFromString'' function in its way uses Xerces-c's ``XMLPlatformUtils::getFullPath'' which operates uncommon in POSIX system and throws an exception if file does not exists. I consider that URL's construction is needed for the check some lines below, but such URL plays a role of a hash and constructing it on local directories hierarchy is not a good idea.

      I don't actually know what is considered in all the cases of usage of ``URISupport::getURLFromString'' function, so I think it must be discussed how to fix this issue.

      With all my respect to the developers.

      Attachments

        1. xalan-676.patch
          3 kB
          Aleksandr Vinokurov

        Activity

          People

            Unassigned Unassigned
            cbuh Aleksandr Vinokurov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 168h
                168h
                Remaining:
                Remaining Estimate - 168h
                168h
                Logged:
                Time Spent - Not Specified
                Not Specified