Re: [xml-dev] Why does XML call them "attributes" and not name-value pairs?

From
Tim Bray <>
To
Michael Kay <>
Date
2022-01-15T15:26:02Z
ID
<CAHBU6it1fC7DZ5tzMXCzoB8R=>
Thread
Re: [xml-dev] Why does XML call them "attributes" and not name-value pairs?
Haha, "attribute" was inherited from SGML which inherited it from GML.

Next, we could go tell the O-O people that "class" and "object" and "method" are stupid names.

On Sat, Jan 15, 2022 at 6:09 AM Michael Kay <[email protected]> wrote:
Aristotle would have recognised the concept of an attribute, if not its English name, and the term is universally used in data modelling discussions ("entity - relationship - attribute").

Your dictum "don't invent some artificial name" hardly applies, because the term "attribute" is very ancient and well-established. And it doesn't really address the issue: when naming an invented concept, there is always a tension between using a word that means something similar, but not quite the same, in another domain, and inventing a new term. Computing is responsible for many monstrous abuses of terminology, like using the term "real" for numbers that are actually rational, or "function" for something that can have side-effects. Naming of new concepts really depends on whether you want to emphasise the similarities to existing known concepts, or whether you want to emphasise the differences.

Michael Kay
Saxonica

On 15 Jan 2022, at 12:42, Roger L Costello <[email protected]> wrote:

Hi Folks,
 
Someone once told me:
 
               Call it what it is.
               Don’t invent some artificial name.
 
The items in yellow:
 
<Person name="John Doe" employer="Acme Inc." age="30">…</Person>
 
are name-value pairs. 
 
Why does XML call them “attributes”?
 
/Roger