So within the XSL file's xsl:import, I need to use the whole path to the imported XSL file? From what basepath, the root of the drive? Doesn't that completely break the notion of a portable web application?
I have multiple XSL files that do roughly the same thing and I'm trying to do is encapsulate the common templates in a separate file. Is there any workaround to what I'm trying to do? -----Original Message----- From: BAILLEUX Beno�t FTRD/DMI/CAE [mailto:[EMAIL PROTECTED] Sent: Tuesday, 04 June, 2002 3:25 To: Andy Kriger; [EMAIL PROTECTED] Subject: RE: using xsl:include or xsl:import? The JSP file is pre-compiled as a servlet by the servlet engine, and is executed from a location that is dependent of its configuration. As a result, it is not possible to use a relative path to a document in an URL. You should use the entire path to your stylesheet. -- BB -----Message d'origine----- De : Andy Kriger [mailto:[EMAIL PROTECTED] Envoy� : mardi 4 juin 2002 08:34 � : [EMAIL PROTECTED] Objet : using xsl:include or xsl:import? I am trying to use xsl:include or xsl:import in a stylesheet being called from a JSP page. I am getting an exception that the xsl:include file cannot be found. What do I need to do to set this up correctly and have the xsl:import work? --- in XSL file--- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" <xsl:import href="stylin.xsl"/> </xsl:stylesheet> --- in JSP --- javax.xml.transform.TransformerFactory tFactory = javax.xml.transform.TransformerFactory.newInstance(); javax.xml.transform.Transformer transformer = tFactory.newTransformer(new javax.xml.transform.stream.StreamSource(xsl)); transformer.transform( new javax.xml.transform.stream.StreamSource(xml), new javax.xml.transform.stream.StreamResult(response.getOuputStream()) );
