[xml] Possible bug in interaction of xml:base and external entities

I *think* xmllint is defining xml:base wrongly in
the presence of external entities - but I'm prepared
to be told I'm wrong or I'm using xmllint inappropriately.

Consider the pair of documents:

1: wrapper.xml

<!DOCTYPE wrapper [
<!ENTITY contents SYSTEM "subdir/contents.xml">

2: subdir/contents.xml


If I open up wrapper.xml in the xmllint --shell, without
using "--noent", then I can't look inside the &contents;
entity (or at least, I can't find a way to do so)

So instead, if I open it up using xmllint --noent --shell,
then take a look at the <node/> inside &contents; and
ask for its base URI, I get told "wrapper.xml", when in fact
the base URI ought to be "contents.xml", or possibly
"subdir/contents.xml" - or so it seems to me, anyway.

How ought I to use xmllint to inspect nodes inside entity

In a similar vein, when using xsltproc, are there any extension
functions which allow me to access the base URI of a node?

Dr. Toby O. H. White
Dept. Earth Sciences,
Downing Street,
Cambridge CB2 3EQ
United Kingdom

Web: http://uszla.me.uk

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]