Your support for our advertisers helps cover the cost of hosting, research, and maintenance of this FAQ

The XML FAQ — Frequently-Asked Questions about the Extensible Markup Language

Section 4: Developers

Q 4.5: Should I use a container around some elements in my DTD/Schema?

If you need to ask the question, then yes, you need a container

There are relatively few occasions when a single instance of an element type is needed, so in almost all circumstances it makes sense to group them if they are related.

This also applies to element types which are originally expected (or even ‘known’) to be solo occurrences — experience shows that over time they will become multiple and therefore need containment (Maler and el Andaloussi, 1995 § 6.2).