XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Do not use the same tag name for different things ...Do you agree?


> 
> Are you okay with that? That is, are you okay with using the same tag name for two different things?

It depends how different. Are template parameters and function parameters different? Do you want to emphasize the difference, or emphasize the commonality?

And element names don't always represent types, sometimes they represent roles or relationships. For example <Content> isn't a type of thing, it's a property or relationship of one thing to another. Similarly <ShippingAddress>.

Obviously if two things are completely unrelated then it's wise to choose different names. But usually the question arises when they're a bit different, but not completely different. Discovering useful abstractions, and giving the abstractions names, is a vital part of data modelling.

And of course it happens by accident. I saw a system where one set of data files used TERMINAL_ID to refer to the identifier of a physical piece of hardware, which changed if the hardware was swapped out with a replacement, and another set of data files used TERMINAL_ID to refer to a logical terminal installed in particular premises, which didn't change if the hardware was swapped. That causes problems, but as systems evolve it happens all the time. 

Michael Kay
Saxonica


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


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS