diff options
-rw-r--r-- | src/core/model/Document.hpp | 8 | ||||
-rw-r--r-- | src/core/model/Domain.hpp | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/core/model/Document.hpp b/src/core/model/Document.hpp index e27b577..a18e389 100644 --- a/src/core/model/Document.hpp +++ b/src/core/model/Document.hpp @@ -34,6 +34,7 @@ * * Consider this XML representation of a document using the "book" domain: * + * \code{.xml} * <doc> * <head> * <import rel="domain" src="book_domain.oxm"/> @@ -59,6 +60,7 @@ * </chapter> * </book> * </doc> + * \endcode * * As can be seen the StructureEntities inherently follow a tree structure that * is restricted by the implicit context free grammar of the "book" Domain @@ -70,12 +72,16 @@ * overlapping annotations and provides a more intuitive (and semantically * sound) handling of such span-like concepts. So the * + * \code{.xml} * <em>content</em> + * \endcode * * is implicitly expanded to: * + * \code{.xml} * <a id="1"/>content<a id="2"/> * <emphasized start="1" end="2"/> + * \endcode * * Note that the place of an AnnotationEntity within the XML above is not * strictly defined. It might as well be placed as a child of the "book" node. @@ -88,11 +94,13 @@ * * is implicitly expanded using transparency to: * + * \code{.xml} * <paragraph> * <text> * Here we might find the actual section content. * </text> * </paragraph> + * \endcode * * @author Benjamin Paaßen (bpaassen@techfak.uni-bielefeld.de) */ diff --git a/src/core/model/Domain.hpp b/src/core/model/Domain.hpp index c80d057..3a56e52 100644 --- a/src/core/model/Domain.hpp +++ b/src/core/model/Domain.hpp @@ -32,6 +32,7 @@ * in turn might contain two FieldDescriptors, one for the meta data of ones * book and one for the actual structure. Consider the following XML: * + * \code{.xml} * <domain name="book"> * <structs> * <struct name="book" cardinality="1" isRoot="true"> @@ -89,6 +90,7 @@ * </struct> * </structs> * </domain> + * \endcode * * Note that we define one field as the TREE (meaning the main or default * document structure) and one mearly as SUBTREE, relating to supporting @@ -101,6 +103,7 @@ * * The translation to context free grammars is as follows: * + * \code{.txt} * BOOK := <book> BOOK_TREE </book> * BOOK_TREE := CHAPTER BOOK_TREE | PARAGRAPH BOOK_TREE | epsilon * CHAPTER := <chapter> CHAPTER_TREE </chapter> @@ -112,6 +115,7 @@ * SUBSECTION_TREE := PARAGRAPH SUBSECTION_TREE | epsilon * PARAGRAPH := <paragraph> PARAGRAPH_CONTENT </paragraph> * PARAGRAPH_CONTENT := string + * \endcode * * Note that this translation recurs to further nonterminals like SECTION but * necessarily produces one "book" terminal. Also note that, in principle, @@ -122,6 +126,7 @@ * It is possible to add further fields, like we would in the "headings" domain * to add titles to our structure. * + * \code{.xml} * <domain name="headings"> * <head> * <import rel="domain" src="book.oxm"/> @@ -139,11 +144,14 @@ * </fields> * </structs> * </domain> + * \endcode * * This would change the context free grammar as follows: * + * \code{.txt} * BOOK := <book> HEADING BOOK_TREE </book> * HEADING := <heading> PARAGRAPH </heading> + * \endcode * * AnnotationClasses on the other hand do not specify a context free grammar. * They merely specify what kinds of Annotations are allowed within this domain @@ -151,6 +159,7 @@ * to define structured children that manifest e.g. meta information of that * Annotation. An example for that would be the "comment" domain: * + * \code{.xml} * <domain name="comments"> * <head> * <import rel="domain" src="book.oxm"/> @@ -183,6 +192,7 @@ * </struct> * </structs> * </domain> + * \endcode * * Here we have comment annotations, which have a reply tree as sub structure. * |