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()) );
