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

Re: What approaches do people use to create tag names and attr

  • From: "Philip Fearon" <pgfearo@g...>
  • To: xml-dev@l...
  • Date: Fri, 12 Oct 2007 22:22:45 +0100

Re:  What approaches do people use to create tag names and attr
Though this is an important subject, I try not to get too hung up on
tag and attribute names.

This is because naming can be such a subjective thing and much time
can be spent debating over names instead of other more productive
issues. What is often more important is a short, terse unambiguous
plain language description suitable for a data element dictionary.

However if pushed - some rules that influence my naming choice would be:

1. Use names already in use in existing standards where there is some
overlap but where this won't confuse.

2. Ensure consistency in naming conventions (obvious I know)

3. Avoid names with similar appearance but different meanings - eg.
avoid using preceding/proceeding together.

4. Consider the consequences on readability of XPath expressions if
names are overly long

5. Experiment with sample XPath expressions as a check - do they read well?

6. If requirements are expressed as use cases, nouns that occur
repeatedly may be good candidates for names. Object Oriented design
guides offer some good insights on how to distill names from noun
lists even though it is recognized that this method has limitations.

7. Use generic words such as 'type' sparingly, if at all

8. Consider the context the tag/attribute name will or may appear in
(this goes back to XPath expression checking). An element name, for
example, may already lend some meaning to its attributes or descendant
elements.


Phil Fearon
http://www.sketchpath.com


On 10/12/07, Costello, Roger L. <costello@m...> wrote:
> Hi Folks,
>
> I am putting together a list of approaches that people use to create
> tag names and attribute names.  I am interested in your input.
>
> APPROACHES FOR CREATING TAG NAMES AND ATTRIBUTE NAMES
>
> 1. Domain experts are consulted; the experts create (through a
> consensus process) a label for each information item.  Those labels are
> used as tag and attribute names.
>
> 2. There is an existing database; the database column and table names
> are used as the XML tag and attribute names.
>
> 3. An organization has already created a set of tags and attributes;
> they are used.
>
> 4. There exists a data requirements document; tag and attribute names
> are distilled from the requirements document. (I am not clear on how
> tag and attribute names can be systematically distilled from a
> requirements document; do you have insights on how to do this?)
>
>
> Are there other approaches that people use to create tag names and
> attribute names?
>
> /Roger
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@l...
> subscribe: xml-dev-subscribe@l...
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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-2013 All Rights Reserved.