Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Element names guidelines

From: "W. Eliot Kimber" <ekimber@---------------.--->
To: Frans Englich <frans.englich@-----.--->
Date: 11/18/2004 2:56:00 AM
Frans Englich wrote:

> 
> Hello,
> 
> At the risk of starting a flamefest, I wonder: What is the best naming 
> conventions for elements and attributes? A crucial question in modeling XML 
> formats.
> 
> Assuming the phrase "car description" should be translated to an element name, 
> and the criteria for judgment are easy to type and readability, there exist a 
> number of different alternatives:

I prefer underscore for word breaks: car_description

I also prefer to abbreviate long words with well-understood short forms, 
of which description is a prime example: car_desc

It also depends on whether the elements are serving primarily authors 
doing technical documents or similar or serving applications that are 
primarily data consumers or producers.

In the authoring case, brevity has more value simply because long 
element type names can take up a lot of space in the authoring display 
when you have some kind of "tags-on" view or a tree view.

In the application case, clarity is has more value. One can argue that 
brevity has value because of just the data cost of long start and end 
tags, but the counters to that argument is that data is cheap and XML 
data streams compress very efficiently for transmission.

I prefer all lowercase names to avoid silly case errors that are hard to 
debug, expecially in environments like XSLT where a mistyped tag name 
often results in a silent failure to match or select.

Cheers,

Eliot

From frans.englich@t... Thu Nov 18 15:02:07 2004
Received: from bart.w


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent