Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - sub-elements with empty context vs. element text [Thread Next] Re: sub-elements with empty context vs. element textTo: NULL Date: 3/1/2007 8:54:00 PM It depends entirely on what you're trying to express. Think about the semantics of the document. If the value is something which really is a single value _conceptually_, but which may at some point in the future want to carry additional sub-structure, make it an element. If it's a simple text value and will never be more, make it textual content, or -- if it's a characteristic of its containing element -- possibly an attribute value (leaving the possibility open of other attributes and/or content to be added later). Look at other XML-based languages which solve similar problems and decide which make the most sense for you. And, as with any design skill you're still learning, resign yourself to the fact that you're going to make some mistakes and have to do some redesign until you develop a sense of style and the ability to think in terms of larger patterns. Consider creating an initial version, working with it for a while, and deciding whether you like the way it behaves before you let it get cast in concrete. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
