Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: sub-elements with empty context vs. element text

From: Joe Kesselman <keshlam-nospam@-------.--->
To: 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.



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent