You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <sy...@anyware-tech.com> on 2001/03/27 10:52:12 UTC
Re: (workaround) [C1]xsl:import doesn't work with Saxon
Sylvain Wallez a écrit :
>
> Hi,
>
> I'm trying Saxon with C1 and xsl:import doesn't work : it appends the
> full path name of the included XSL to the current directory, e.g.
> C:\tomcat\bin\D:\dev\mywebapp\import.xsl
>
I found the problem : Saxon considers the file name to be a relative URL
since it doesn't start by a protocol identifier.
A quick workaround is to add "file:/" to the sheetBase (see patch
below), but it's only a quick hack since it assumes that stylesheets are
always loaded from files.
How can I retrieve the absolute URL (with protocol) ?
Index: SAXONTransformer.java
===================================================================
RCS file:
/home/cvspublic/xml-cocoon/src/org/apache/cocoon/transformer/SAXONTransformer.java,v
retrieving revision 1.2
diff -u -r1.2 SAXONTransformer.java
--- SAXONTransformer.java 2001/03/10 14:09:47 1.2
+++ SAXONTransformer.java 2001/03/27 08:48:14
@@ -304,7 +304,7 @@
DOMSource source = (sheetBase == null)
?new DOMSource(sheet)
- :new DOMSource(sheet, sheetBase);
+ :new DOMSource(sheet, "file:/" + sheetBase);
Templates templates = _factory.newTemplates(source);
--
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org