jaxp/src/org/xml/sax/ext/LexicalHandler.java
author henryjen
Thu, 19 Jun 2014 15:35:10 -0700
changeset 25262 1fe892ba017a
parent 12457 c348e06f0e82
permissions -rw-r--r--
8047723: @since tag cleanup in jaxp Reviewed-by: joehw
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     1
/*
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     2
 * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     4
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    10
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    15
 * accompanied this code).
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    16
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    20
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    23
 * questions.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    24
 */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    25
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    26
// LexicalHandler.java - optional handler for lexical parse events.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    27
// http://www.saxproject.org
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    28
// Public Domain: no warranty.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    29
// $Id: LexicalHandler.java,v 1.2 2004/11/03 22:49:08 jsuttor Exp $
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    30
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    31
package org.xml.sax.ext;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    32
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    33
import org.xml.sax.SAXException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    34
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    35
/**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    36
 * SAX2 extension handler for lexical events.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    37
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    38
 * <blockquote>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    39
 * <em>This module, both source code and documentation, is in the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    40
 * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    41
 * See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    42
 * for further information.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    43
 * </blockquote>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    44
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    45
 * <p>This is an optional extension handler for SAX2 to provide
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    46
 * lexical information about an XML document, such as comments
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    47
 * and CDATA section boundaries.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    48
 * XML readers are not required to recognize this handler, and it
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    49
 * is not part of core-only SAX2 distributions.</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    50
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    51
 * <p>The events in the lexical handler apply to the entire document,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    52
 * not just to the document element, and all lexical handler events
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    53
 * must appear between the content handler's startDocument and
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    54
 * endDocument events.</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    55
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    56
 * <p>To set the LexicalHandler for an XML reader, use the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    57
 * {@link org.xml.sax.XMLReader#setProperty setProperty} method
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    58
 * with the property name
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    59
 * <code>http://xml.org/sax/properties/lexical-handler</code>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    60
 * and an object implementing this interface (or null) as the value.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    61
 * If the reader does not report lexical events, it will throw a
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    62
 * {@link org.xml.sax.SAXNotRecognizedException SAXNotRecognizedException}
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    63
 * when you attempt to register the handler.</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    64
 *
25262
1fe892ba017a 8047723: @since tag cleanup in jaxp
henryjen
parents: 12457
diff changeset
    65
 * @since 1.4, SAX 2.0 (extensions 1.0)
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    66
 * @author David Megginson
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    67
 */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    68
public interface LexicalHandler
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    69
{
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    70
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    71
    /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    72
     * Report the start of DTD declarations, if any.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    73
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    74
     * <p>This method is intended to report the beginning of the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    75
     * DOCTYPE declaration; if the document has no DOCTYPE declaration,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    76
     * this method will not be invoked.</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    77
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    78
     * <p>All declarations reported through
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    79
     * {@link org.xml.sax.DTDHandler DTDHandler} or
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    80
     * {@link org.xml.sax.ext.DeclHandler DeclHandler} events must appear
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    81
     * between the startDTD and {@link #endDTD endDTD} events.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    82
     * Declarations are assumed to belong to the internal DTD subset
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    83
     * unless they appear between {@link #startEntity startEntity}
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    84
     * and {@link #endEntity endEntity} events.  Comments and
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    85
     * processing instructions from the DTD should also be reported
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    86
     * between the startDTD and endDTD events, in their original
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    87
     * order of (logical) occurrence; they are not required to
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    88
     * appear in their correct locations relative to DTDHandler
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    89
     * or DeclHandler events, however.</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    90
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    91
     * <p>Note that the start/endDTD events will appear within
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    92
     * the start/endDocument events from ContentHandler and
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    93
     * before the first
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    94
     * {@link org.xml.sax.ContentHandler#startElement startElement}
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    95
     * event.</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    96
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    97
     * @param name The document type name.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    98
     * @param publicId The declared public identifier for the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    99
     *        external DTD subset, or null if none was declared.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   100
     * @param systemId The declared system identifier for the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   101
     *        external DTD subset, or null if none was declared.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   102
     *        (Note that this is not resolved against the document
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   103
     *        base URI.)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   104
     * @exception SAXException The application may raise an
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   105
     *            exception.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   106
     * @see #endDTD
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   107
     * @see #startEntity
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   108
     */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   109
    public abstract void startDTD (String name, String publicId,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   110
                                   String systemId)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   111
        throws SAXException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   112
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   113
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   114
    /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   115
     * Report the end of DTD declarations.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   116
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   117
     * <p>This method is intended to report the end of the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   118
     * DOCTYPE declaration; if the document has no DOCTYPE declaration,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   119
     * this method will not be invoked.</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   120
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   121
     * @exception SAXException The application may raise an exception.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   122
     * @see #startDTD
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   123
     */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   124
    public abstract void endDTD ()
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   125
        throws SAXException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   126
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   127
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   128
    /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   129
     * Report the beginning of some internal and external XML entities.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   130
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   131
     * <p>The reporting of parameter entities (including
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   132
     * the external DTD subset) is optional, and SAX2 drivers that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   133
     * report LexicalHandler events may not implement it; you can use the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   134
     * <code
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   135
     * >http://xml.org/sax/features/lexical-handler/parameter-entities</code>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   136
     * feature to query or control the reporting of parameter entities.</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   137
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   138
     * <p>General entities are reported with their regular names,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   139
     * parameter entities have '%' prepended to their names, and
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   140
     * the external DTD subset has the pseudo-entity name "[dtd]".</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   141
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   142
     * <p>When a SAX2 driver is providing these events, all other
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   143
     * events must be properly nested within start/end entity
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   144
     * events.  There is no additional requirement that events from
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   145
     * {@link org.xml.sax.ext.DeclHandler DeclHandler} or
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   146
     * {@link org.xml.sax.DTDHandler DTDHandler} be properly ordered.</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   147
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   148
     * <p>Note that skipped entities will be reported through the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   149
     * {@link org.xml.sax.ContentHandler#skippedEntity skippedEntity}
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   150
     * event, which is part of the ContentHandler interface.</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   151
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   152
     * <p>Because of the streaming event model that SAX uses, some
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   153
     * entity boundaries cannot be reported under any
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   154
     * circumstances:</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   155
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   156
     * <ul>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   157
     * <li>general entities within attribute values</li>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   158
     * <li>parameter entities within declarations</li>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   159
     * </ul>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   160
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   161
     * <p>These will be silently expanded, with no indication of where
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   162
     * the original entity boundaries were.</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   163
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   164
     * <p>Note also that the boundaries of character references (which
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   165
     * are not really entities anyway) are not reported.</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   166
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   167
     * <p>All start/endEntity events must be properly nested.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   168
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   169
     * @param name The name of the entity.  If it is a parameter
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   170
     *        entity, the name will begin with '%', and if it is the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   171
     *        external DTD subset, it will be "[dtd]".
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   172
     * @exception SAXException The application may raise an exception.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   173
     * @see #endEntity
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   174
     * @see org.xml.sax.ext.DeclHandler#internalEntityDecl
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   175
     * @see org.xml.sax.ext.DeclHandler#externalEntityDecl
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   176
     */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   177
    public abstract void startEntity (String name)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   178
        throws SAXException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   179
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   180
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   181
    /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   182
     * Report the end of an entity.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   183
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   184
     * @param name The name of the entity that is ending.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   185
     * @exception SAXException The application may raise an exception.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   186
     * @see #startEntity
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   187
     */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   188
    public abstract void endEntity (String name)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   189
        throws SAXException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   190
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   191
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   192
    /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   193
     * Report the start of a CDATA section.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   194
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   195
     * <p>The contents of the CDATA section will be reported through
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   196
     * the regular {@link org.xml.sax.ContentHandler#characters
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   197
     * characters} event; this event is intended only to report
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   198
     * the boundary.</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   199
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   200
     * @exception SAXException The application may raise an exception.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   201
     * @see #endCDATA
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   202
     */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   203
    public abstract void startCDATA ()
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   204
        throws SAXException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   205
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   206
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   207
    /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   208
     * Report the end of a CDATA section.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   209
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   210
     * @exception SAXException The application may raise an exception.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   211
     * @see #startCDATA
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   212
     */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   213
    public abstract void endCDATA ()
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   214
        throws SAXException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   215
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   216
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   217
    /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   218
     * Report an XML comment anywhere in the document.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   219
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   220
     * <p>This callback will be used for comments inside or outside the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   221
     * document element, including comments in the external DTD
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   222
     * subset (if read).  Comments in the DTD must be properly
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   223
     * nested inside start/endDTD and start/endEntity events (if
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   224
     * used).</p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   225
     *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   226
     * @param ch An array holding the characters in the comment.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   227
     * @param start The starting position in the array.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   228
     * @param length The number of characters to use from the array.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   229
     * @exception SAXException The application may raise an exception.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   230
     */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   231
    public abstract void comment (char ch[], int start, int length)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   232
        throws SAXException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   233
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   234
}
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   235
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   236
// end of LexicalHandler.java