Re: Is inclusion stable?

At 11:58 AM +0100 1/27/04, Daniel Veillard wrote:

>   Well that question is not answered in the XML specification either,
>I don't see why XInclude should. In XML as far as I remember there
>is nowhere specified that referencing multiple time an external
>parsed entity, the same content should be used each time. This
>is implementation dependant at the XML level (though I bet all
>implementations reuse the same content for the resource), and I think
>it would be stange to require this at the XInclude level (though
>again I would expect nost implementations to reuse the same content
>for the resource). But I could see case where XInclude processors
>operating in embedded systems would give more weight to memory
>consumption than processing costs and no do caching in such an
>environment. IMHO it's better left an implementation choice.

I certainly don't think it's obvious that implementations cache, 
because, well, mine don't. :-) My concern is, especially in streaming 
implementations, that caching everything is antithetical to the very 
nature of streaming where you typically don't even cache the document 
you're working on now. On the other hand, I'm also increasingly 
convinced that a streaming XInclude just isn't feasible when 
XPointers are allowed, even basic element and bare name pointers. You 
have to load and keep entire documents in memory. So maintaining a 
cache would only be an issue if the cache exceeded available memory 
while the individual documents didn't.

Still, even if this is to be implementation dependent (like XML 1.0) 
that should be called out in the spec. XML 1.0 left a lot of things 
unsaid it probably shouldn't have. There's no reason to repeat that 
here.
-- 

   Elliotte Rusty Harold
   elharo@metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)
   http://www.cafeconleche.org/books/effectivexml
   http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA

Received on Tuesday, 27 January 2004 14:44:47 UTC