To constrain the structure of allowed XML documents, for instance with respect to a specific application, a target schema can be defined in some schema language. A schema consists of a sequence of type definitions specifying a (possibly infinite) class of XML documents. A type can be assigned to every element in a document valid w.r.t. a schema. As the same holds for the root element, the document itself can also be viewed to be of a specific type. The schema languages DTDs, XML Schema, and Relax NG, are, on an abstract level, different instantiations of the abstract model of unranked regular tree languages.
Brüggemann-Klein et al.  were the first to revive the theory of regular unranked tree automata  for the modelling of XML schema languages. Murata et al.  provided the formal taxonomy as presented here. Martens et al.  characterized the expressiveness of the different models and provided type-free abstractions.
- 3.Brüggemann-Klein A, Murata M, Wood D. Regular tree and regular hedge languages over unranked alphabets. Technical report HKUST-TCSC-2001-0. The Hongkong University of Science and Technology; 2001.Google Scholar
- 13.Segoufin L, Vianu V. Validating streaming XML documents. In: Proceedings of the 21st ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems; 2002. p. 53–64.Google Scholar