49 * is not part of core-only SAX2 distributions.</p>
50 *
51 * <p>Note that data-related DTD declarations (unparsed entities and
52 * notations) are already reported through the {@link
53 * org.xml.sax.DTDHandler DTDHandler} interface.</p>
54 *
55 * <p>If you are using the declaration handler together with a lexical
56 * handler, all of the events will occur between the
57 * {@link org.xml.sax.ext.LexicalHandler#startDTD startDTD} and the
58 * {@link org.xml.sax.ext.LexicalHandler#endDTD endDTD} events.</p>
59 *
60 * <p>To set the DeclHandler for an XML reader, use the
61 * {@link org.xml.sax.XMLReader#setProperty setProperty} method
62 * with the property name
63 * <code>http://xml.org/sax/properties/declaration-handler</code>
64 * and an object implementing this interface (or null) as the value.
65 * If the reader does not report declaration events, it will throw a
66 * {@link org.xml.sax.SAXNotRecognizedException SAXNotRecognizedException}
67 * when you attempt to register the handler.</p>
68 *
69 * @since SAX 2.0 (extensions 1.0)
70 * @author David Megginson
71 */
72 public interface DeclHandler
73 {
74
75 /**
76 * Report an element type declaration.
77 *
78 * <p>The content model will consist of the string "EMPTY", the
79 * string "ANY", or a parenthesised group, optionally followed
80 * by an occurrence indicator. The model will be normalized so
81 * that all parameter entities are fully resolved and all whitespace
82 * is removed,and will include the enclosing parentheses. Other
83 * normalization (such as removing redundant parentheses or
84 * simplifying occurrence indicators) is at the discretion of the
85 * parser.</p>
86 *
87 * @param name The element type name.
88 * @param model The content model as a normalized string.
89 * @exception SAXException The application may raise an exception.
|
49 * is not part of core-only SAX2 distributions.</p>
50 *
51 * <p>Note that data-related DTD declarations (unparsed entities and
52 * notations) are already reported through the {@link
53 * org.xml.sax.DTDHandler DTDHandler} interface.</p>
54 *
55 * <p>If you are using the declaration handler together with a lexical
56 * handler, all of the events will occur between the
57 * {@link org.xml.sax.ext.LexicalHandler#startDTD startDTD} and the
58 * {@link org.xml.sax.ext.LexicalHandler#endDTD endDTD} events.</p>
59 *
60 * <p>To set the DeclHandler for an XML reader, use the
61 * {@link org.xml.sax.XMLReader#setProperty setProperty} method
62 * with the property name
63 * <code>http://xml.org/sax/properties/declaration-handler</code>
64 * and an object implementing this interface (or null) as the value.
65 * If the reader does not report declaration events, it will throw a
66 * {@link org.xml.sax.SAXNotRecognizedException SAXNotRecognizedException}
67 * when you attempt to register the handler.</p>
68 *
69 * @since 1.4, SAX 2.0 (extensions 1.0)
70 * @author David Megginson
71 */
72 public interface DeclHandler
73 {
74
75 /**
76 * Report an element type declaration.
77 *
78 * <p>The content model will consist of the string "EMPTY", the
79 * string "ANY", or a parenthesised group, optionally followed
80 * by an occurrence indicator. The model will be normalized so
81 * that all parameter entities are fully resolved and all whitespace
82 * is removed,and will include the enclosing parentheses. Other
83 * normalization (such as removing redundant parentheses or
84 * simplifying occurrence indicators) is at the discretion of the
85 * parser.</p>
86 *
87 * @param name The element type name.
88 * @param model The content model as a normalized string.
89 * @exception SAXException The application may raise an exception.
|