Title: RE: Why xsl:include seems to try to find files in /Orion folder a nd n ot web-app root?
Well... don't get confused... one thing is the xslservlet and another the xslt processor....  The error you are experiencing is not necessariliy a bug....  <xsl:include href="/"/> would mean a "root path" but relative to where? it is of course in your case relative to the app server... I'd take me too much time to tell you about the "file:/C:/orion" stuff so I won't get into it.... if this is your code, I'd suggest you make an uriresolver and set the systemid and/or publicid (so the document processor knows where is its base).... if this is from the xslservlet, tough titties as it has many bugs....
 
-- Victor
-----Original Message-----
From: Duffey, Kevin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 3:07 PM
To: Orion-Interest
Cc: Duffey, Kevin
Subject: RE: Why xsl:include seems to try to find files in /Orion folder a nd n ot web-app root?

Alrighty fellas..I just got the latest 6.2 Saxon, put it in my www\WEB-INF\lib dir, and remove xalan.jar from Orion directory. When I do the following in XSL:
 
<xsl:include href="/include/include.xsl"/>
 
It keeps telling me in the Orion window:
 
Error at xsl:include on line 4 of file:/C:/orion/:
  \include\include.xsl (The system cannot find the path specified)
Exception while trying to transform document. MESSAGE = Failed to compile stylesheet. 1 error detected.
 
So I ask..why does it say its looking in file:/C:/orion/: ?? I made sure there isn't any saxon.jar or xalan.jar in the classpath, and Orion automatically picks up anything in the web-inf\lib dir (right?) as part of the packages accessible via the web-app classpath. So I am not sure why this is still happening. Is there a call I need to make to get the web-app local root? Or do I need to provide a hard-coded variable on every xsl page that is then used for this purpose?
 
Thanks.

 
-----Original Message-----
From: Victor A. Salaman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 6:48 AM
To: Orion-Interest
Cc: Duffey, Kevin
Subject: RE: Why xsl:include seems to try to find files in /Orion folder a nd n ot web-app root?

Saxon 6.2
-----Original Message-----
From: Rodrigo B. de Oliveira [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 6:54 AM
To: Orion-Interest
Cc: Duffey, Kevin
Subject: RE: Why xsl:include seems to try to find files in /Orion folder a nd n ot web-app root?

And out of curiosity, which XSLT processor are u using then?

Rodrigo

-----Original Message-----
From: Victor A. Salaman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 2:47 AM
To: Orion-Interest
Cc: Duffey, Kevin
Subject: RE: Why xsl:include seems to try to find files in /Orion folder
a nd n ot web-app root?


Orion should just replace Xalan for Saxon anyways... and use TraX instead of
a propietary interface to Xalan... Xalan is Apache's excuse for having a
XSLT processors, besides being one of the slowest in the crowd...

-- Victor

-----Original Message-----
From: Tim Endres [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 1:07 AM
To: Orion-Interest
Cc: Duffey, Kevin
Subject: Re: Why xsl:include seems to try to find files in /Orion folder
and n ot web-app root?


If you read the xalan source, you will see that this is a problem with
xalan.
The method that determines the location of the included file is written to
be
file-system and URL based. If has no concept of calling a method like
"getRealPath()" to get a path relative to your webapp. The code is a mess.

The xalan folks should rewrite this complicated code to simply call an
interface that the programmer provides. Then your interface would be called
to locate a file, allowing you to apply the getRealPath() method that you
really want it to use. I am not sure if Xalan II addresses this or not.

The only way Orion could fix this is to patch the xalan code, which I think
would be a very bad idea.

The way that we solved the problem was to pre-compile the xsl pages in place
in our development tree, which presented XSL with a simple file-system to
locate included files. We then load the compiled pages for XSLT processing.
This also speeded up processing times.

tim.

> Hi,
>
> When I use the <xsl:include..> directive, it appears to look in server
root
> dir, and not the web-app root its deployed in. I am not quite sure if this
> is something to do with Orion, or if all servers operate in this manner
and
> therefore its an error of the XSLT technology. Or..perhaps its an error of
> the saxon library I am working with. Just wondering if anyone working with
> Orion and XSL have seen this problem or not?
>
> Thanks.
>

Reply via email to