[ 
http://nagoya.apache.org/jira/browse/XALANJ-2000?page=comments#action_56024 ]
     
Tomas Kulhanek commented on XALANJ-2000:
----------------------------------------

Yes. 
But mainly I see the problem in relative paths in href. 

The xalan classes makes absolute base by File(relativePath).getAbsolutePath(); 
and adds it to the URI and forgets to make conversion of unicode chars tto %XX 
form. This is forgotten in 

SystemIDResolver.getAbsolutePathFromRelativePath(String relativePath)

So I recommend to add the call filepath2URI(absoluteBase); (from previous 
attached hack) into the mentioned private method 
getAbsolutePathFromRelativePath(). 

(And the call of filepath2URI(absoluteBase); from previous mentioned attachment 
can be ommitted).

Our application could avoid the occurence with overriding some classes. Or the 
xsl stylesheets should use absolute paths in xsl:include with correct URI. But 
these are only workarrounds. Clear sollution is the recommended above.

Best regards Tomas Kulhanek
Systinet Support Engineer


> xsl:include with relative href cause MalformedURL on unicode path
> -----------------------------------------------------------------
>
>          Key: XALANJ-2000
>          URL: http://nagoya.apache.org/jira/browse/XALANJ-2000
>      Project: XalanJ2
>         Type: Bug
>     Versions: 2.6
>  Environment: Windows XP
>     Reporter: Tomas Kulhanek
>  Attachments: SystemIDResolver.diff
>
> xsl:include with relative href cause MalformedURL on unicode path.
> If the stylesheet contains <xsl:include> with relative reference and this 
> reference is based on path with unicode characters the following is thrown 
> when trying to tranform something by xalan command line:
> (Location of error unknown)XSLT Error 
> (javax.xml.transform.TransformerConfigurationException): 
> javax.xml.transform.TransformerException: 
> javax.xml.transform.TransformerException: 
> org.apache.xml.utils.URI$MalformedURIException: Path contains invalid 
> character: &#9532;� 
> Our application throws following stack trace:
> org.apache.xml.utils.URI$MalformedURIException: Path contains invalid 
> character:
> &#9532;� 
>         at org.apache.xml.utils.URI.initializePath(URI.java:799)
>         at org.apache.xml.utils.URI.initialize(URI.java:473)
>         at org.apache.xml.utils.URI.<init>(URI.java:231)
>         at org.apache.xml.utils.URI.<init>(URI.java:214)
>         at 
> org.apache.xml.utils.SystemIDResolver.getAbsoluteURI(SystemIDResolver
> .java:251)
>         at 
> org.apache.xalan.processor.ProcessorInclude.startElement(ProcessorInc
> lude.java:173)
>         at 
> org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetH
> andler.java:668)
>         at 
> org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXP
> arser.java:487)
> Looking deeper into the code the consequences (not the reason!) could be 
> repaired by transforming URI unicode characters to %XX form.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to