|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Uri resolver in Saxon 8
Marcus,
I tend to use a URIResolver for this sort of thing. The javax.xml.transform.Source interface does not define a mechanism for determining the source file location (there may not even be one) so the XSL transform has no way of knowing where the XSL file came from, thus can't find things relative to it. Using a resolver allows you to specify the relative location of imports at run time which is also useful for testing. You could put the value in an environment variable or system property. The resolve(href, base) method returns a Source object which gives you plenty of flexibility - the imported stylesheet doesn't even have to be in a file. Barry Marcus Andersson wrote: 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).
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








