Lists Home |
Date Index |
On Thursday 31 January 2002 04:49 pm, Jonathan Borden wrote:
> It is not a simple fact at least if we are still talking about XML.
> XML 1.0 says that the _type_ of an element is its name or GI.
I think this is a misnomer carried over from the ancient days of SGML.
> Generally the 'type attribute' has a special place in the list of
> 'attributes', i.e. the "isa" link. So, not (element has-a GI) rather
> (element isa GI).
This assumes that the notion of "type" as the term used above is
roughly akin to that of statically typed languages. The "is-a" asserts
that something belongs to a certain "type"... the type itself
generally specifying the structure of the thing, and usually
From my POV, XML is data.... a stream of bytes, converted to
characters, and then parsed to reveal a markup tree. You can process
XML at any other these levels, or at levels even higher than this,
where the higher levels are projected over these.
The markup tree can be interpreted as one sees fit.... in other
words, the markup tree is really not much more than an attributed
tree/AST. You can interpret that tree as you like. In a statically
typed/validated system, you would run through and say "this node has-a
gi of 'foo', so therefore, I will say that it 'is-a' or 'is-of' the
'foo' type", and then validate that type association. This is roughly
what happens inside a compiler... and is the reason why I was an early
supporter of making validation orthoganal to parsing.... validation is
projecting a type system over an untyped tree.
> In any case it is not typical to equate "isa" and "has-a"
> links and I suspect that if you do so, you will lose processing
My assertion is that there is no 'is-a' relationship in XML unless it
has been projected over the instance by a processor... and that 'is-a'
requires 'has-a' to operate. In other words, you lose no processing
My entire objection to namespaces is that they propogate the myth that
'is-a' relationships exist at all. The name of a thing and the thing
are logically distinct entities, and names are open to interpretation.
The *thing* though, exists.
Sounds kind of like Zen to me...