[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Uri resolver in Saxon 8

Subject: RE: Uri resolver in Saxon 8
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Thu, 12 Aug 2004 00:13:15 +0100
saxon uri
The important thing is to make sure that Saxon knows the base URI of the
stylesheet module. To achieve this, call setSystemId() on the Source object
that's passed to the transform() method. Relative URIs within the stylesheet
will then be resolved correctly.

Michael Kay 

> -----Original Message-----
> From: Marcus Andersson [mailto:marcus@xxxxxxxxxx] 
> Sent: 11 August 2004 22:19
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Uri resolver in Saxon 8
> 
> I'm trying to import a stylesheet from another stylesheet 
> with Saxon 8 from a servlet running in Tomcat and 
> I'm using dom4j for the documents. I am using 
> TransformerFactory.newTemplates(xslSource).
> 
> How do I need to set it up to make the resolver resolve 
> relative urls (<xsl:import href="common.xsl"/> where 
> common.xsl resides in the same dir as the importing xsl)? The 
> same happens when I use include.
> 
> When I do according to the above I get the following in the log:
> Error at xsl:import on line -1 of :
>    java.io.FileNotFoundException: 
> C:\WINDOWS\system32\common.xsl (The system cannot find the
>    file specified)
> 
> So, what should I do to make my setup work? I have obviously 
> made an error somewhere. Does it depend on how I 
> create my javax.xml.transform.Source for the XSL? Or do I 
> really have to implement a custom URIResolver for 
> this, what I believe, pretty common case?
> 
> /Marcus

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.