From 9376ae9c73e1c2faadac546a0a0cde26b4a5c676 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Wed, 14 Jan 2015 00:06:36 +0100 Subject: Added some more code escaping for XML in documentation. --- src/core/model/Document.hpp | 4 ++++ src/core/model/Domain.hpp | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'src') 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} * emphasized and 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} * emphasized and strong * * + * \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} * * * @@ -242,6 +243,7 @@ class Domain; * * * + * \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} * * value * + * \endcode * * key="value" inside the A-node would be an attribute, while value * would be a primitive field. While equivalent in XML the semantics are @@ -486,6 +490,7 @@ typedef RangeSet 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} * * * @@ -503,6 +508,7 @@ typedef RangeSet Cardinality; * * * + * \endcode * * The "parent" construct allows to "invade" another domain. * @@ -516,19 +522,23 @@ typedef RangeSet Cardinality; * If we go back to our example a user would (without transparency) have to * explicitly declare: * + * \code{.xml} * *
* Text. *
*
+ * \endcode * * But in our mind the document - + * + * \code{.xml} * *
* Text. *
*
+ * \endcode * * Is already sufficiently specific. We can infer that a paragraph should be * wrapped around "Text.". Therefore we set the 'transparent' flag of the -- cgit v1.2.3