W3C home > Mailing lists > Public > public-xml-core-wg@w3.org > October 2011

Re: Namespace well-formed external parsed entities?

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Wed, 19 Oct 2011 08:35:40 +0100
To: "Grosso, Paul" <pgrosso@ptc.com>
Cc: <public-xml-core-wg@w3.org>
Message-ID: <f5b4nz5h1rn.fsf@calexico.inf.ed.ac.uk>
Grosso, Paul writes:

> the namespace declaration must be in the entity itself or can
> be "inherited" from the "load environment" (in a fashion somewhat
> similar to what the XPointer xmlns() scheme allows one to do
> for xpointers).

I see nothing in the XML spec. which suggests that external entities
have to be self-contained.  In particular, as far as I can see the
following is entirely OK:

<!DOCTYPE foo [
<!ENTITY a SYSTEM "a.ent">
<!ENTITY foo "foo">


If that's true, then by analogy the following is also OK

<!DOCTYPE foo [
<!ENTITY a SYSTEM "a.ent">
<!ENTITY foo "foo">
<foo xmlns:p="p">&a;</foo>


But, this raises the question of what the point of the proposed
function is -- if its goal is to yield a (sequence of) document nodes,
then either 

 a) Not all XML-usable/XML-namespace-usable* external entities can be

 b) Namespace fixup may be required, presumably using XQuery-defined
    namespaces which are in scope.

*A 'document' is XML(-namespace)-usable if there exist well-formed XML
documents which (sc. successfully) include it as an external entity.

       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]
Received on Wednesday, 19 October 2011 07:36:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:43 UTC