Stylus Studio XML Editor

Table of contents

Appendices

2.5 Comments

Comments

Comments MAY appear anywhere in a document outside other Markup; in addition, they MAY appear within the document type declaration at places allowed by the grammar. They are not part of the document's Character Data; an XML processor MAY, but need not, make it possible for an application to retrieve the text of comments. For Compatibility, the string "--" (double-hyphen) MUST NOT occur within comments. Parameter entity references MUST NOT be recognized within comments.

Comments
2.5    Comment   ::=   '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'

An example of a comment:

<!-- declarations for <head> & <body> -->

Note that the grammar does not allow a comment ending in --->. The following example is not well-formed.

<!-- B+, B, or B--->