Comments are an XML construct, and are normally only valid inside a DTD. However, as Section 7.4, “Escaping Back to XML” shows, it is possible to use XML syntax within the document.
The delimiter for XML comments is the string
“--
”. The first occurrence of
this string opens a comment, and the second closes it.
XHTML users may be familiar with different
rules for comments. In particular, it is often believed that
the string <!--
opens a comment, and it is
only closed by -->
.
This is not correct. Many web browsers have broken XHTML parsers, and will accept incorrect input as valid. However, the XML parsers used by the Documentation Project are more strict, and will reject documents with that error.
The XML parser will treat this as though it were actually:
That is not valid XML, and may give confusing error messages.
All FreeBSD documents are available for download at http://ftp.FreeBSD.org/pub/FreeBSD/doc/
Questions that are not answered by the
documentation may be
sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.