xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: XML Inheritance Extentions (first try)
Date Mon, 20 Dec 1999 13:30:02 GMT
Brett McLaughlin wrote:

> I think one of the most significant items missing from this is details
> about namespace.  

You're right.

> For example, in your example:
> > <page>
> >   <title/>
> >   <author>John Smith</author>
> >   <body/>
> >   <legal>Copyright (c) 1999 John Smith. All rights reserved.</legal>
> > </page>
> It is fairly reasonable to assume that this template could be extended
> by hundreds of pages across a website, and possible across multiple
> websites (part of the same company).  So I would want to be able to
> assign different namespaces to these variants:
> <contents:page xml:extends="template.xml">
>   <contents:title>Table of Contents</contents:title>
>   <contents:body>
>     <p>Hi, welcome to the table of contents.</p>
>   </contents:body>
> </contents:page>
> and:
> <chapter:page xml:extends="template.xml">
>   <chapter:title>Chapter One: Introduction</chapter:title>
>   <chapter:body>
>     <p>Here is content of Chapter One</p>
>   </chapter:body>
> </chapter:page>
> This allows the same template to be used many places, and still handle
> inclusions.  For example, my contents:page might include portions of
> various chapter:page documents, making namespace support critical.  How
> would this be handled?  This is the problem I was referring to earlier
> when I said that you should be able to easily map namespaces onto XML
> documents.  In this case, you would want an initial run through the
> document to ignore the namespace, handling only [XML_1] and [XML_2]
> where XML_1 is the original document (template) and XML_2 is the
> extending document, minus the namespace.  Then it would be the same
> scenario as you proposed.  At the end of the extension processing, you
> could simply perform A * [XML_2] where A is the desired namespace to
> achive the final XML document, with namespace support, but without
> additional strange processing having to go on.

I agree and I already had the impression I was missing something on the
namespace side. Anyway, I still can't focus on a nice and simple way to
address that problem.
> Of course the complexity increases with multiple namespaces in
> documents.  But let's wait on that until I get feedback on this first
> comment.  What do you think?  I see this as a serious need for inclusion
> in the note.

I do too. Have any ideas on how to do it?

Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------

View raw message