Check out the XSLT spec at http://www.w3.org/TR/xslt#include. According to
the spec, in an xsl:include tag, a relative URI as the value for the href
attribute should be interpreted as starting in the same directory as the
including stylesheet.
Example:
assume that a stylesheet /www/xsl/A
We have observed this behaviour with Xalan (1.2.x family) both in and
outside of app servers. Xalan uses the "working directory", according to
Java, as the base URI. Which is of course wrong.
Dunno about Xalan2. Possibly fixed. In any case I'm planning to switch over
to Saxon.
Regards,
Arved
Does Saxon solve this particular issue? If so, how?
Thanks, tim.
We have observed this behaviour with Xalan (1.2.x family) both in and
outside of app servers. Xalan uses the "working directory", according to
Java, as the base URI. Which is of course wrong.
Dunno about Xalan2. Possibly
I was just trying out 6.2 and posted a question to a reply here on
that..because it doesn't seem to be using my local web-app root still.
-Original Message-
From: Tim Endres [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 11:02 AM
To: Orion-Interest
Subject: RE: Why
I haven't looked at Saxon with respect to this particular issue. However, I
went and looked at my copy of Michael Kay's book a few days ago, and he
confirms the behaviour described in the spec. If you have used SAXON in any
other way, and/or followed Mike on the Mulberry XSLT mailing list, you'll
I can't seem to find the email with the setSystemId(). Can you either
forward it to me, or show me how you did it so I can try it out. Where is
that set specifically?
Thanks.
-Original Message-
From: Arved Sandstrom [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 12:07
Hmm..
I am using the following code to read in the XSL. Its not the most efficient
way..but it is how I am doing it. I am now starting to see that this must be
the problem..although I am not sure why.
StreamSource xslStream = null;
StreamSource xmlStream = null;
String urlPrefix =
I can't seem to find the email with the setSystemId(). Can you either
forward it to me, or show me how you did it so I can try it out. Where is
that set specifically?
Thanks.
Here it is. Not very detailed, but hopefully the clue you need.
tim.
-Original Message-
From: Matt
I think the problem is that you are opening the connection yourself. I think
if you hand the URL String to the XsltInputSource constructor, and let it
open the connection, then it will properly set the base. As it is, the source
can not see the URL, and thus does not know how to set the base.
It was an email from Matt Krevs.
I threw in:
File xsl = ...; // the stylesheet as a java.io.File
XSLTInputSource stylesheet = new XSLTInputSource( new FileReader( xsl ) );
stylesheet.setSystemId( "file:" + xsl.getAbsolutePath() );
This works fine with Xalan 1.2.2.
Regards,
Arved Sandstrom
Yes, we had this problem. I think its an XSL thing rather than an Orion
thing.
We are using Xalan and call XsltInputSource.setSystemId() to set the root
directory for transformations
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Duffey, Kevin
Sent:
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
When you run Orion, are you starting it from /Orion? Try starting it from a
different directory, and see if that changes where saxon searches for
includes. My guess, is that it's just looking in the working directory by
default.
Look through the saxon doc's to see if you can set a property to
13 matches
Mail list logo