Re: Reminder, blatant ad

From: Jan Hidders <jan.hidders_at_REMOVETHIS.pandora.be>
Date: Thu, 09 Feb 2006 21:49:02 GMT
Message-ID: <iNOGf.246127$M64.7753857_at_phobos.telenet-ops.be>


Marshall Spight wrote:
>
> I thought I remembered you saying to me once that attributes were
> unordered and element were ordered. (Or was it the other way around?)

No, that is correct.

> But that confuses me; since elements can be nested but attributes
> can't, this seems to say that you can have nested ordered data but
> not nested unordered data. Why?

No no, there is no ordering *between* attributes, i.e., for a 'table' element the 'width' attribute and 'border' attribute have to particular order; there is no such thing as the first attribute. But inside the attribute the data is ordered. All data is ordered.

> One sign of good design I look for is
> orthogonality. Anyway I still haven't heard any clear indication of
> when or why one would use elements vs. attributes. They seem to have
> substantial overlap.

The same holds for attributes and entities in ER models; you can often choose whether you want to model something as a full-blown entity or merely as an attribute. Why do you think that is a problem?

> Is XML Schema supposed to replace DTDs?

Yes.

> The idea of the type system
> and schema being separate and optional relative to the data format is
> incomprehensible; I cannot distinguish between an optional type
> system and no type system.

If you think it is important and you are in control of all the data streams then you can enforce it. If you are not control, then you are still able to deal with it. It simply gives you more choice.

> (The FP community has as meme that says that retrofitting a type
> system onto a programming language is hard, bordering on doomed; that
> would seem to apply here.)

Are you sure you are not confusing the data model with the language. XQuery is not the only language for manipulating XML data. XQuery was from the start designed to be a typed language and typing was certainly not retro-fitted onto it.

> I am still at a loss to explain the attraction of XML-family
> standards to impressive people such as yourself and Philip Wadler. My
> only working hypothesis is that it's the same reason that Sherlock
> Holmes took cocaine. Even thought it's really unhealthy, there's just
> not enough going on to keep the powerful mind occupied otherwise. I
> note that Wadler has done a lot with XML but still says "The problem
> that it solves isn't very hard, and it doesn't solve it very well."
> This would seem to fit my working hypothesis.

I can only confirm what Phil said, but would add "but it solves them well enough to be useful" and I am quite sure he agrees with that. It's a bit like C++, it's often clumsy, unelegant and very baroque, but it usually does the job and (last but not least) it is a widely accepted standard. The importance of this final point is easily underestimated.

  • Jan Hidders
Received on Thu Feb 09 2006 - 22:49:02 CET

Original text of this message