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

SV: Element names guidelines

From: Bryan Rasmussen <brs@itst.dk>
Date: Tue, 23 Nov 2004 09:28:48 +0100
Message-ID: <D45A5694803BE943BA46F9A7262BF83D123439@its42.itst.local>
To: 'Frans Englich' <frans.englich@telia.com>
Cc: xmlschema-dev@w3.org

You have an element that you want to match the concept car description how
would you naturally embody that concept in xml?

wouldn't it be 
(obviously there are numerous designs patterns that one might use but I will
stick with this one for the point of this post)

Instead what seems to happen with structures where xml schema is used is
that you get naming conventions like this


In fact this is the naming convention where I work.

this naming convention seems to be related to naming conventions often used
in certain object oriented languages and of course in that we want to be
able to say that a description of a car has various limitations on it that a
generic description might not. (Which in the case of my work is also related
to naming and design rules that do not allow local declaration of elements
but require all elements to be globally declared)

I believe that this an example of the drawbacks of xml schema as an xml
validation language, not to mention its drawbacks as a language in the areas
of data typing, and data binding descriptions. 


-----Oprindelig meddelelse-----
Fra: Frans Englich [mailto:frans.englich@telia.com]
Sendt: 18. november 2004 15:25
Til: xmlschema-dev@w3.org
Emne: Element names guidelines


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 

Assuming the phrase "car description" should be translated to an element
and the criteria for judgment are easy to type and readability, there exist
number of different alternatives:

In my opinion, too elaborated; The capitalized C is unnecessary since the 
phrase is automatically distinguished at the boundaries by the tag 

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

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

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

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

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


Received on Tuesday, 23 November 2004 08:30:50 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:06 UTC