Using a customer TransformerFactory

Having trouble installing Oxygen? Got a bug to report? Post it all here.
timjohncarpenter
Posts: 1
Joined: Mon Nov 14, 2005 5:14 pm
Location: London

Using a customer TransformerFactory

Post by timjohncarpenter »

I am trying to use a custom TransformerFactory when debugger XSL transformations using Oxygen. Reason is that I need to use a specal URIResolver to find some imported templates that might live in various different directories and the resolver needs to go and search for them.

I created by TransformerFactory, an extension of the xerces TransformerFactoryImpl, and and my URIResolver and put the classes into oxygen/classes and added this directory to the class path in oxygen.bat

I set the javax.xml.transform.TransformerFactory property in the Options .. Preferences .. XSLT Options panel but when I run a transformation from the editor perspective or the debugger perspective my TransformerFactory is not used.

Is there anything else I need to do?

Thanks.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Using a customer TransformerFactory

Post by sorin_ristache »

Hello,
timjohncarpenter wrote:I am trying to use a custom TransformerFactory when debugger XSL transformations using Oxygen. Reason is that I need to use a specal URIResolver to find some imported templates that might live in various different directories and the resolver needs to go and search for them.
The bad news is that debugging can be performed only with the transformers listed in the transformers combo of the XSLT Debugger perspective :(

- for XSLT 1.0: Saxon 6.5.4, Saxon 8 B, Saxon 8 SA, Xalan

- for XSLT 2.0: only Saxon 8 B or Saxon 8 SA.

The limitation comes from the fact that there is no standard debugging API so the transformers need to be unified under the same GUI interface in a specific way different for each of them.

The good news :D is that you have control over the location where the imported templates or other documents (using the document() function) are loaded: map the URIs used in the XSLT stylesheet to the imported stylesheets that you want using XML catalogs. You will find many posts with instructions about using XML catalogs on this forum.
timjohncarpenter wrote:I set the javax.xml.transform.TransformerFactory property in the Options .. Preferences .. XSLT Options panel but when I run a transformation from the editor perspective or the debugger perspective my TransformerFactory is not used.
XSLT Options are not applied to the debugger. The debugger options are grouped in the Debugger panel. Please read the User Manual section about the debugger options.

Best regards,
Sorin
Last edited by sorin_ristache on Tue Nov 15, 2005 9:42 am, edited 1 time in total.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

Please note that adding something to the classpath in the batch file will not make that visible to oXygen, you need to place what you want to add in the lib folder and oXygen will load automatically the classes from all the jars present there (and also the lib folder itself is in the oXygen classpath).

Best Regards,
George
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Ahh, I forgot to point you to the article from our documentation page that describes how to set up a transformer through JAXP:
http://www.oxygenxml.com/doc/HowToConfi ... former.pdf

Best Regards,
George
Post Reply