You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Aleksandr Vinokurov (JIRA)" <xa...@xml.apache.org> on 2008/06/06 15:21:44 UTC

[jira] Created: (XALANC-676) XalanTransformer's EntityResolver fails to work on Posix platforms in case of entity file absence

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

                 Key: XALANC-676
                 URL: https://issues.apache.org/jira/browse/XALANC-676
             Project: XalanC
          Issue Type: Bug
          Components: XalanC
    Affects Versions: 1.10
         Environment: Solaris 5.9, 5.10
            Reporter: Aleksandr Vinokurov


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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Issue Comment Edited: (XALANC-676) XalanTransformer's EntityResolver fails to work on Posix platforms in case of entity file absence

Posted by "Aleksandr Vinokurov (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANC-676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603039#action_12603039 ] 

cbuh edited comment on XALANC-676 at 6/6/08 6:33 AM:
--------------------------------------------------------------------

https://issues.apache.org/jira/secure/attachment/12383559/xalan-676.patch

This is my workaround that I use to make my application work for now.

I use only filenames without any path in entities strings so it works for me. But actually I understand that if useing a path-ed strings it will produce a kind of mess.

Can anyone offer a rock-solid solving?

      was (Author: cbuh):
    This is my workaround that I use to make my application work for now.

I use only filenames without any path in entities strings so it works for me. But actually I understand that if useing a path-ed strings it will produce a kind of mess.

Can anyone offer a rock-solid solving?
  
> XalanTransformer's EntityResolver fails to work on Posix platforms in case of entity file absence
> -------------------------------------------------------------------------------------------------
>
>                 Key: XALANC-676
>                 URL: https://issues.apache.org/jira/browse/XALANC-676
>             Project: XalanC
>          Issue Type: Bug
>          Components: XalanC
>    Affects Versions: 1.10
>         Environment: Solaris 5.9, 5.10
>            Reporter: Aleksandr Vinokurov
>         Attachments: xalan-676.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org