Comments are an XML construction, and are normally only valid inside a DTD. However, as Section 3.4, “Escaping Back to SGML” shows, it is possible to use XML syntax within your document.
The delimiter for XML comments is the string
“--
”. The first occurrence of
this string opens a comment, and the second closes it.
If you have used XHTML before you may have been shown
different rules for comments. In particular, you may think that
the string <!--
opens a comment, and it is
only closed by -->
.
This is not the case. A lot of web browsers have broken XHTML parsers, and will accept that as valid. However, the XML parsers used by the Documentation Project are much stricter, and will reject documents that make that error.
The XML parser will treat this as though it were actually:
This is not valid XML, and may give confusing error messages.
As the example suggests, do not write comments like that.
That is a (slightly) better approach, but it still potentially confusing to people new to XML.
This, and other documents, can be downloaded from http://ftp.FreeBSD.org/pub/FreeBSD/doc/
For questions about FreeBSD, read the
documentation before
contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.