- From: Grosso, Paul <pgrosso@ptc.com>
- Date: Wed, 19 Oct 2011 09:58:13 -0400
- To: <public-xml-core-wg@w3.org>
Henry, I'm not sure how your message relates to my quoted statement. I know external entities don't need to contain their own namespace declarations. That was the point of the second part of the disjunction in my statement. I was suggesting that the proposed query/xslt function could define some way to pass in-scope namespace declarations as part of the function call--in some fashion perhaps analogous to how the xmlns() xpointer scheme is used to pass such when processing an element() xpointer--then that could address the "prefix declared" nammespace constraint. The only other issue Norm mentioned was that the namespace spec talks about "documents" not "external entities", but that seems like something fairly easily addressed by some weasel words. paul > -----Original Message----- > From: Henry S. Thompson [mailto:ht@inf.ed.ac.uk] > Sent: Wednesday, 2011 October 19 2:36 > To: Grosso, Paul > Cc: public-xml-core-wg@w3.org > Subject: Re: Namespace well-formed external parsed entities? > > 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: > > foo.xml: > <!DOCTYPE foo [ > <!ENTITY a SYSTEM "a.ent"> > <!ENTITY foo "foo"> > ]> > <foo>&a;</foo> > > a.ent: > <a>&foo;</a> > > If that's true, then by analogy the following is also OK > > foo.xml: > <!DOCTYPE foo [ > <!ENTITY a SYSTEM "a.ent"> > <!ENTITY foo "foo"> > ]> > <foo xmlns:p="p">&a;</foo> > > a.ent: > <a><p:b/></a> > > 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 > loaded; > or > > 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. > > ht > -- > 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 13:58:51 UTC