RE: 7. Are CDATA sections allowed?

Now I think I know what I was thinking.
The "base URI" property in the data model.
Without external parsed entities or an xml:base attribute, does the data model need to expose a "base uri" property on elements ?



-----------------------------------------------------------------------------
David Lee
Lead Engineer
MarkLogic Corporation
dlee@marklogic.com
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com<http://www.marklogic.com/>


From: David Lee [mailto:David.Lee@marklogic.com]
Sent: Wednesday, September 05, 2012 2:48 PM
To: Uche Ogbuji; public-microxml@w3.org
Subject: RE: 7. Are CDATA sections allowed?

Thanks for the clarification all ...
Where I was getting confused is with xinclude vs external entities.
Too much to keep in my small brain all at once.

 ( That and isn't the base URI property of the root element external parsed entity set to its own URI ? ) ....
too many baseURI's for one day ...


-----------------------------------------------------------------------------
David Lee
Lead Engineer
MarkLogic Corporation
dlee@marklogic.com
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com<http://www.marklogic.com/>

From: Uche Ogbuji [mailto:uche@ogbuji.net]
Sent: Wednesday, September 05, 2012 1:12 PM
To: public-microxml@w3.org
Subject: Re: 7. Are CDATA sections allowed?


On Wed, Sep 5, 2012 at 11:09 AM, Uche Ogbuji <uche@ogbuji.net<mailto:uche@ogbuji.net>> wrote:
On Wed, Sep 5, 2012 at 10:53 AM, Mike Sokolov <sokolov@falutin.net<mailto:sokolov@falutin.net>> wrote:
On 09/05/2012 12:47 PM, Michael Kay wrote:
>All this time I thought xml:base would override the base URI used for resolving external entities.

It can't. It can only affect the base URI of elements within its scope, and external entity URIs don't appear within the scope of any element.
I think "external entity" has some special meaning here that isn't apparent to me.  I thought that xml:base was made available as a hint for a URI resolver resolving relative URIs within a document, and that these relative URIs might in turn resolve to something external to the document - what David is referring to as an external entity.

No, an external entity is something very specific, not just "something external to the document."

Again back to the layers. External entities are handled by the parse layer.  xml:base only applies at the application layer, which is separate.  So for example other applications such as XInclude can recognize xml:base.  In general if you need to do something somewhat like external entities, but need to use xml:base, XInclude is the way to go, though you might need XPointer as well if you want one inclusion to contain multiple root elements, because XInclude targets must be well-formed documents, not general entities.

Oops. Just wanted to add the nit-picky point that it's a different matter if you use parse="text"‎, but then you can only include character data, not text.


--
Uche Ogbuji                       http://uche.ogbuji.net

Founding Partner, Zepheira        http://zepheira.com

http://wearekin.org

http://www.thenervousbreakdown.com/author/uogbuji/

http://copia.ogbuji.net

http://www.linkedin.com/in/ucheogbuji

http://twitter.com/uogbuji

Received on Wednesday, 5 September 2012 18:50:28 UTC