[ 
https://issues.apache.org/jira/browse/XALANJ-2401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529187
 ] 

Santiago Pericas-Geertsen commented on XALANJ-2401:
---------------------------------------------------

Robert,

 I thought I understood the problem when you explained it on the mailing list, 
but I'm not sure any more based on the description you included in this report. 
This is what I've done:
 
 1) Modified to to use "../docroot/" (to run from the _classes directory)
 2) The way you were setting the factory property was not correct. You need to 
set it before calling TransformerFactory.newInstance() not after. As a result, 
you were getting the Xalan not the XSLTC factory.
 3) Ran the XsltcTest class from the command line after these changes and 
everything seemed to work (no errors)
 4) Wrote my own unit test to check that the correct resolver was called, and 
it was.

 I'm a bit confused about the use of org.apache.xalan.xsltc.cmdline.Compile in 
your description. I thought the problem was with the API not the CLI. The class 
org.apache.xalan.xsltc.cmdline.Compile hasn't been updated in years; instead 
Xalan's main CLI class org.apache.xalan.xslt.Process was updated to support 
XSLTC. In particular, this class has a -URIRESOLVER option that you can use to 
specify a resolver on the command line. Is that what you're looking for? If 
not, please elaborate the issue that you're facing only using the JAXP API. 
Thanks.


> compiled translets cannot resolve xsl:import/include with custom URIresolver
> ----------------------------------------------------------------------------
>
>                 Key: XALANJ-2401
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2401
>             Project: XalanJ2
>          Issue Type: Bug
>          Components: XSLTC
>    Affects Versions: 2.7.1
>         Environment: Ubuntu, Sun JDK1.5
>            Reporter: Robert Koberg
>            Priority: Minor
>         Attachments: xsltc-test.zip
>
>
> Attached is a test case. It works when run using the main method, but if your 
> try to precompile the translet you get an error:
> $ java -cp 
> ../lib/xalan.jar:../lib/xercesImpl.jar:../lib/xml-apis.jar:../lib/serializer.jar
>  org.apache.xalan.xsltc.cmdline.Compile ../docroot/main.xsl 
> Compiler errors:
>   /home/rkoberg/workspace/xsltc-test/docroot/import.xsl (No such file or 
> directory)
> $ java -cp 
> ../lib/xalan.jar:../lib/xercesImpl.jar:../lib/xml-apis.jar:../lib/serializer.jar
>  org.apache.xalan.xsltc.cmdline.Compile ../docroot/main.xsl 
> Compiler errors:
>   /home/rkoberg/workspace/xsltc-test/docroot/import.xsl (No such file or 
> directory)

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to