1 /*
2 * Copyright (c) 2003, 2017, 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
55 * </pre>
56 * This can also occur when the same Namespace URI is used in multiple
57 * {@code XMLConstants.XMLNS_ATTRIBUTE} ("xmlns") Namespace
58 * declarations in the logical parent element hierarchy. e.g.<br>
59 * <pre> {@code
60 * <parent xmlns:prefix1="http://Namespace-name-URI">
61 * <child xmlns:prefix2="http://Namespace-name-URI">
62 * ...
63 * </child>
64 * </parent> }
65 * </pre>
66 *
67 * <p>A prefix can only be bound to a <strong>single</strong>
68 * Namespace URI in the current scope.
69 *
70 * @author Jeff Suttor
71 * @see javax.xml.XMLConstants
72 * javax.xml.XMLConstants for declarations of common XML values
73 * @see <a href="http://www.w3.org/TR/xmlschema-2/#QName">
74 * XML Schema Part2: Datatypes</a>
75 * @see <a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
76 * Namespaces in XML</a>
77 * @see <a href="http://www.w3.org/XML/xml-names-19990114-errata">
78 * Namespaces in XML Errata</a>
79 * @since 1.5
80 */
81
82 public interface NamespaceContext {
83
84 /**
85 * Get Namespace URI bound to a prefix in the current scope.
86 *
87 * <p>When requesting a Namespace URI by prefix, the following
88 * table describes the returned Namespace URI value for all
89 * possible prefix values:
90 *
91 * <table class="striped">
92 * <caption>Return value for specified prefixes</caption>
93 * <thead>
94 * <tr>
95 * <th scope="col">prefix parameter</th>
96 * <th scope="col">Namespace URI return value</th>
97 * </tr>
98 * </thead>
|
1 /*
2 * Copyright (c) 2003, 2018, 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
55 * </pre>
56 * This can also occur when the same Namespace URI is used in multiple
57 * {@code XMLConstants.XMLNS_ATTRIBUTE} ("xmlns") Namespace
58 * declarations in the logical parent element hierarchy. e.g.<br>
59 * <pre> {@code
60 * <parent xmlns:prefix1="http://Namespace-name-URI">
61 * <child xmlns:prefix2="http://Namespace-name-URI">
62 * ...
63 * </child>
64 * </parent> }
65 * </pre>
66 *
67 * <p>A prefix can only be bound to a <strong>single</strong>
68 * Namespace URI in the current scope.
69 *
70 * @author Jeff Suttor
71 * @see javax.xml.XMLConstants
72 * javax.xml.XMLConstants for declarations of common XML values
73 * @see <a href="http://www.w3.org/TR/xmlschema-2/#QName">
74 * XML Schema Part2: Datatypes</a>
75 * @see <a href="http://www.w3.org/TR/REC-xml-names/">
76 * Namespaces in XML</a>
77 * @since 1.5
78 */
79
80 public interface NamespaceContext {
81
82 /**
83 * Get Namespace URI bound to a prefix in the current scope.
84 *
85 * <p>When requesting a Namespace URI by prefix, the following
86 * table describes the returned Namespace URI value for all
87 * possible prefix values:
88 *
89 * <table class="striped">
90 * <caption>Return value for specified prefixes</caption>
91 * <thead>
92 * <tr>
93 * <th scope="col">prefix parameter</th>
94 * <th scope="col">Namespace URI return value</th>
95 * </tr>
96 * </thead>
|