home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeSAX2Search this book

B.9. Comment Information Items

Comments are intended for human consumption; processing instructions are reserved for application data. The main curiosity here is that the Infoset doesn't believe in comments within DTDs, perhaps on the grounds that they'd need to be associated with the declarations they describe. (Some DTD documentation tools rely on magic comment syntax, much like javadoc.)

Property

Callbacks

Explanation

[content]

LexicalHandler.comment()

The characters identified in this callback are the contents of the comment.

[parent]

When startElement() is invoked with no matching endElement(), the parent is the current element. The Infoset ignores comments reported between calls to LexicalHandler.startDTD() and LexicalHandler.endDTD(). Otherwise, the document itself is the parent.

Some legacy applications use comments to represent the sort of information that processing instructions were designed to hold; an example is wrapping of CSS rendering hints in HTML comments.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.