This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: file path peculiarity with xinclude


Hi,

Investigation has continued! I tried validating the document with xmllint
and got the same problems (looking for the file a level above its actual
location), so the issue isn't with Elliotte's XIncluder app.

What does seem to be causing trouble is where the entities are declared.

Currently, for some of the documents, the external entities used are
declared in a separate .ent file (they're used in a few documents in the
same directory, so the relative paths to the external files are the same for
all the documents), really just to save declaring an identical set of
entities in each doc.  The .ent file is then used as a parameter entity in
each of the documents.

So, for instance, the .ent file has

<!ENTITY foo SYSTEM "../../common/foo.xml">
<!ENTITY bar SYSTEM "../../common/bar.xml">
<!ENTITY tip SYSTEM "../../common/fooBarTip.xml">

The .ent file is saved in the common directory as well.

Then in the various documents that use it, the ent file is referenced thusly

<!ENTITY % myents SYSTEM "../../common/foobarents.ent">
%myents;

This works fine for just generating HTML or PDF output from the individual
documents. If I try to combine them in a master document with xincludes,
though, the xinclude app finds the .ent file but then can't find any of the
files it references.  The error I get back from xmllint, for instance, is

warning: failed to load external entity "../../../common/foo.xml"

even though the file is at

"../../common/foo.xml"

relative to both the subdocuments and the document with the xincludes.


I've discovered if I declare the entities in the documents themselves,
everything works fine, so I suppose I can do that.  It's just odd.  Any
explanations from the more XML-savvy gratefully received!  Hope this makes
sense.

cheers,

Lisa





-----Original Message-----
It is hard to tell from the information you've provided.
Could you give a little more detail of where the files
are and how they are being referenced by xinclude and
entity references?  Also, where are the entities being
declared?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]