Most document XML applications adopt or adapt one of a small number of well-known public document grammars. These are basically all expressions of a shared and accepted fundamental logical view of document structure. There are variants and outliers and long tails, but despite differences in detail, they form a Standard Average Document Grammar, which lets us describe the overwhelming majority of text documents.
The grammar includes a hierarchy of nested, headed sections; arbitrarily recurring groups of common components; links between places in and out of the document; signifiers of importance, relevance, or sequence; and restrictions on what may and may not occur in different places. The modifications and customizations users make to these document grammars are informative both in their variety and their similarity, and in the fact that they all fit relatively comfortably within the Standard Average Document Grammar.