Re: 7. Are CDATA sections allowed?

On Wed, Sep 5, 2012 at 10:53 AM, Mike Sokolov <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.


-- 
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 17:10:09 UTC