[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: XIncludes with relative paths (libxml + WinXP).
Using libxml 20619 und WinXP, I have a problem when it comes to resolve XIncludes with relative paths. The absolute path, that libxml is building internally seems not to fit libxml's own needs (uri convention), because the file prefix is only written with 1 "/" instead of 3. My main file is stored in "D:\BAZL\doc\de\ml", the chapter "ch-metadata.xml" is also stored at this place, so the following xinclude instruction should work: >>>>>>>>>>>>> <book><title>Title</title> ... <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ch-metadata.xml" parse="xml"> <xi:fallback> <para><emphasis role="bold">FIXME: missing xinclude content (metadata)</emphasis></para> </xi:fallback> </xi:include> ... <<<<<<<<<<<<< Validating the document with xmllint shows the error message: I/O error : failed to load external entity "file%3A/D%3A/BAZL/doc/de/ml/ch-metadata.xml" If I specify an absolute path (not a real solution at all) in the following way: href="D:/BAZL/doc/de/ml/ch-metadata.xml" I would expect libxml to complain too, but it works. libxml resolves it into D:///BAZL/doc/de/ml/ch-metadata.xml which looks strange enough in my eyes ("D:" as protocol?). Only the following looks right: href="file:///D:/BAZL/doc/de/ml/ch-metadata.xml" is resolved into: file:///D%3A/BAZL/doc/de/ml/ch-metadata.xml Is this behavior a bug in libxml and do I have other possibilities than using an absolute path? I played around with xml:base and catalog entries (forcing 3 "/" with a <rewriteUri>), but then I got problems with image paths. As I'm using XPointers too, it seems I'm stuck to libxml, since Xalan is not able to resolve XPointers yet. Any hints are welcome, Georges
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]