Page 1 of 1

xsl:include / xsl:import question

Posted: Tue Jul 11, 2006 12:25 am
by Daniel
Hi.. here's my question :

I'm developing a Struts App that produces a XML that is transformed via XSLT to the final html page.

When I deploy my webapp things work as expected. However, the problem arises when using oXygen for create / debug the xsl. Inside oXygen (thru eclipse), all my <xsl:import> or <xsl:include> give me a java.io.FileNotFoundException.

This problem only happens when using the URI relative to tomcat (i.e. <xsl:include href="/resources/xsl/login.xsl"> ).
If I use relative paths the problem goes away, but then I have to go thru all the XSL changing back the imports and exports to the original paths when re-deploying to Tomcat.

I already browsed the oXygen forum looking for an answer and also tried Googleing for a similar issue and possible answer....

Any help would be appreciated.


Daniel

Posted: Tue Jul 11, 2006 9:43 am
by sorin_ristache
Hello,

You can use an XML Catalog to map the URIs of the included/imported modules.


Regards,
Sorin

Posted: Tue Jul 11, 2006 10:42 am
by george
Hi Daniel,

oXygen has support for opening HTTP URLs so instead of opening the local files open the actual http resources and the include/import locations will work.
Otherwise it is just like you will look with a browser to a local file that makes a reference like /test/test.html. If you look at the local file with the browser then /test/test.html will not be resolved to the correct location but if you look at the file served by the web server then the /test/test.html will be solved and served by the web server correctly.

Best Regards,
George