473,666 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.p hp on line 10

Warning: compilation error: file /var/www/dynamo/xml/ element import
in /var/www/dynamo/lib/xml/content.class.p hp 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.p hp 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.p hp on line 10

Warning: compilation error: file /var/www/dynamo/xml/test/ element import
in /var/www/dynamo/lib/xml/content.class.p hp 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.p hp 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 1580

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

Similar topics

7
2773
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 php. In other words, if the current working directory is /www/ and you were
0
1356
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 better than implicitly" as the Python philosophy goes. I'm trying to develop a strategy for writing packages using only absolute imports and would really like to know what others have learned. Randall
1
3308
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 appear to work, because the base being used is the Common7\IDE directory, not my original source directory. Here is the situation: MyApp directory contains the file Form1.cs, Form1.xml, and Generic.xml. There is also a subdirectory called...
6
11761
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 source=c:/Inetpub/MyApp/data/database.mdb" /> ...
5
1149
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 example, code in the A.B.C module can do: from . import D # Imports A.B.D from .. import E # Imports A.E from ..F import G # Imports A.F.G -----------------------------------------------
0
1391
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 them. Opening the tutorial I found following notice ( 6.4.2 ): "Note that both explicit and implicit relative imports are based on the name of the current module. Since the name of the main module is always "__main__", modules
0
791
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
1828
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 read: http://mail.python.org/pipermail/python-list/2007-January/422973.html http://groups.google.com/group/comp.lang.python/browse_thread/thread/b1e8dc93471a7079/8751c82cfe1ca3f2?lnk=gst&q=absolute+import#8751c82cfe1ca3f2...
4
956
by: Terry Reedy | last post by:
Download the latest beta for your system and give it a try.
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8552
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.