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] XML attributes are weird

 its a permathread but I keep on learning ... wow what a cogent post

On Sat, Dec 21, 2013 at 11:06 PM, Steve Newcomb <srn@coolheads.com> wrote:
One of the pieces of the puzzle turns out to be understanding that the
generic identifier of an element (the element type name) is best
understood as the value of the special attribute, one that's always
present, and that has no name.  Once you internalize that idea, you
begin to understand that data about data (metadata) are not optional,
even though they are absolutely data like any other data.  The
distinction between metadata and data cannot be dismissed or ignored,
even on Computer-Sciencey grounds.

this insightful paragraph is especially relevant ... and reminds me that we sometimes go far beyond compsci and into other disciplines like analytic philosophy (as well as take some wisdom from biological taxonomy). 

For example, I try to imagine if someone came upon an xml document with no 'a prior' knowledge. In this situation, we are all like Carl Linnaeus, using principle traits to delineate elements into a linnaean-like taxonomy (phylum,class, order ...). 

http://en.wikipedia.org/wiki/Carl_Linnaeus

Each element could be unique in its domain (defined at the document borders?) crisply demarcated when contrasted with other elements (otherwise partitioned by namespace). 

It follows that if 'name' is a special attribute then what other attributes would we add to elements to aid taxonomy ... part of the puzzle (and dynamic flexibility) lies in the fact that the full definition of an element uniqueness is not defined by just an instance of data but can be further defined by using a schema.

Looking at things this way things, an ID attribute values provide local uniqueness ... the idea that an element can have an ID is a global trait which follows on the same for any other attribute name. 

Would it be wrong to say that what uniquely defines an element is;

    element = (special element name attribute* + all attribute names*) + schema? + ns

Where things get very confusing (for me) is the dichotomy of looking at an element sans potential allowed children vs with children. Are these 2 different things ? Or is it just a matter of practicality for composition ?  

I think the point I am (laboring) trying to make is that attribute sets should be chosen carefully ... too much overlap (in the same ns) and you dilute the uniqueness of every element. Alternately, not having any attributes or just representing everything with elements might lead to an awkward data model.

Of course, in compsci, we know naming things is hard ... Aristotle wrote at length about it and we have analytic philosophers churning theory

http://en.wikipedia.org/wiki/Naming_and_Necessity
 
Take the following nugatory examples;

   <el color="true" color_value="blue"/>

   <el traits="blue_color"/>

   <el color="blue">

from a language design point of view, we might opt for the last version ... but thats because we are human (Steve's other point) and our point of view is important. A machine may actually prefer the first option; I can't resist making an analogy with aforementioned Carl Linnaeus ... while his system was impressive we now see DNA provides a more precise classification, though I wouldn't expect a human to parse.

Of course using

<el>
<color>blue</color>
</el>

does the same thing because we are just implicitly putting the metadata in the special name attributes (el.color).

Thanks for letting me go on ...

Jim Fuller







[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