[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Element names guidelines

From: W. Eliot Kimber <ekimber@innodata-isogen.com>
Date: Thu, 18 Nov 2004 08:55:58 -0600
Message-ID: <419CB7FE.9010803@innodata-isogen.com>
To: Frans Englich <frans.englich@telia.com>
CC: xmlschema-dev@w3.org
message of englich

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
Received on Thursday, 18 November 2004 14:56:34 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.