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 April 17th, 2007, 09:57 AM
Registered User
 
Join Date: Apr 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default xsl:include / import and tomcat

In Importing.xsl when I use xsl:include or import and specify href to "Imported.xsl" tomcat is not able to find the stylesheet. It tries to look up the Imported.xsl under tomcat_home/bin.

Does anyone know how to get around this in making tomcat find the stylesheets. All stylesheets are places under one XSL directory, which is placed under webapps/mywebapp/WEB-INF/xsl.
I don't want to make the xsl public and accessible over internet.

suggestions?solutions?

 
Old April 17th, 2007, 10:25 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

The most likely explanation is that the XSLT processor doesn't know the base URI of the stylesheet. Usually this happens when you load the stylesheet from some source such as a DOM or an inputstream where the original location is unknown. Calling setSystemId() on the supplied Source object fixes it.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old April 17th, 2007, 10:37 AM
Registered User
 
Join Date: Apr 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am getting an absolute path of XSL directory as a web-app context parameter. And using that alongwith xsl file name I stream the xsl file before the transformation.
I will try the suggestion you made though. Thanks!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Performance for <xsl:import> and <xsl:include> vikkiefd XSLT 2 April 16th, 2008 08:06 AM
xsl import/include mapping sammyj727 XSLT 3 July 19th, 2007 04:15 PM
call template from diff file? (import vs. include) mister_mister XSLT 5 January 31st, 2007 07:12 PM
xsl:include within include chuck123ie XSLT 1 January 5th, 2006 11:07 AM
xsl:import or xsl:include ShaileshShinde XSLT 2 August 17th, 2005 04:49 AM





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