Page 1 of 1

XSLT from 15.2 SDK

Posted: Thu Aug 11, 2016 11:47 pm
by MelkorX
Hi,

I'm developing a plugin with the 15.2 SDK. I want to run a series of XSL transformations on the current file. It looks like API support to do this has been added for the 18 version of the SDK. Is there any way to do this for 15.2? I've tried just running Saxon from the command line but get the error that the license file is not found, and unfortunately I need Saxon 9 EE for XSL version 3.0 support. Thanks.

Re: XSLT from 15.2 SDK

Posted: Fri Aug 12, 2016 10:38 am
by alex_jitianu
Hi,

What API are you referring to? In version 15.2 there is API for creating a licensed Saxon 9 transformer:

Code: Select all

pluginWorkspace.getXMLUtilAccess().createXSLTTransformer()
Of course, the Saxon 9 bundled with the Oxygen version running the plugin will be used.

Best regards,
Alex

Re: XSLT from 15.2 SDK

Posted: Fri Aug 12, 2016 9:13 pm
by MelkorX
Hi Alex,

I was able to get it working with 15.2 using the Saxon API directly.

final TransformerFactory tfactory = new TransformerFactoryImpl(
net.sf.saxon.Configuration.makeLicensedConfiguration(null, "com.saxonica.config.EnterpriseConfiguration"));

Another thread in this forum pointed me to the Configuration.makeLicensedConfiguration method.

Thanks.