[xep-support] Re: [EXTERNAL] Re: Trying to use XSLT 2.0 in an XEP transformation

From: Harvey, Paul J. EOP/OMB (Contractor) <Paul_Harvey_at_ADDRESS_REMOVED>
Date: Wed Sep 04 2019 - 11:29:00 PDT

Superb, will try this Alexey, thank you so much.

From: Alexey Gagarinov <agagarinov@renderx.com>
Sent: Tuesday, September 3, 2019 10:49 PM
To: Harvey, Paul J. EOP/OMB (Contractor) <Paul_Harvey@omb.eop.gov>
Cc: xep-support@renderx.com
Subject: [EXTERNAL] Re: [xep-support] Trying to use XSLT 2.0 in an XEP transformation

Hi Paul,
I am executing a shell script which contains something like this...

CP=$XEP_HOME/lib/xep.jar:$XEP_HOME/lib/saxon9.jar:$XEP_HOME/lib/xt.jar
$JAVA_HOME/bin/java -Xms64M -Xmx1096M -cp $CP com.renderx.xep.XSLDriver $*

...the stylesheet I pass to the script contains some XSLT 2.0 stuff (a function call) and this is producing an error of the form...

The URI >http://uri-for-function-namespace<<%3ehttp:/uri-for-function-namespace%3c> does not identify an external Java class

...which means, I think, that saxon9 is not being used even though I set it in the classpath. (I confirmed this by removing it from the classpath, and I get the same error.)
I confirmed that $XEP_HOME/lib/saxon9.jar works with a simple XSLT 2.0 transformation run with directly with it.

1) Does my reasoning sound correct?

Yes

2)

3) How would I get the transformation to use saxon9 if setting it on the classpath is not working?

Set the javax.xml.transform.TransformerFactory system property by adding the following key-value pair into the run script:

$JAVA_HOME/bin/java -Xms64M -Xmx1096M -cp $CP -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl com.renderx.xep.XSLDriver $*

It will force XEP to use Saxon 9 (if it exists as jar in the java classpath).

4) Any other things you'd suggest I look at to solve this?

There are other methods to load a concrete XSLT Transformer in Java. See, for example, >https://stackoverflow.com/questions/29450535/what-is-the-default-transformerfactory<<%3ehttps:/stackoverflow.com/questions/29450535/what-is-the-default-transformerfactory%3c> for details.

5)

FYI, I don't with Java much, so my lack of knowledge there may be playing into this.

Thanks,

Paul

Regards,

  Alexey Gagarinov

RenderX

_______________________________________________
(*) To unsubscribe, please visit http://lists.renderx.com/mailman/options/xep-support
(*) By using the Service, you expressly agree to these Terms of Service http://w
ww.renderx.com/terms-of-service.html
Received on Wed Sep 4 11:30:18 2019

This archive was generated by hypermail 2.1.8 : Wed Sep 04 2019 - 11:30:36 PDT