473,322 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

xsl imports relative to current file instead of xsl file

In the directory /var/www/dynamo/xsl is the basic xsl file for xhtml
documents /var/www/dynamo/xsl/xhtml.xsl. In this file there is an import
statement: <xsl:import href="xhtml/basic.xhtml.xsl" />.
This import statement should load /var/www/dynamo/xsl/xhtml/basic.xhtml.xsl
as far as I know.

The current document is /var/www/dynamo/xml/index.xml (.xml documents are
handled by the PHP parser on my server). This is the error message I get:
Warning: I/O warning : failed to load external entity
"/var/www/dynamo/xml/xhtml/basic.xhtml.xsl"
in /var/www/dynamo/lib/xml/content.class.php on line 10

Warning: compilation error: file /var/www/dynamo/xml/ element import
in /var/www/dynamo/lib/xml/content.class.php on line 10

Warning: xsl:import : unable to
load /var/www/dynamo/xml/xhtml/basic.xhtml.xsl
in /var/www/dynamo/lib/xml/content.class.php on line 10

If I change the import statement to
<xsl:import href="../xsl/xhtml/basic.xhtml.xsl" /> the page is displayed
correctly.

So from this I learn that the xsl imports are not relative to the parent xsl
file... This is confirmed by visiting the page
at /var/www/dynamo/xml/test/index.xml. With
the ../xsl/xhtml/basic.xhtml.xsl import statement I get the error:

Warning: I/O warning : failed to load external entity
"/var/www/dynamo/xml/xsl/xhtml/basic.xhtml.xsl"
in /var/www/dynamo/lib/xml/content.class.php on line 10

Warning: compilation error: file /var/www/dynamo/xml/test/ element import
in /var/www/dynamo/lib/xml/content.class.php on line 10

Warning: xsl:import : unable to
load /var/www/dynamo/xml/xsl/xhtml/basic.xhtml.xsl
in /var/www/dynamo/lib/xml/content.class.php on line 10

Same behaviour. I don't remember the XSL import to work like this :-(
Is it a change/bug in the latest xsl or php5 release? Can I change this
behaviour so that the imports are handled relative to the xsl file?

Thanks in advance,
Rutger Claes
--
Rutger Claes rg*@rgc.tld
Replace tld with top level domain of belgium to contact me pgp:0x3B7D6BD6
Do not reply to the from address. It's read by /dev/null and sa-learn only

Jul 17 '05 #1
0 1562

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Doug | last post by:
If I were to write an include with a relative path like include("../conf/config.php"); What is the use? As far as I understand it, the path is relative to the first script that is called by...
0
by: Randall Smith | last post by:
I've noticed the push by Guido and others to use absolute imports instead of relative imports. I've always enjoyed the ease of relative imports, but am starting to understand that "explicit is...
1
by: Alex VanderWoude | last post by:
I am trying to <include> some text into an XML documentation topic, but that text is stored in a file that is in a different directory than the "current" XML file. Using a relative path does not...
6
by: openleren | last post by:
Hi all, how can I use a relative path in my web.config file for an Access db?: Instead of using <configuration> <appSettings> <add key="conAccess" value="microsoft.jet.oledb.4.0;data...
5
by: John Salerno | last post by:
I'm reading the "What's New" section of the 2.5 docs, and I'm a little confused by the last section of "Absolute and Relative Imports": ----------------------------------------------- For...
0
by: Kay Schluehr | last post by:
Since their introduction in Python 2.5 I only reviewed the new "relative import" notation briefly by reading the "What's new in Python 2.5" article. Now I wanted checkout if I get comfortable with...
0
by: John Millikin | last post by:
With the old import system, and a package that looks like this: foo/ __init__.py main.py bar/ __init__.py baz.py If I wanted to delay importing baz until it was actually used, I could
4
by: DG | last post by:
Alright, I have searched and searched and read many conversations on the topic of relative and absolute imports and am still not getting the whole thing through my skull. Highlights of what I've...
4
by: Terry Reedy | last post by:
Download the latest beta for your system and give it a try.
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.