< prev index next >

src/java.xml/share/classes/org/xml/sax/ext/DeclHandler.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 // DeclHandler.java - Optional handler for DTD declaration events.
  27 // http://www.saxproject.org
  28 // Public Domain: no warranty.
  29 // $Id: DeclHandler.java,v 1.2 2004/11/03 22:49:08 jsuttor Exp $
  30 
  31 package org.xml.sax.ext;
  32 
  33 import org.xml.sax.SAXException;
  34 
  35 
  36 /**
  37  * SAX2 extension handler for DTD declaration events.
  38  *
  39  * <blockquote>
  40  * <em>This module, both source code and documentation, is in the
  41  * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
  42  * See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
  43  * for further information.
  44  * </blockquote>
  45  *
  46  * <p>This is an optional extension handler for SAX2 to provide more
  47  * complete information about DTD declarations in an XML document.
  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>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.


   1 /*
   2  * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 





  26 package org.xml.sax.ext;
  27 
  28 import org.xml.sax.SAXException;
  29 
  30 
  31 /**
  32  * SAX2 extension handler for DTD declaration events.







  33  *
  34  * <p>This is an optional extension handler for SAX2 to provide more
  35  * complete information about DTD declarations in an XML document.
  36  * XML readers are not required to recognize this handler, and it
  37  * is not part of core-only SAX2 distributions.</p>
  38  *
  39  * <p>Note that data-related DTD declarations (unparsed entities and
  40  * notations) are already reported through the {@link
  41  * org.xml.sax.DTDHandler DTDHandler} interface.</p>
  42  *
  43  * <p>If you are using the declaration handler together with a lexical
  44  * handler, all of the events will occur between the
  45  * {@link org.xml.sax.ext.LexicalHandler#startDTD startDTD} and the
  46  * {@link org.xml.sax.ext.LexicalHandler#endDTD endDTD} events.</p>
  47  *
  48  * <p>To set the DeclHandler for an XML reader, use the
  49  * {@link org.xml.sax.XMLReader#setProperty setProperty} method
  50  * with the property name
  51  * <code>http://xml.org/sax/properties/declaration-handler</code>
  52  * and an object implementing this interface (or null) as the value.


< prev index next >