You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Guillaume Laurès <la...@lra.fr> on 2001/03/13 10:35:15 UTC

XSL include failed for xalan-c

Hello,

I'm sorry to disturb you with user issues, but I have run a strange
problem I can't resolve by myself, maybe you would have informations
that would help me.

We develop an xml app here, with xalanj both as a serlvet (works very
well, with apache JServ) and as command line (works too, from cgi
scripts).

The servlet is used to render html pages (mainly html forms for editing
xml data) served to the client, and the command line equivalent is used
to render html pages for our web site (ftp'd later) and .fo files for
pdf rendering (we then use fop as a servlet to serve directly the
client, it's very nice !).

So we have:
xml docs -> xalanj servlet -> html formulars for editing from a web
client (intranet use)
xml docs -> xalanj servlet -> html files for previsualisation on a web
client, if ok then:
  xml docs -> xalanj command line -> local web site image -> ftp
mirroring script on the real site (http://www.lra.fr)
xml docs -> xalanj command line -> temporary .fo file -> fop servlet ->
pdf file for previsualisation on a pdf-enabled web client (with acrobat
plug-in basically)

If anybody needs help on how to setup this I can help...


What I would like to do with xalan-c is replace xalanj calls in the cgi
scripts. That would speed up much of the background html rendering, as
well as the .fo rendering.


The problem is that we have a global xsl file defining our most used
templates. It is included into all of our stylesheets.
Here is how one of our regular xsl file looks like:
<?xml version="1.0" encoding="ISO8859-1"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version="1.0">

<xsl:import href="/var/www/xsl/serveur.xsl"/>
...
</xsl:stylesheet>

With xalan-c, here is what I get:

[gla@pc-gla c]$ bin/testXSLT -IN /var/www/xml/manageffi/om23.xml -XSL
/var/www/xsl/faxing/formation.xsl 
========= Parsing /var/www/xsl/faxing/formation.xsl ==========
XSL Warning: Fatal Error at (file , line 0, column 0): An exception
occured! Type:RuntimeException, Message:The primary document entity
could not be opened.
Id=file:///var/www/xsl/faxing//var/www/xsl/serveur.xsl, line 7, offset
46
XSL Warning: Error parsing /var/www/xsl/faxing/formation.xsl
XSL Warning: processStylesheet not successfull!

SAXException Message is : An exception occured! Type:RuntimeException,
Message:The primary document entity could not be opened.
Id=file:///var/www/xsl/faxing//var/www/xsl/serveur.xsl

It looks like xalan-c is taking the href as a local path from the xsl
directory. Is this normal ?
If I cut the import to:
<xsl:import href="serveur.xsl"/>
and put the xsl templates file (serveur.xsl) into the same directory as
the xsl document, it finds it... but fails later (either the xsl
document required another external file, xsl or xml, and it ran on the
same problem; or the xsl document made a call to a variable defined in
the xsl template file, we'll see that later...).

Is it a bug in xalanc-c 1.1 on linux ? Or should the absolute path be
specified in another way ?
Thanks if you can give me an answer.

Guillaume Laures 
Responsable systemes et Techniques - EBI
Tel: 01 46 29 68 24