jaxp/src/share/classes/org/xml/sax/DTDHandler.java
author kvn
Fri, 20 Jun 2008 11:10:05 -0700
changeset 762 1b26adb5fea1
parent 6 7f561c08de6b
permissions -rw-r--r--
6715633: when matching a memory node the adr_type should not change Summary: verify the adr_type of a mach node was not changed Reviewed-by: rasbold, never
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6
7f561c08de6b Initial load
duke
parents:
diff changeset
     1
/*
7f561c08de6b Initial load
duke
parents:
diff changeset
     2
 * Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
7f561c08de6b Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7f561c08de6b Initial load
duke
parents:
diff changeset
     4
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
7f561c08de6b Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
7f561c08de6b Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
7f561c08de6b Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
7f561c08de6b Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
7f561c08de6b Initial load
duke
parents:
diff changeset
    10
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
7f561c08de6b Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7f561c08de6b Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
7f561c08de6b Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
7f561c08de6b Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
7f561c08de6b Initial load
duke
parents:
diff changeset
    16
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
7f561c08de6b Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
7f561c08de6b Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
7f561c08de6b Initial load
duke
parents:
diff changeset
    20
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
7f561c08de6b Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
7f561c08de6b Initial load
duke
parents:
diff changeset
    23
 * have any questions.
7f561c08de6b Initial load
duke
parents:
diff changeset
    24
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    25
7f561c08de6b Initial load
duke
parents:
diff changeset
    26
// SAX DTD handler.
7f561c08de6b Initial load
duke
parents:
diff changeset
    27
// http://www.saxproject.org
7f561c08de6b Initial load
duke
parents:
diff changeset
    28
// No warranty; no copyright -- use this as you will.
7f561c08de6b Initial load
duke
parents:
diff changeset
    29
// $Id: DTDHandler.java,v 1.2 2004/11/03 22:44:51 jsuttor Exp $
7f561c08de6b Initial load
duke
parents:
diff changeset
    30
7f561c08de6b Initial load
duke
parents:
diff changeset
    31
package org.xml.sax;
7f561c08de6b Initial load
duke
parents:
diff changeset
    32
7f561c08de6b Initial load
duke
parents:
diff changeset
    33
/**
7f561c08de6b Initial load
duke
parents:
diff changeset
    34
 * Receive notification of basic DTD-related events.
7f561c08de6b Initial load
duke
parents:
diff changeset
    35
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    36
 * <blockquote>
7f561c08de6b Initial load
duke
parents:
diff changeset
    37
 * <em>This module, both source code and documentation, is in the
7f561c08de6b Initial load
duke
parents:
diff changeset
    38
 * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
7f561c08de6b Initial load
duke
parents:
diff changeset
    39
 * See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    40
 * for further information.
7f561c08de6b Initial load
duke
parents:
diff changeset
    41
 * </blockquote>
7f561c08de6b Initial load
duke
parents:
diff changeset
    42
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    43
 * <p>If a SAX application needs information about notations and
7f561c08de6b Initial load
duke
parents:
diff changeset
    44
 * unparsed entities, then the application implements this
7f561c08de6b Initial load
duke
parents:
diff changeset
    45
 * interface and registers an instance with the SAX parser using
7f561c08de6b Initial load
duke
parents:
diff changeset
    46
 * the parser's setDTDHandler method.  The parser uses the
7f561c08de6b Initial load
duke
parents:
diff changeset
    47
 * instance to report notation and unparsed entity declarations to
7f561c08de6b Initial load
duke
parents:
diff changeset
    48
 * the application.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    49
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    50
 * <p>Note that this interface includes only those DTD events that
7f561c08de6b Initial load
duke
parents:
diff changeset
    51
 * the XML recommendation <em>requires</em> processors to report:
7f561c08de6b Initial load
duke
parents:
diff changeset
    52
 * notation and unparsed entity declarations.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    53
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    54
 * <p>The SAX parser may report these events in any order, regardless
7f561c08de6b Initial load
duke
parents:
diff changeset
    55
 * of the order in which the notations and unparsed entities were
7f561c08de6b Initial load
duke
parents:
diff changeset
    56
 * declared; however, all DTD events must be reported after the
7f561c08de6b Initial load
duke
parents:
diff changeset
    57
 * document handler's startDocument event, and before the first
7f561c08de6b Initial load
duke
parents:
diff changeset
    58
 * startElement event.
7f561c08de6b Initial load
duke
parents:
diff changeset
    59
 * (If the {@link org.xml.sax.ext.LexicalHandler LexicalHandler} is
7f561c08de6b Initial load
duke
parents:
diff changeset
    60
 * used, these events must also be reported before the endDTD event.)
7f561c08de6b Initial load
duke
parents:
diff changeset
    61
 * </p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    62
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    63
 * <p>It is up to the application to store the information for
7f561c08de6b Initial load
duke
parents:
diff changeset
    64
 * future use (perhaps in a hash table or object tree).
7f561c08de6b Initial load
duke
parents:
diff changeset
    65
 * If the application encounters attributes of type "NOTATION",
7f561c08de6b Initial load
duke
parents:
diff changeset
    66
 * "ENTITY", or "ENTITIES", it can use the information that it
7f561c08de6b Initial load
duke
parents:
diff changeset
    67
 * obtained through this interface to find the entity and/or
7f561c08de6b Initial load
duke
parents:
diff changeset
    68
 * notation corresponding with the attribute value.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    69
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    70
 * @since SAX 1.0
7f561c08de6b Initial load
duke
parents:
diff changeset
    71
 * @author David Megginson
7f561c08de6b Initial load
duke
parents:
diff changeset
    72
 * @see org.xml.sax.XMLReader#setDTDHandler
7f561c08de6b Initial load
duke
parents:
diff changeset
    73
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    74
public interface DTDHandler {
7f561c08de6b Initial load
duke
parents:
diff changeset
    75
7f561c08de6b Initial load
duke
parents:
diff changeset
    76
7f561c08de6b Initial load
duke
parents:
diff changeset
    77
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
    78
     * Receive notification of a notation declaration event.
7f561c08de6b Initial load
duke
parents:
diff changeset
    79
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    80
     * <p>It is up to the application to record the notation for later
7f561c08de6b Initial load
duke
parents:
diff changeset
    81
     * reference, if necessary;
7f561c08de6b Initial load
duke
parents:
diff changeset
    82
     * notations may appear as attribute values and in unparsed entity
7f561c08de6b Initial load
duke
parents:
diff changeset
    83
     * declarations, and are sometime used with processing instruction
7f561c08de6b Initial load
duke
parents:
diff changeset
    84
     * target names.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    85
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    86
     * <p>At least one of publicId and systemId must be non-null.
7f561c08de6b Initial load
duke
parents:
diff changeset
    87
     * If a system identifier is present, and it is a URL, the SAX
7f561c08de6b Initial load
duke
parents:
diff changeset
    88
     * parser must resolve it fully before passing it to the
7f561c08de6b Initial load
duke
parents:
diff changeset
    89
     * application through this event.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    90
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    91
     * <p>There is no guarantee that the notation declaration will be
7f561c08de6b Initial load
duke
parents:
diff changeset
    92
     * reported before any unparsed entities that use it.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    93
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    94
     * @param name The notation name.
7f561c08de6b Initial load
duke
parents:
diff changeset
    95
     * @param publicId The notation's public identifier, or null if
7f561c08de6b Initial load
duke
parents:
diff changeset
    96
     *        none was given.
7f561c08de6b Initial load
duke
parents:
diff changeset
    97
     * @param systemId The notation's system identifier, or null if
7f561c08de6b Initial load
duke
parents:
diff changeset
    98
     *        none was given.
7f561c08de6b Initial load
duke
parents:
diff changeset
    99
     * @exception org.xml.sax.SAXException Any SAX exception, possibly
7f561c08de6b Initial load
duke
parents:
diff changeset
   100
     *            wrapping another exception.
7f561c08de6b Initial load
duke
parents:
diff changeset
   101
     * @see #unparsedEntityDecl
7f561c08de6b Initial load
duke
parents:
diff changeset
   102
     * @see org.xml.sax.Attributes
7f561c08de6b Initial load
duke
parents:
diff changeset
   103
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   104
    public abstract void notationDecl (String name,
7f561c08de6b Initial load
duke
parents:
diff changeset
   105
                                       String publicId,
7f561c08de6b Initial load
duke
parents:
diff changeset
   106
                                       String systemId)
7f561c08de6b Initial load
duke
parents:
diff changeset
   107
        throws SAXException;
7f561c08de6b Initial load
duke
parents:
diff changeset
   108
7f561c08de6b Initial load
duke
parents:
diff changeset
   109
7f561c08de6b Initial load
duke
parents:
diff changeset
   110
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   111
     * Receive notification of an unparsed entity declaration event.
7f561c08de6b Initial load
duke
parents:
diff changeset
   112
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   113
     * <p>Note that the notation name corresponds to a notation
7f561c08de6b Initial load
duke
parents:
diff changeset
   114
     * reported by the {@link #notationDecl notationDecl} event.
7f561c08de6b Initial load
duke
parents:
diff changeset
   115
     * It is up to the application to record the entity for later
7f561c08de6b Initial load
duke
parents:
diff changeset
   116
     * reference, if necessary;
7f561c08de6b Initial load
duke
parents:
diff changeset
   117
     * unparsed entities may appear as attribute values.
7f561c08de6b Initial load
duke
parents:
diff changeset
   118
     * </p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   119
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   120
     * <p>If the system identifier is a URL, the parser must resolve it
7f561c08de6b Initial load
duke
parents:
diff changeset
   121
     * fully before passing it to the application.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   122
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   123
     * @exception org.xml.sax.SAXException Any SAX exception, possibly
7f561c08de6b Initial load
duke
parents:
diff changeset
   124
     *            wrapping another exception.
7f561c08de6b Initial load
duke
parents:
diff changeset
   125
     * @param name The unparsed entity's name.
7f561c08de6b Initial load
duke
parents:
diff changeset
   126
     * @param publicId The entity's public identifier, or null if none
7f561c08de6b Initial load
duke
parents:
diff changeset
   127
     *        was given.
7f561c08de6b Initial load
duke
parents:
diff changeset
   128
     * @param systemId The entity's system identifier.
7f561c08de6b Initial load
duke
parents:
diff changeset
   129
     * @param notationName The name of the associated notation.
7f561c08de6b Initial load
duke
parents:
diff changeset
   130
     * @see #notationDecl
7f561c08de6b Initial load
duke
parents:
diff changeset
   131
     * @see org.xml.sax.Attributes
7f561c08de6b Initial load
duke
parents:
diff changeset
   132
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   133
    public abstract void unparsedEntityDecl (String name,
7f561c08de6b Initial load
duke
parents:
diff changeset
   134
                                             String publicId,
7f561c08de6b Initial load
duke
parents:
diff changeset
   135
                                             String systemId,
7f561c08de6b Initial load
duke
parents:
diff changeset
   136
                                             String notationName)
7f561c08de6b Initial load
duke
parents:
diff changeset
   137
        throws SAXException;
7f561c08de6b Initial load
duke
parents:
diff changeset
   138
7f561c08de6b Initial load
duke
parents:
diff changeset
   139
}
7f561c08de6b Initial load
duke
parents:
diff changeset
   140
7f561c08de6b Initial load
duke
parents:
diff changeset
   141
// end of DTDHandler.java