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]
=?utf-8?B?UkU6IFt4bWwtZGV2XSBEb27igJl0IGNyZWF0ZSBlbGVtZW50cyB3aXRoIHNp?==?utf-8?Q?mple_content_and_attributes?=

Hi Folks,

 

Thank you for the excellent replies.

 

Based on the replies, I see that I did a poor job explaining my position. Let me try again, please.

 

I am not arguing against attributes.

 

I am arguing against unlabeled data.

 

All of the following forms are good because they explicitly label the two pieces of data (USD and 8.95):

 

<Cost>
   
<Currency>USD</Currency>
   
<Amount>8.95</Amount>
</Cost>

<Cost currency="USD" amount="8.95" />

<Cost currency="USD">
   
<Amount>8.95</Amount>
</Cost>

<Cost amount="8.95">
   
<Currency>USD</Currency>
</Cost>

 

It matters not whether the label is in the form of an attribute or an element.

 

I am arguing that the following is bad because one piece of data (8.95) is not explicitly labeled:

 

<Cost currency="USD">8.95</Cost>

 

You might argue that 8.95 is labeled and the label is Cost. I disagree. I argue that Cost applies to the entire element (including the currency attribute); it does not specifically apply to 8.95.

 

As a result of the absence of an explicit label for 8.95, it is impossible to convert that form to an element-only form without human intervention. For example, a couple days ago one human suggested that 8.95 be labeled with “Amount” like so:

 

<Cost>
   
<Currency>USD</Currency>
   
<Amount>8.95</Amount>
</Cost>

 

This need to get humans involved to convert to an element-only form is bad, I argue.

 

Comments?

 

/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