[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] What approaches do people use to create tag names and attribute names?
- From: "Philip Fearon" <pgfearo@googlemail.com>
- To: xml-dev@lists.xml.org
- Date: Fri, 12 Oct 2007 22:22:45 +0100
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@mitre.org> 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@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> 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]