On Wed, 24 Nov 1999, Stefano Mazzocchi wrote:

> Many people consider enternal entities a pain in the butt and I'm
> between them.
> 
> XLink addresses this problem by allowing you to auto-embed XML fragments
> into the document.
> 
> Example:
> 
>  a.xml
> 
>   <?xml version="1.0"?>
>   <a>
>    <b xmlns="http://www.w3.org/XML/XLink/0.9"; href="b.xml" show="parsed"
> actuate="auto"/>
>   </a>
> 
>  b.xml
> 
>   <?xml version="1.0"?>
>   <c>
>    <d/>
>   </c>
> 
> should turn out as
> 
>   <?xml version="1.0"?>
>   <a>
>    <c>
>     </d>
>    </c>
>   </a>
>   
> allowing easy element "mounting"
> 
> Does Xerces support this? if not, any plan to add it in the future?

I obviously don't know if Xerces supports this or not but it still doesn't
entirely address the problem I'm trying to solve by using cocoon's SiteMap
to allow XML documents to mount other XML documents. Using XLink (AFAIK,
please let me know if I'm being ignorant), you still have to manage the
links from the mounter documents to the mountee document in the mounter
documents, so if you change the mountee's location, you have to change the
reference in 'n' mounter documents. If the mounting is handled by a
central map document, changing the mountee's location only requires
changing 1 document. Plus, it will make it easier for cocoon to determine
if its cache is stale since it can monitor the state of the mounted files
rather than trying to rely on the XML parser to do so.

(For the Xerces developers who don't know what I'm talking about and might
be able to tell me why this is stupid or not - I've written a little
producer for cocoon that lets me "mount" xml documents inside other xml
documents on the fly using a central map document:

<url path="/faq/.*">
 <source/>
 <source mount="connectiondefs" file="/home/balld/connections.xml"/>
</url>

will copy the root node from connections.xml into a root child node named
"connectiondefs" XML file requested from the /faq/ URL.)

- donald

Reply via email to