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

Re: Namespace well-formed external parsed entities?

From: Daniel Veillard <veillard@redhat.com>
Date: Thu, 20 Oct 2011 13:48:10 +0800
To: "Grosso, Paul" <pgrosso@ptc.com>
Cc: public-xml-core-wg@w3.org
Message-ID: <20111020054810.GC2677@redhat.com>
On Wed, Oct 19, 2011 at 09:58:13AM -0400, Grosso, Paul wrote:
> 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.

  To try to feed the thread with some hopefully useful input,
I did add upon popular request a function in libxml2 allowing
to parse a well balanced chunk of XML "in node context", the
idea was to reference a given existing node in the document and
parse the chunk as if it had been at that place in the input,
allowing to relatively easilly and under the hood carry the
needed context informations:
  - entities defined
  - in scope namespaces
  - encoding (serious issue when you parse 'out of context'
    something which is not formally defined as an entity)

  http://xmlsoft.org/html/libxml-parser.html#xmlParseInNodeContext

 the advantage of proposing the API that way is that I don't
have to enumerate a priori all the informations that need to be
passed to parse that chunk in a coherent fashion, it's also
a bit simpler from an user's perspective.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
Received on Thursday, 20 October 2011 05:48:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 20 October 2011 05:48:47 GMT