- From: W. Eliot Kimber <ekimber@innodata-isogen.com>
- Date: Thu, 18 Nov 2004 08:55:58 -0600
- To: Frans Englich <frans.englich@telia.com>
- CC: xmlschema-dev@w3.org
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 UTC