src/org/xml/sax/ext/LexicalHandler.java

Print this page
rev 602 : 8047723: @since tag cleanup in jaxp
Reviewed-by:


  45  * <p>This is an optional extension handler for SAX2 to provide
  46  * lexical information about an XML document, such as comments
  47  * and CDATA section boundaries.
  48  * XML readers are not required to recognize this handler, and it
  49  * is not part of core-only SAX2 distributions.</p>
  50  *
  51  * <p>The events in the lexical handler apply to the entire document,
  52  * not just to the document element, and all lexical handler events
  53  * must appear between the content handler's startDocument and
  54  * endDocument events.</p>
  55  *
  56  * <p>To set the LexicalHandler for an XML reader, use the
  57  * {@link org.xml.sax.XMLReader#setProperty setProperty} method
  58  * with the property name
  59  * <code>http://xml.org/sax/properties/lexical-handler</code>
  60  * and an object implementing this interface (or null) as the value.
  61  * If the reader does not report lexical events, it will throw a
  62  * {@link org.xml.sax.SAXNotRecognizedException SAXNotRecognizedException}
  63  * when you attempt to register the handler.</p>
  64  *
  65  * @since SAX 2.0 (extensions 1.0)
  66  * @author David Megginson
  67  */
  68 public interface LexicalHandler
  69 {
  70 
  71     /**
  72      * Report the start of DTD declarations, if any.
  73      *
  74      * <p>This method is intended to report the beginning of the
  75      * DOCTYPE declaration; if the document has no DOCTYPE declaration,
  76      * this method will not be invoked.</p>
  77      *
  78      * <p>All declarations reported through
  79      * {@link org.xml.sax.DTDHandler DTDHandler} or
  80      * {@link org.xml.sax.ext.DeclHandler DeclHandler} events must appear
  81      * between the startDTD and {@link #endDTD endDTD} events.
  82      * Declarations are assumed to belong to the internal DTD subset
  83      * unless they appear between {@link #startEntity startEntity}
  84      * and {@link #endEntity endEntity} events.  Comments and
  85      * processing instructions from the DTD should also be reported




  45  * <p>This is an optional extension handler for SAX2 to provide
  46  * lexical information about an XML document, such as comments
  47  * and CDATA section boundaries.
  48  * XML readers are not required to recognize this handler, and it
  49  * is not part of core-only SAX2 distributions.</p>
  50  *
  51  * <p>The events in the lexical handler apply to the entire document,
  52  * not just to the document element, and all lexical handler events
  53  * must appear between the content handler's startDocument and
  54  * endDocument events.</p>
  55  *
  56  * <p>To set the LexicalHandler for an XML reader, use the
  57  * {@link org.xml.sax.XMLReader#setProperty setProperty} method
  58  * with the property name
  59  * <code>http://xml.org/sax/properties/lexical-handler</code>
  60  * and an object implementing this interface (or null) as the value.
  61  * If the reader does not report lexical events, it will throw a
  62  * {@link org.xml.sax.SAXNotRecognizedException SAXNotRecognizedException}
  63  * when you attempt to register the handler.</p>
  64  *
  65  * @since 1.4, SAX 2.0 (extensions 1.0)
  66  * @author David Megginson
  67  */
  68 public interface LexicalHandler
  69 {
  70 
  71     /**
  72      * Report the start of DTD declarations, if any.
  73      *
  74      * <p>This method is intended to report the beginning of the
  75      * DOCTYPE declaration; if the document has no DOCTYPE declaration,
  76      * this method will not be invoked.</p>
  77      *
  78      * <p>All declarations reported through
  79      * {@link org.xml.sax.DTDHandler DTDHandler} or
  80      * {@link org.xml.sax.ext.DeclHandler DeclHandler} events must appear
  81      * between the startDTD and {@link #endDTD endDTD} events.
  82      * Declarations are assumed to belong to the internal DTD subset
  83      * unless they appear between {@link #startEntity startEntity}
  84      * and {@link #endEntity endEntity} events.  Comments and
  85      * processing instructions from the DTD should also be reported