xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: A mathematical vision of XML leads to interestingconclusions
Date Sun, 19 Dec 1999 01:19:08 GMT
Tim Bray wrote:
> At 02:54 PM 12/18/99 +0100, Stefano Mazzocchi wrote:
> >Topologically speaking, while SGML is an single infinite
> >dimension, XML is an infinite set of infinite dimensions.
> Hmm, I have a math degree and smell no topology.  

Well, yes, it's stretched, I admit it, but I'm a visual type of guy and
I need to visualise things. (the people who worked with me real life
know I can't explain anything without a napkin or a whiteboard :) the
funny thing is that my visual design patterns are viral: almost everyone
who met me bought a whiteboard :)

I'll be more visual: consider a geometry of elements (let's leave
attributes and the other stuff out for now, the idea can be extended to
include them, but this doesn't matter at this point).

SGML (thus XML) can be pictured as a single one-dimentional infinite

> Both XML and SGML allow an infinite number of names.  

Correct. This is pictured by the infinite line.

> Namespaces provide a way (which would work
> in SGML if anyone cared) to partion that infinite set into any number of
> disjoint subsets, each named by a URI.

Namespaces provide a way to colorize segments of this line differently.
>From a validation point of view, this color is included into the picture
and we cannot allow "black&white" validation.
> Having said that, Stefano may be right about the Kozmick Koolness of
> namespaces :)

What really hurts me is the lack of global namespace support in the
XML-related languages. Look at the xsl-list questions "what should the
namespace axis give me?", or the Apache 2.0 issue "how do we validate an
xml configuration if every module adds its own tags?"

Namespaces are there, but there's no way to use them.

In my vision, a namespace is a "versor": it defines the direction of an
infinite line of elements. Each namespace is orthogonal in the sense
that I can "project" a document onto one or more namespaces and there is
no element that belongs to two namespaces at the same time.

Validation (thus XSchema) should include the ability to do "orthogonal
validation", which is done by "projecting" a document (which lies in the
n-dimentions, where n is the number of namespaces used) onto a namespace
and performing "normal" one-dimentional XML validation there.

Another form of validation is to "linearize" the document by placing
each "namespace+element" item on a mono-dimentional line and apply
validation there (like DTDs currently do).

But it's visually easy to see how longer (and more complex) this
validation XSchema must be in order to cover a multi-dimentional space.
In fact, a DTD that mixes two namespaces it's a pain, three is almost

Think about an XSLT_FO_SVG_SMIL.dtd, that would be _very_ handy, one
could even be crazy enough to volunteer to write it. But would you
volunteer to manage it?

My opinion?

XML 2.0 = XML 1.0 + Namespaces + XSchema - DTD

> >While there is a proposed XInclude specification that aims to unify the
> >need for inclusion of external things, there is very little concern
> >about the application of more general object-oriented design patterns,
> >such as inheritance.
> Well, we all seem to agree that descriptive markup, as in XML, is a good
> thing.  Furthermore, everyone now learns in high school that O-O thinking
> is good.  

No, this is not a 1 + 1 = 2 situation. We are in need for a way to avoid
rewriting docs and XML entities are _far_ from useful/useable in this

> Having said that, I just want to point out that a lot of people
> have got into a lot of trouble trying to map the notion of inheritance
> onto the space of markup languages.  

I bet.

> To start with, XML tries hard *not*
> to be O-O by insisting that you separate your data and logic to the
> extent possible.  

I think I've already showed with my XSP proposal a case where this
separation might be a mistake. Data and logic always mix if it's the
logic that creates the data. There is no "one-size-fits-all" way to
avoid that.

> Secondly, it's not clear whether you want to do
> inheritance at the instance or schema level.

Instance. Small steps first.
> A few years ago, the then SGML community made a huge titanic effort and
> produced something called "architectural forms" which was said to do
> inheritance (sort of); unfortunately, only 25 people in the world ever
> understood it.

> Still, it seems that Stefano is correct in saying that something like
> inheritance would probably be very handy.  Proposals welcome. -Tim

I'll take a look at this AF stuff and try to come up with something.

Direct question: are there any plans for the evolution of XML as a spec?

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