DocFlex/XML - XSDDoc - Frequently Asked Questions
Working with annotations
How to add descriptions/comments into my XML schema?
The W3C XML Schema language defines a special
element that allows you to add descriptions/comments into any XML Schema.
<xs:annotation> is a container of two other elements:
In the following example, the string "Complete List of all Salutations"
is the description added in the definition of the
which is supposed for some custom instructions that may be used by a software processing the schema.
which is where you should insert your description text.
"SalutationType" type using
<xs:documentation>Complete List of all Salutations</xs:documentation>
element you can place any text containing any number of lines.
Note also that some XML markup character must be encoded with the corresponding entities:
Along with the text, you can insert also other XML elements from various namespaces.
Particularly important are XHTML elements, which allow you to enrich your annotations
with very sophisticated formatting and images
that will appear in the generated documentation. For more details, please see: Formatting annotations with XHTML.
Which annotations get into generated documentation?
elements can be inserted in almost any other XML Schema elements, XSDDoc currently processes only those specified at the following locations:
Additionally, processing of all annotations is controlled by the parameter group:
Processing | Annotations
How to enable/disable interpreting line breaks in my comments?
The text enclosed in a
element may contain any number of lines.
You may create the new lines simply for convenience during writing that text.
However, you may also use the new lines as a way to format your comments.
In that case, you will likely want to have your text broken into the same lines in the «Annotation»
sections of the generated documentation. Click on the following screenshot to see how it may look:
That means that the generator must interpret the line breaks found in the raw XML
with the markup coding appropriate to the given output format (e.g. with
<br> in HTML or
\line in RTF).
To tell the generator to do so, you should invoke the output
Format Option Inspector
(by clicking the «Options» button in the Generator Dialog)
and check the option:
If you actually do not need to have the line breaks interpreted
(which may be exactly the case when you format your annotation with XHTML),
make sure that those options are unchecked (