XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Why does XML call them "attributes" and not name-value pairs?

I have always expected that the name is a reference to Knuth's (1969) Attribute Grammars. (Attribute is probably the most common term of art in academic tree literature e.g., for simple information decorating nodes rather than edges, as far as I can see.)

These are context-free grammars which have extra information added by each production. These attributes can be inherited (added top down) or synthesized (added bottom up)  which has an analogy to implied and fixed attributes.

So the SGML/XML infoset could be seen as an abstract  data structure to represent the results of parsing something with an Attribute Grammar. 

Cheers
Rick

P.S. Does this goes against the mythology that SGML was not based on theoretical grammars?

I have suspected it was a cart-before-the-horse argument, because it relies on the idea that 1980s theoretical computer science was complete enough that it could describe every important kind of grammar for computer languaged: did the "poor" use of formal theory in the SGML spec show a flaw in SGML or a flaw in the state of theory at that time? 

Consider that one of the now most common grammars (PEG) and its common parser algorithms (packrat) was only invented 8 years after XML (and 22 years after SGML) was standardised. 



On Sat, 15 Jan 2022, 11:42 pm Roger L Costello, <costello@mitre.org> 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



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS