W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2004

Element names guidelines

From: Frans Englich <frans.englich@telia.com>
Date: Thu, 18 Nov 2004 14:32:15 +0000
To: xmlschema-dev@w3.org
Message-Id: <200411181432.15421.frans.englich@telia.com>


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:


<CarDescription>
----------------
In my opinion, too elaborated; The capitalized C is unnecessary since the 
phrase is automatically distinguished at the boundaries by the tag 
characters.

<carDescription>
----------------
I'll call this the WXS-style. I find it (visually) beautiful and simple. It's 
relatively easy to read. Perhaps I'm biased by the Qt/KDE API. Regarding 
typing ergonomics it perhaps could be better than capitalized letters.


<car-description>
-----------------
I'll call this the XSLT-style. IMO, more heavy and dense in its look, but 
easier to type.

<cardescription>
----------------
The Docbook-style. Hard to read but fast to type. That this naming scheme was 
chosen, suggests that other criteria than readability and typing ergonomics 
exists..


But which one is best, and is there other alternatives? What other criteria 
are there, rendering my ramblings simplified? Does it depend on usage 
scenario?

What was the reasonings behind XSLT's and WXS's styles?


Cheers,

		Frans
Received on Thursday, 18 November 2004 14:25:06 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 23:40:23 UTC