diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-14 00:06:36 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-14 00:06:36 +0100 |
commit | 9376ae9c73e1c2faadac546a0a0cde26b4a5c676 (patch) | |
tree | c00988fa0fa230f99fa2ecb0c1d310276f41a605 /src/core | |
parent | c6b502d45d2bf916f747411df37df186c4ed4981 (diff) |
Added some more code escaping for XML in documentation.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/model/Document.hpp | 4 | ||||
-rw-r--r-- | src/core/model/Domain.hpp | 12 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/core/model/Document.hpp b/src/core/model/Document.hpp index 2821e8c..357b752 100644 --- a/src/core/model/Document.hpp +++ b/src/core/model/Document.hpp @@ -379,14 +379,18 @@ public: * the markups "emphasized" and "strong". In HTML like markup languages these * concepts are handeled as structure elements, like this: * + * \code{.xml} * <em>emphasized</em> <em><strong>and</strong></em> <strong>strong</strong> + * \endcode * * which is neither intuitive nor semantically sound. Therefore we take the * approach of anchoring the Annotation entities in the text like this: * + * \code{.xml} * <Anchor id=1/>emphasized <Anchor id=2/>and<Anchor id=3/> strong<Anchor id=4/> * <AnnotationEntity class="emphasized" start=1 end=3/> * <AnnotationEntity class="strong" start=2 end=4/> + * \endcode * * Which signifies that indeed the text "emphasized and" is emphasized, not * the two text exerpts "emphasized" and "and" separately. diff --git a/src/core/model/Domain.hpp b/src/core/model/Domain.hpp index 966060f..a5ea929 100644 --- a/src/core/model/Domain.hpp +++ b/src/core/model/Domain.hpp @@ -233,6 +233,7 @@ class Domain; * As an example consider the "paragraph" StructuredClass, which might allow * the actual text content. Here is the according XML: * + * \code{.xml} * <struct name="paragraph" transparent="true" role="paragraph"> * <fields> * <field> @@ -242,6 +243,7 @@ class Domain; * </field> * </fields> * </struct> + * \endcode * * Accordingly the primitiveType field of a FieldDescriptor may only be * defined if the type is set to "PRIMITIVE". If the type is something else @@ -374,9 +376,11 @@ public: * explained as the difference between node attributes and node children. * Consider the XML * + * \code{.xml} * <A key="value"> * <key>value</key> * </A> + * \endcode * * key="value" inside the A-node would be an attribute, while <key>value</key> * would be a primitive field. While equivalent in XML the semantics are @@ -486,6 +490,7 @@ typedef RangeSet<size_t> Cardinality; * defining itself as a viable child in one existing field. Consider the * example of the "heading" domain from the header documentation again: * + * \code{.xml} * <domain name="headings"> * <head> * <import rel="domain" src="book.oxm"/> @@ -503,6 +508,7 @@ typedef RangeSet<size_t> Cardinality; * </fields> * </structs> * </domain> + * \endcode * * The "parent" construct allows to "invade" another domain. * @@ -516,19 +522,23 @@ typedef RangeSet<size_t> Cardinality; * If we go back to our example a user would (without transparency) have to * explicitly declare: * + * \code{.xml} * <book> * <section> * <paragraph>Text.</paragraph> * </section> * </book> + * \endcode * * But in our mind the document - + * + * \code{.xml} * <book> * <section> * Text. * </section> * </book> + * \endcode * * Is already sufficiently specific. We can infer that a paragraph should be * wrapped around "Text.". Therefore we set the 'transparent' flag of the |