This page provides an overview of the patterns on this site. It is written in a more informal, narrative fashion then other indexes, to provide a gentler introduction to the patterns. This description of the patterns should give a good idea of how the different patterns relate, and roughly in what order they will be used.
When creating a system a data representation must be chosen for information, one possibility is to Use XML. After deciding on XML, investigate existing schema's to see if the project can Reuse Document Types.
Once XML has been chosen as a data representation, it must be determined what the root elements are, or if multiple document types should be used. Multiple Document Types can be used to represent a range of different document types, or if documents are related and have some commonalities, a Multi Root Document Types can be used. If multiple transaction types are needed a Universal Root can be used. To separate concerns such as transport of the data from the data itself, an Envelope can be used.
To create structure in a document, element types which represent abstractions are needed. Name these abstractions using Short Understandable Names These can be based on domain concepts and become Domain Element. To add more structure Container Element can be used. When containers of like element types are needed a Collection Element can be used. To make the documents easier to use for authors, abstraction can be added with Choice Reducing Container and Optional Container Element
When creating these abstractions, some metadata will be needed to be placed in the document. Care should be taken to Separate Metadata and Data. This can be done by placing Metadata in Separate Document or by using a Head-Body. When creating the structure, put Metadata First.
It must be decided how to organize these abstractions. When one abstraction references another one, that is when one abstraction uses information that is declared in another one, Declare Before First Use. When the same information needs to be referenced from many places, use a Flyweight. A Referenced Note can be used when an area of text needs to reference an note in another area of the text. The natural way to structure information in XML is using a hierarchical format, however it is sometimes better to use a more graph-like structure using Marketplace.
Sometimes a document designer will not be able to foresee all of the uses of a document type, in that case a Catch-All Element can be used to easily introduce elements from other DTDs. Role Attribute and Extensible Content Model can be used to make a more flexible document type by adding element that can be introduced by the document author.
To make documents easier to use, consistency is important. Common Attributes and Consistent Element Set can be used to provide this consistency.