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 22:36:17 GMT
Brett McLaughlin wrote:

[...]

> Not with XML today.  This is (and I'm playing the same old tune) a
> problem with the current XML model - the namespaces specification
> doesn't _really_ provide any sort of "multiplier" that is applied to an
> XML document.  Once the namespace is used, there _is_ a difference
> between <element> and <namespace:element> in terms of equality.  There
> is no way (that I know of in anything I've read) to say, "Oh, these are
> the same element, and one just has a namespace mapped to it."  This
> would come in great use, particularly when you have <namespace1:element>
> and <namespace2:element> and element is the same in both.  Oh, to be
> able to use the vector type mentality you mentioned earlier...
> 
> At the same time, I think your proposoal may be important enough to
> begin to try and firm up the XML namespace concept as a precursor.

Right. At least, try to expose namespace orthogonality thru merging
rules.

> However, this is a _lot_ to bite off.  

No kidding. It's a very steep paradigm shift.

> I am more than willing to help
> with it, but as you said, you were trying to keep it simple.  I think it
> would be nice to be able to do (in an XML Schema):
> 
> <archetype name="myElementType">
>   <element name="title" type="string"/>
>   <element name="page" type="integer"/>
> </archetype>
> 
> <element name="myElement" type="myElementType" namespace="Book"/>
> 
> This would allow the element myElement to be mapped to the Book
> namespace, resulting in <Book:myElement> being allowed in the
> constrained document.  The magic here is that we can suddenly also have:
> 
> <element name="myElement" type="myElementType" namespace="Cassette"/>
> 
> and the comaprison between these is a piece of cake!  Is is trivial to
> see that <Book:myElement> and <Cassette:myElement> are the same - so
> inheritance would be easy:
> 
> <myExtendedElement xml:extends="template.xml" xml:namespace="Book">
>   <!-- Content -->
> </myExtendedElement>
> 
> At runtime/parsetime, this could then be extended (because
> myExtendedElement would extend the correct element) and then the Book
> namespace would be applied post extension.  This cleanly seperates
> namespace, and allows vector type mapping (I keep saying it - i want to
> do A * [XML_1] type mappings!).
> 
> Does this make sense?

It does. I'll let this percolate thru my brain cells tonight...

-- 
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 ---------------------



Mime
View raw message