<\body> s> One major advantage of is that the editor uses general trees as its data format. Like for XML, this choice has the advantages of being simple to understand and making documents easy to manipulate by generic tools. However, when using the editor for a particular purpose, the data format usually needs to be restricted to a subset of the set of all possible trees. In XML, one uses Data Type Definitions (s) in order to formally specify a subset of the generic XML format. Such a specifies when a given document is valid for a particular purpose. For instance, one has s for documents on the web (XHTML), for mathematics (MathML), for two-dimensional graphics (SVG) and so on. Moreover, up to a cetain extent, XML provides mechanisms for combining such s. Finally, a precise description of a usually also provides some kind of reference manual for documents of a certain type. In , we have started to go one step further than s: besides being able to decide whether a given document is valid or not, it is also very useful to formally describe certain properties of the document. For instance, in an interactive editor, the numerator of a fraction may typically be edited by the user (we say that it is ), whereas the URL of a hyperlink is only editable on request. Similarly, certain primitives like correspond to block content, whereas other primitives like correspond to inline content. Finally, certain groups of primitives, like , , , behave similarly under certain operations, like conversions. A Data Relation Description () consists of a Data Type Definition, together with additional logical properties of tags or document fragments. These logical properties are stated using so called , which are also used in logical programming languages such as Prolog. Contrary to logical programming languages, it should nevertheless be relatively straightforward to determine the properties of tags or document fragments, so that certain database techniques can be used for efficient implementations. At the moment, we only started to implement this technology (and we are still using lots of C++ hacks instead of what has been said above), so a more complete formal description of s will only be given at a later stage. One major advantage of the use of s is that it is not necessary to establish rigid hierarchies of object classes like in object oriented programming. This is particularly useful in our context, since properties like accessability, inline-ness, are quite independent one from another. In fact, where s may be good enough for the description of passive documents, more fine-grained properties are often usefull when manipulating documents in a more interactive way. properties and applications> Currently, the of a document contains the following information: <\itemize> The possible arities of a tag. The accessability of a tag and its children. In the near future, the following properties will be added: <\itemize> Inline-ness of a tag and its children. Tabular-ness of a tag and its children. Purpose of a tag and its children. The above information is used (among others) for the following applications: <\itemize> Natural default behaviour when creating/deleting tags or children (automatic insertion of missing arguments and removal of tags with too little children). Only traverse accessible nodes during searches, spell-checking, Automatic insertion of or tags when creating block or tabular environments. Syntactic highlighting in source mode as a function of the purpose of tags and arguments. of a document> associate a unique to each document. This is determined in two stages. First of all, tries to heuristically determine properties of user-defined tags, or tags which are defined in style files. For instance, when the user defines a tag like <\tm-fragment> !>>> automatically notices that is a macro with one element, so it considers to be the only possible arity of the tag. Notice that the heuristic determination of the is done interactively: when defining a macro inside your document, its properties will automatically be put into the (assuming that you give a small amount of free time of the order of a second; this minor delay is used to avoid compromising the reactivity of the editor). Sometimes the heuristically defined properties are inadequate. For this case, provides the tag in order to the default properties. <\initial> <\collection>