The <comment> element contains free-from text and is used for annotation. In XDDL, the <comment> usually appears as the first child of elements that support it and is always optional.
Typically, a <comment> is used to annotate a <field>:
<?xml version="1.0" encoding="iso-8859-1" ?>
<xddl>
<structure>
<field name="A" length="8" >
<comment>This is a comment of the A field</comment>
</field>
<field name="B" length="8"/>
<field name="C" length="8"/>
<field name="D" length="8"/>
</structure>
</xddl>
simple_comment.xddl
In the above example, the A field is commented while the others are left
without a comment.
When commenting elements with multiple children, make sure the <comment> appears as the first child. This is a valid document with a commented %structure element:
<?xml version="1.0" encoding="iso-8859-1" ?>
<xddl>
<structure>
<comment>This is a commented structure</comment>
<field name="a" length="8"/>
<field name="b" length="8"/>
<field name="c" length="8"/>
<field name="d" length="8"/>
</structure>
</xddl>
comment.xddl
This is invalid:
<?xml version="1.0" encoding="iso-8859-1" ?>
<xddl>
<structure>
<field name="a" length="8"/>
<comment>This is a commented structure -- WRONG</comment>
<field name="b" length="8"/>
<field name="c" length="8"/>
<field name="d" length="8"/>
</structure>
</xddl>
wrong.xddl
It is important to note the <comment> in XDDL is not the same as commenting
in XML using the <!-- and --> constructs.
Some elements, such as <arg>, <fstring>, and the <comment> element itself cannot be commented.
The contents of a <comment> cannot contain the <, >, and &, characters. The corresponding entity reference must be used (i.e., <, >, &).
Currently, the IDM does not utilize the <comment> information.