[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?
- From: Michael Kay <mike@saxonica.com>
- To: Roger L Costello <costello@mitre.org>
- Date: Wed, 19 Jan 2022 19:19:54 +0000
>
> 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]