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] Do attributes have scope? Are attributes metadata?


Roger, hello.

On 2012 Feb 29, at 13:07, Costello, Roger L. wrote:

I think that the answers to your questions are:

> Do attributes have scope?

Depends.

> Are attributes metadata?

Depends.

The resolution of this and a couple of other recent questions is that XML is just syntax, and it has nothing -- absolutely nothing -- to say about semantics/meaning, scope or metadata.

Being about syntax means that XML is concerned with only two questions: (1) does document X contain a legal stream of bytes, or does it not? and (2) given that document X contains a legal stream of bytes, what information about those bytes must a processor report to the calling application?

That application has almost complete freedom to decide what the meaning of those bits of information is.  So to take your example:

<Document classification="unclassified">
     <Para>...</Para>
     <Para>...</Para>
     <Para>...</Para>
</Document>

The application could decide that this means that the document and its contents is unclassified, that the (existence of the) document but not its contents is unclassified, or that everything following this in the XML document is unclassified (ie that the 'scope' of the attribute extends from this element to the end of the XML stream).  Nothing in XML constrains the application in the semantics it attaches to this stream of bytes.

The 'xmlns' attributes are slightly special, because the XML Namespaces Recommendation declares that the semantics of these attributes is such that they have a scope which extends to the end of the element.  But that semantics is added by the Namespaces recommendation, and not by XML.

Similarly, in "<altitude units="feet">12000</altitude>", whether the 'data' here is '12000' or '12000ft' depends entirely on the application -- only the application gets to choose whether this is data or metadata.

There are probably very few cases where the distinction between data and metadata is actually clear or indisputable.  The title of a book would seem obvious metadata, compared to the data of the textual content, but for the curator of a library catalogue, the book title is part of the core catalogue data, and it's the date the catalogue entry was created (say) which is the metadata.  This distinction is reflected in the standing argument (standing, that is, ever since GML) over whether feature X should be modelled as attributes or content (to which the answer is "it depends").

All the best,

Norman


-- 
Norman Gray  :  http://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK





[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