jaxp/src/share/classes/javax/xml/namespace/NamespaceContext.java
author ohair
Mon, 14 Apr 2008 14:52:27 -0700
changeset 311 3c14f21bf3f7
parent 6 7f561c08de6b
permissions -rw-r--r--
6484686: The next directory looks like it is no longer part of the build (deploy makefiles) Summary: Getting rid of the _OUTPUTDIR settings. Using BUILD_PARENT_DIRECTORY instead. This solves problems with the "/build/windows-i586*" paths getting mangled on Windows builds (fastdebug builds in particular). Reviewed-by: tbell
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 2003-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
package javax.xml.namespace;
7f561c08de6b Initial load
duke
parents:
diff changeset
    27
7f561c08de6b Initial load
duke
parents:
diff changeset
    28
import java.util.Iterator;
7f561c08de6b Initial load
duke
parents:
diff changeset
    29
7f561c08de6b Initial load
duke
parents:
diff changeset
    30
/**
7f561c08de6b Initial load
duke
parents:
diff changeset
    31
 * <p>Interface for read only XML Namespace context processing.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    32
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    33
 * <p>An XML Namespace has the properties:</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    34
 * <ul>
7f561c08de6b Initial load
duke
parents:
diff changeset
    35
 *   <li>Namespace URI:
7f561c08de6b Initial load
duke
parents:
diff changeset
    36
 *       Namespace name expressed as a URI to which the prefix is bound</li>
7f561c08de6b Initial load
duke
parents:
diff changeset
    37
 *   <li>prefix: syntactically, this is the part of the attribute name
7f561c08de6b Initial load
duke
parents:
diff changeset
    38
 *       following the <code>XMLConstants.XMLNS_ATTRIBUTE</code>
7f561c08de6b Initial load
duke
parents:
diff changeset
    39
 *       ("xmlns") in the Namespace declaration</li>
7f561c08de6b Initial load
duke
parents:
diff changeset
    40
 * </ul>
7f561c08de6b Initial load
duke
parents:
diff changeset
    41
 * <p>example:
7f561c08de6b Initial load
duke
parents:
diff changeset
    42
 * <code>&lt;element xmlns:prefix="http://Namespace-name-URI"&gt;</code></p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    43
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    44
 * <p>All <code>get*(*)</code> methods operate in the current scope
7f561c08de6b Initial load
duke
parents:
diff changeset
    45
 * for Namespace URI and prefix resolution.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    46
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    47
 * <p>Note that a Namespace URI can be bound to
7f561c08de6b Initial load
duke
parents:
diff changeset
    48
 * <strong>multiple</strong> prefixes in the current scope.  This can
7f561c08de6b Initial load
duke
parents:
diff changeset
    49
 * occur when multiple <code>XMLConstants.XMLNS_ATTRIBUTE</code>
7f561c08de6b Initial load
duke
parents:
diff changeset
    50
 * ("xmlns") Namespace declarations occur in the same Start-Tag and
7f561c08de6b Initial load
duke
parents:
diff changeset
    51
 * refer to the same Namespace URI. e.g.<br />
7f561c08de6b Initial load
duke
parents:
diff changeset
    52
 * <pre>
7f561c08de6b Initial load
duke
parents:
diff changeset
    53
 * &lt;element xmlns:prefix1="http://Namespace-name-URI"
7f561c08de6b Initial load
duke
parents:
diff changeset
    54
 *          xmlns:prefix2="http://Namespace-name-URI"&gt;
7f561c08de6b Initial load
duke
parents:
diff changeset
    55
 * </pre>
7f561c08de6b Initial load
duke
parents:
diff changeset
    56
 * This can also occur when the same Namespace URI is used in multiple
7f561c08de6b Initial load
duke
parents:
diff changeset
    57
 * <code>XMLConstants.XMLNS_ATTRIBUTE</code> ("xmlns") Namespace
7f561c08de6b Initial load
duke
parents:
diff changeset
    58
 * declarations in the logical parent element hierarchy.  e.g.<br />
7f561c08de6b Initial load
duke
parents:
diff changeset
    59
 * <pre>
7f561c08de6b Initial load
duke
parents:
diff changeset
    60
 * &lt;parent xmlns:prefix1="http://Namespace-name-URI">
7f561c08de6b Initial load
duke
parents:
diff changeset
    61
 *   &lt;child xmlns:prefix2="http://Namespace-name-URI"&gt;
7f561c08de6b Initial load
duke
parents:
diff changeset
    62
 *     ...
7f561c08de6b Initial load
duke
parents:
diff changeset
    63
 *   &lt;/child&gt;
7f561c08de6b Initial load
duke
parents:
diff changeset
    64
 * &lt;/parent&gt;
7f561c08de6b Initial load
duke
parents:
diff changeset
    65
 * </pre></p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    66
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    67
 * <p>A prefix can only be bound to a <strong>single</strong>
7f561c08de6b Initial load
duke
parents:
diff changeset
    68
 * Namespace URI in the current scope.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    69
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    70
 * @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    71
 * @see javax.xml.XMLConstants
7f561c08de6b Initial load
duke
parents:
diff changeset
    72
 *   javax.xml.XMLConstants for declarations of common XML values
7f561c08de6b Initial load
duke
parents:
diff changeset
    73
 * @see <a href="http://www.w3.org/TR/xmlschema-2/#QName">
7f561c08de6b Initial load
duke
parents:
diff changeset
    74
 *   XML Schema Part2: Datatypes</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    75
 * @see <a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
7f561c08de6b Initial load
duke
parents:
diff changeset
    76
 *   Namespaces in XML</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    77
 * @see <a href="http://www.w3.org/XML/xml-names-19990114-errata">
7f561c08de6b Initial load
duke
parents:
diff changeset
    78
 *   Namespaces in XML Errata</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    79
 * @since 1.5
7f561c08de6b Initial load
duke
parents:
diff changeset
    80
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    81
7f561c08de6b Initial load
duke
parents:
diff changeset
    82
public interface NamespaceContext {
7f561c08de6b Initial load
duke
parents:
diff changeset
    83
7f561c08de6b Initial load
duke
parents:
diff changeset
    84
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
    85
     * <p>Get Namespace URI bound to a prefix in the current scope.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    86
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    87
     * <p>When requesting a Namespace URI by prefix, the following
7f561c08de6b Initial load
duke
parents:
diff changeset
    88
     * table describes the returned Namespace URI value for all
7f561c08de6b Initial load
duke
parents:
diff changeset
    89
     * possible prefix values:</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    90
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    91
     * <table border="2" rules="all" cellpadding="4">
7f561c08de6b Initial load
duke
parents:
diff changeset
    92
     *   <thead>
7f561c08de6b Initial load
duke
parents:
diff changeset
    93
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
    94
     *       <td align="center" colspan="2">
7f561c08de6b Initial load
duke
parents:
diff changeset
    95
     *         <code>getNamespaceURI(prefix)</code>
7f561c08de6b Initial load
duke
parents:
diff changeset
    96
     *         return value for specified prefixes
7f561c08de6b Initial load
duke
parents:
diff changeset
    97
     *       </td>
7f561c08de6b Initial load
duke
parents:
diff changeset
    98
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
    99
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   100
     *       <td>prefix parameter</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   101
     *       <td>Namespace URI return value</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   102
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   103
     *   </thead>
7f561c08de6b Initial load
duke
parents:
diff changeset
   104
     *   <tbody>
7f561c08de6b Initial load
duke
parents:
diff changeset
   105
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   106
     *       <td><code>DEFAULT_NS_PREFIX</code> ("")</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   107
     *       <td>default Namespace URI in the current scope or
7f561c08de6b Initial load
duke
parents:
diff changeset
   108
     *         <code>{@link
7f561c08de6b Initial load
duke
parents:
diff changeset
   109
     *         javax.xml.XMLConstants#NULL_NS_URI XMLConstants.NULL_NS_URI("")}
7f561c08de6b Initial load
duke
parents:
diff changeset
   110
     *         </code>
7f561c08de6b Initial load
duke
parents:
diff changeset
   111
     *         when there is no default Namespace URI in the current scope</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   112
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   113
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   114
     *       <td>bound prefix</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   115
     *       <td>Namespace URI bound to prefix in current scope</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   116
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   117
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   118
     *       <td>unbound prefix</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   119
     *       <td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   120
     *         <code>{@link
7f561c08de6b Initial load
duke
parents:
diff changeset
   121
     *         javax.xml.XMLConstants#NULL_NS_URI XMLConstants.NULL_NS_URI("")}
7f561c08de6b Initial load
duke
parents:
diff changeset
   122
     *         </code>
7f561c08de6b Initial load
duke
parents:
diff changeset
   123
     *       </td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   124
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   125
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   126
     *       <td><code>XMLConstants.XML_NS_PREFIX</code> ("xml")</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   127
     *       <td><code>XMLConstants.XML_NS_URI</code>
7f561c08de6b Initial load
duke
parents:
diff changeset
   128
     *           ("http://www.w3.org/XML/1998/namespace")</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   129
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   130
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   131
     *       <td><code>XMLConstants.XMLNS_ATTRIBUTE</code> ("xmlns")</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   132
     *       <td><code>XMLConstants.XMLNS_ATTRIBUTE_NS_URI</code>
7f561c08de6b Initial load
duke
parents:
diff changeset
   133
     *         ("http://www.w3.org/2000/xmlns/")</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   134
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   135
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   136
     *       <td><code>null</code></td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   137
     *       <td><code>IllegalArgumentException</code> is thrown</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   138
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   139
     *    </tbody>
7f561c08de6b Initial load
duke
parents:
diff changeset
   140
     * </table>
7f561c08de6b Initial load
duke
parents:
diff changeset
   141
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   142
     * @param prefix prefix to look up
7f561c08de6b Initial load
duke
parents:
diff changeset
   143
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   144
     * @return Namespace URI bound to prefix in the current scope
7f561c08de6b Initial load
duke
parents:
diff changeset
   145
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   146
     * @throws IllegalArgumentException When <code>prefix</code> is
7f561c08de6b Initial load
duke
parents:
diff changeset
   147
     *   <code>null</code>
7f561c08de6b Initial load
duke
parents:
diff changeset
   148
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   149
    String getNamespaceURI(String prefix);
7f561c08de6b Initial load
duke
parents:
diff changeset
   150
7f561c08de6b Initial load
duke
parents:
diff changeset
   151
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   152
     * <p>Get prefix bound to Namespace URI in the current scope.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   153
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   154
     * <p>To get all prefixes bound to a Namespace URI in the current
7f561c08de6b Initial load
duke
parents:
diff changeset
   155
     * scope, use {@link #getPrefixes(String namespaceURI)}.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   156
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   157
     * <p>When requesting a prefix by Namespace URI, the following
7f561c08de6b Initial load
duke
parents:
diff changeset
   158
     * table describes the returned prefix value for all Namespace URI
7f561c08de6b Initial load
duke
parents:
diff changeset
   159
     * values:</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   160
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   161
     * <table border="2" rules="all" cellpadding="4">
7f561c08de6b Initial load
duke
parents:
diff changeset
   162
     *   <thead>
7f561c08de6b Initial load
duke
parents:
diff changeset
   163
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   164
     *       <th align="center" colspan="2">
7f561c08de6b Initial load
duke
parents:
diff changeset
   165
     *         <code>getPrefix(namespaceURI)</code> return value for
7f561c08de6b Initial load
duke
parents:
diff changeset
   166
     *         specified Namespace URIs
7f561c08de6b Initial load
duke
parents:
diff changeset
   167
     *       </th>
7f561c08de6b Initial load
duke
parents:
diff changeset
   168
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   169
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   170
     *       <th>Namespace URI parameter</th>
7f561c08de6b Initial load
duke
parents:
diff changeset
   171
     *       <th>prefix value returned</th>
7f561c08de6b Initial load
duke
parents:
diff changeset
   172
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   173
     *   </thead>
7f561c08de6b Initial load
duke
parents:
diff changeset
   174
     *   <tbody>
7f561c08de6b Initial load
duke
parents:
diff changeset
   175
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   176
     *       <td>&lt;default Namespace URI&gt;</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   177
     *       <td><code>XMLConstants.DEFAULT_NS_PREFIX</code> ("")
7f561c08de6b Initial load
duke
parents:
diff changeset
   178
     *       </td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   179
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   180
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   181
     *       <td>bound Namespace URI</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   182
     *       <td>prefix bound to Namespace URI in the current scope,
7f561c08de6b Initial load
duke
parents:
diff changeset
   183
     *           if multiple prefixes are bound to the Namespace URI in
7f561c08de6b Initial load
duke
parents:
diff changeset
   184
     *           the current scope, a single arbitrary prefix, whose
7f561c08de6b Initial load
duke
parents:
diff changeset
   185
     *           choice is implementation dependent, is returned</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   186
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   187
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   188
     *       <td>unbound Namespace URI</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   189
     *       <td><code>null</code></td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   190
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   191
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   192
     *       <td><code>XMLConstants.XML_NS_URI</code>
7f561c08de6b Initial load
duke
parents:
diff changeset
   193
     *           ("http://www.w3.org/XML/1998/namespace")</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   194
     *       <td><code>XMLConstants.XML_NS_PREFIX</code> ("xml")</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   195
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   196
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   197
     *       <td><code>XMLConstants.XMLNS_ATTRIBUTE_NS_URI</code>
7f561c08de6b Initial load
duke
parents:
diff changeset
   198
     *           ("http://www.w3.org/2000/xmlns/")</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   199
     *       <td><code>XMLConstants.XMLNS_ATTRIBUTE</code> ("xmlns")</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   200
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   201
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   202
     *       <td><code>null</code></td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   203
     *       <td><code>IllegalArgumentException</code> is thrown</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   204
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   205
     *   </tbody>
7f561c08de6b Initial load
duke
parents:
diff changeset
   206
     * </table>
7f561c08de6b Initial load
duke
parents:
diff changeset
   207
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   208
     * @param namespaceURI URI of Namespace to lookup
7f561c08de6b Initial load
duke
parents:
diff changeset
   209
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   210
     * @return prefix bound to Namespace URI in current context
7f561c08de6b Initial load
duke
parents:
diff changeset
   211
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   212
     * @throws IllegalArgumentException When <code>namespaceURI</code> is
7f561c08de6b Initial load
duke
parents:
diff changeset
   213
     *   <code>null</code>
7f561c08de6b Initial load
duke
parents:
diff changeset
   214
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   215
    String getPrefix(String namespaceURI);
7f561c08de6b Initial load
duke
parents:
diff changeset
   216
7f561c08de6b Initial load
duke
parents:
diff changeset
   217
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   218
     * <p>Get all prefixes bound to a Namespace URI in the current
7f561c08de6b Initial load
duke
parents:
diff changeset
   219
     * scope.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   220
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   221
     * <p>An Iterator over String elements is returned in an arbitrary,
7f561c08de6b Initial load
duke
parents:
diff changeset
   222
     * <strong>implementation dependent</strong>, order.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   223
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   224
     * <p><strong>The <code>Iterator</code> is
7f561c08de6b Initial load
duke
parents:
diff changeset
   225
     * <em>not</em> modifiable.  e.g. the
7f561c08de6b Initial load
duke
parents:
diff changeset
   226
     * <code>remove()</code> method will throw
7f561c08de6b Initial load
duke
parents:
diff changeset
   227
     * <code>UnsupportedOperationException</code>.</strong></p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   228
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   229
     * <p>When requesting prefixes by Namespace URI, the following
7f561c08de6b Initial load
duke
parents:
diff changeset
   230
     * table describes the returned prefixes value for all Namespace
7f561c08de6b Initial load
duke
parents:
diff changeset
   231
     * URI values:</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   232
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   233
     * <table border="2" rules="all" cellpadding="4">
7f561c08de6b Initial load
duke
parents:
diff changeset
   234
     *   <thead>
7f561c08de6b Initial load
duke
parents:
diff changeset
   235
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   236
     *       <th align="center" colspan="2"><code>
7f561c08de6b Initial load
duke
parents:
diff changeset
   237
     *         getPrefixes(namespaceURI)</code> return value for
7f561c08de6b Initial load
duke
parents:
diff changeset
   238
     *         specified Namespace URIs</th>
7f561c08de6b Initial load
duke
parents:
diff changeset
   239
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   240
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   241
     *       <th>Namespace URI parameter</th>
7f561c08de6b Initial load
duke
parents:
diff changeset
   242
     *       <th>prefixes value returned</th>
7f561c08de6b Initial load
duke
parents:
diff changeset
   243
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   244
     *   </thead>
7f561c08de6b Initial load
duke
parents:
diff changeset
   245
     *   <tbody>
7f561c08de6b Initial load
duke
parents:
diff changeset
   246
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   247
     *       <td>bound Namespace URI,
7f561c08de6b Initial load
duke
parents:
diff changeset
   248
     *         including the &lt;default Namespace URI&gt;</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   249
     *       <td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   250
     *         <code>Iterator</code> over prefixes bound to Namespace URI in
7f561c08de6b Initial load
duke
parents:
diff changeset
   251
     *         the current scope in an arbitrary,
7f561c08de6b Initial load
duke
parents:
diff changeset
   252
     *         <strong>implementation dependent</strong>,
7f561c08de6b Initial load
duke
parents:
diff changeset
   253
     *         order
7f561c08de6b Initial load
duke
parents:
diff changeset
   254
     *       </td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   255
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   256
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   257
     *       <td>unbound Namespace URI</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   258
     *       <td>empty <code>Iterator</code></td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   259
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   260
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   261
     *       <td><code>XMLConstants.XML_NS_URI</code>
7f561c08de6b Initial load
duke
parents:
diff changeset
   262
     *           ("http://www.w3.org/XML/1998/namespace")</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   263
     *       <td><code>Iterator</code> with one element set to
7f561c08de6b Initial load
duke
parents:
diff changeset
   264
     *         <code>XMLConstants.XML_NS_PREFIX</code> ("xml")</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   265
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   266
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   267
     *       <td><code>XMLConstants.XMLNS_ATTRIBUTE_NS_URI</code>
7f561c08de6b Initial load
duke
parents:
diff changeset
   268
     *           ("http://www.w3.org/2000/xmlns/")</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   269
     *       <td><code>Iterator</code> with one element set to
7f561c08de6b Initial load
duke
parents:
diff changeset
   270
     *         <code>XMLConstants.XMLNS_ATTRIBUTE</code> ("xmlns")</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   271
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   272
     *     <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   273
     *       <td><code>null</code></td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   274
     *       <td><code>IllegalArgumentException</code> is thrown</td>
7f561c08de6b Initial load
duke
parents:
diff changeset
   275
     *     </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
   276
     *   </tbody>
7f561c08de6b Initial load
duke
parents:
diff changeset
   277
     * </table>
7f561c08de6b Initial load
duke
parents:
diff changeset
   278
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   279
     * @param namespaceURI URI of Namespace to lookup
7f561c08de6b Initial load
duke
parents:
diff changeset
   280
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   281
     * @return <code>Iterator</code> for all prefixes bound to the
7f561c08de6b Initial load
duke
parents:
diff changeset
   282
     *   Namespace URI in the current scope
7f561c08de6b Initial load
duke
parents:
diff changeset
   283
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   284
     * @throws IllegalArgumentException When <code>namespaceURI</code> is
7f561c08de6b Initial load
duke
parents:
diff changeset
   285
     *   <code>null</code>
7f561c08de6b Initial load
duke
parents:
diff changeset
   286
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   287
    Iterator getPrefixes(String namespaceURI);
7f561c08de6b Initial load
duke
parents:
diff changeset
   288
}