Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 4th, 2007, 05:58 AM
Authorized User
 
Join Date: May 2007
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default install saxon instead of xalan

Hi. Every one
Xalan version 1.0 is installed to my PC by default. I need to use Saxon instead. How can I disable Xalan and install Saxon.
Although the first part of my ClassPath is as follow: c:\saxon\saxon8.jar
 Xalan still the default processor. Just to know that I’m using Tomcat 4 as a web server.
Please help
Many thanks in advance


 
Old September 5th, 2007, 06:59 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

In my experience, rather than relying on the JAXP TransformerFactory searching the classpath, it's much more reliable to set the system property javax.xml.transform.TransformerFactory explicitly to the value "net.sf.saxon.TransformerFactoryImpl". You can do this in the init() method of your servlet code, and if you want to parameterize it you can read the relevant values from the web.xml configuration file.

Or to make it even more robust (and faster), if you don't mind having a compile-time reference to Saxon in your code, replace the call

factory = TransformerFactory.newInstance();

by

factory = new net.sf.saxon.TransformerFactoryImpl();

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Xalan v. Saxon and Xquery Camer XSLT 5 May 26th, 2009 12:44 PM
Need to install "XALAN for C" on my windowsOS elayaraja.s XSLT 8 July 24th, 2008 10:52 PM
Did any one used Xalan-C elayaraja.s XSLT 3 July 24th, 2008 06:19 AM
why xalan extension function ? elayaraja.s XSLT 3 July 17th, 2008 07:03 AM
Xalan bug wpsBoy XSLT 2 December 26th, 2005 06:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.