jaxp/src/share/classes/javax/xml/XMLConstants.java
author duke
Wed, 05 Jul 2017 16:52:33 +0200
changeset 2690 855108087caf
parent 6 7f561c08de6b
permissions -rw-r--r--
Merge
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;
7f561c08de6b Initial load
duke
parents:
diff changeset
    27
7f561c08de6b Initial load
duke
parents:
diff changeset
    28
/**
7f561c08de6b Initial load
duke
parents:
diff changeset
    29
 * <p>Utility class to contain basic XML values as constants.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    30
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    31
 * @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    32
 * @see <a href="http://www.w3.org/TR/xml11/">Extensible Markup Language (XML) 1.1</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    33
 * @see <a href="http://www.w3.org/TR/REC-xml">Extensible Markup Language (XML) 1.0 (Second Edition)</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    34
 * @see <a href="http://www.w3.org/XML/xml-V10-2e-errata">XML 1.0 Second Edition Specification Errata</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    35
 * @see <a href="http://www.w3.org/TR/xml-names11/">Namespaces in XML 1.1</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    36
 * @see <a href="http://www.w3.org/TR/REC-xml-names">Namespaces in XML</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    37
 * @see <a href="http://www.w3.org/XML/xml-names-19990114-errata">Namespaces in XML Errata</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    38
 * @see <a href="http://www.w3.org/TR/xmlschema-1/">XML Schema Part 1: Structures</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    39
 * @since 1.5
7f561c08de6b Initial load
duke
parents:
diff changeset
    40
 **/
7f561c08de6b Initial load
duke
parents:
diff changeset
    41
7f561c08de6b Initial load
duke
parents:
diff changeset
    42
public final class XMLConstants {
7f561c08de6b Initial load
duke
parents:
diff changeset
    43
7f561c08de6b Initial load
duke
parents:
diff changeset
    44
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
    45
     * <p>Private constructor to prevent instantiation.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    46
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
    47
        private XMLConstants() {
7f561c08de6b Initial load
duke
parents:
diff changeset
    48
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
    49
7f561c08de6b Initial load
duke
parents:
diff changeset
    50
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
    51
     * <p>Namespace URI to use to represent that there is no Namespace.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    52
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    53
     * <p>Defined by the Namespace specification to be "".</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    54
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    55
     * @see <a href="http://www.w3.org/TR/REC-xml-names/#defaulting">
7f561c08de6b Initial load
duke
parents:
diff changeset
    56
     * Namespaces in XML, 5.2 Namespace Defaulting</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    57
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
    58
    public static final String NULL_NS_URI = "";
7f561c08de6b Initial load
duke
parents:
diff changeset
    59
7f561c08de6b Initial load
duke
parents:
diff changeset
    60
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
    61
     * <p>Prefix to use to represent the default XML Namespace.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    62
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    63
     * <p>Defined by the XML specification to be "".</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    64
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    65
     * @see <a
7f561c08de6b Initial load
duke
parents:
diff changeset
    66
     * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
7f561c08de6b Initial load
duke
parents:
diff changeset
    67
     * Namespaces in XML, 3. Qualified Names</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    68
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
    69
    public static final String DEFAULT_NS_PREFIX = "";
7f561c08de6b Initial load
duke
parents:
diff changeset
    70
7f561c08de6b Initial load
duke
parents:
diff changeset
    71
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
    72
     * <p>The official XML Namespace name URI.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    73
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    74
     * <p>Defined by the XML specification to be
7f561c08de6b Initial load
duke
parents:
diff changeset
    75
     * "<code>http://www.w3.org/XML/1998/namespace</code>".</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    76
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    77
     * @see <a
7f561c08de6b Initial load
duke
parents:
diff changeset
    78
     * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
7f561c08de6b Initial load
duke
parents:
diff changeset
    79
     * Namespaces in XML, 3. Qualified Names</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    80
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
    81
    public static final String XML_NS_URI =
7f561c08de6b Initial load
duke
parents:
diff changeset
    82
        "http://www.w3.org/XML/1998/namespace";
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>The official XML Namespace prefix.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    86
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    87
     * <p>Defined by the XML specification to be "<code>xml</code>".</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    88
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    89
     * @see <a
7f561c08de6b Initial load
duke
parents:
diff changeset
    90
     * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
7f561c08de6b Initial load
duke
parents:
diff changeset
    91
     * Namespaces in XML, 3. Qualified Names<</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    92
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
    93
    public static final String XML_NS_PREFIX = "xml";
7f561c08de6b Initial load
duke
parents:
diff changeset
    94
7f561c08de6b Initial load
duke
parents:
diff changeset
    95
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
    96
     * <p>The official XML attribute used for specifying XML Namespace
7f561c08de6b Initial load
duke
parents:
diff changeset
    97
     * declarations, {@link #XMLNS_ATTRIBUTE
7f561c08de6b Initial load
duke
parents:
diff changeset
    98
     * XMLConstants.XMLNS_ATTRIBUTE}, Namespace name URI.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    99
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   100
     * <p>Defined by the XML specification to be
7f561c08de6b Initial load
duke
parents:
diff changeset
   101
     * "<code>http://www.w3.org/2000/xmlns/</code>".</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   102
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   103
     * @see <a
7f561c08de6b Initial load
duke
parents:
diff changeset
   104
     * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
7f561c08de6b Initial load
duke
parents:
diff changeset
   105
     * Namespaces in XML, 3. Qualified Names</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
   106
     * @see <a
7f561c08de6b Initial load
duke
parents:
diff changeset
   107
     * href="http://www.w3.org/XML/xml-names-19990114-errata/">
7f561c08de6b Initial load
duke
parents:
diff changeset
   108
     * Namespaces in XML Errata</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
   109
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   110
    public static final String XMLNS_ATTRIBUTE_NS_URI =
7f561c08de6b Initial load
duke
parents:
diff changeset
   111
        "http://www.w3.org/2000/xmlns/";
7f561c08de6b Initial load
duke
parents:
diff changeset
   112
7f561c08de6b Initial load
duke
parents:
diff changeset
   113
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   114
     * <p>The official XML attribute used for specifying XML Namespace
7f561c08de6b Initial load
duke
parents:
diff changeset
   115
     * declarations.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   116
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   117
     * <p>It is <strong><em>NOT</em></strong> valid to use as a
7f561c08de6b Initial load
duke
parents:
diff changeset
   118
     * prefix.  Defined by the XML specification to be
7f561c08de6b Initial load
duke
parents:
diff changeset
   119
     * "<code>xmlns</code>".</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   120
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   121
     * @see <a
7f561c08de6b Initial load
duke
parents:
diff changeset
   122
     * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
7f561c08de6b Initial load
duke
parents:
diff changeset
   123
     * Namespaces in XML, 3. Qualified Names</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
   124
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   125
    public static final String XMLNS_ATTRIBUTE = "xmlns";
7f561c08de6b Initial load
duke
parents:
diff changeset
   126
7f561c08de6b Initial load
duke
parents:
diff changeset
   127
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   128
     * <p>W3C XML Schema Namespace URI.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   129
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   130
     * <p>Defined to be "<code>http://www.w3.org/2001/XMLSchema</code>".
7f561c08de6b Initial load
duke
parents:
diff changeset
   131
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   132
     * @see <a href=
7f561c08de6b Initial load
duke
parents:
diff changeset
   133
     *  "http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions">
7f561c08de6b Initial load
duke
parents:
diff changeset
   134
     *  XML Schema Part 1:
7f561c08de6b Initial load
duke
parents:
diff changeset
   135
     *  Structures, 2.6 Schema-Related Markup in Documents Being Validated</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
   136
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   137
    public static final String W3C_XML_SCHEMA_NS_URI =
7f561c08de6b Initial load
duke
parents:
diff changeset
   138
        "http://www.w3.org/2001/XMLSchema";
7f561c08de6b Initial load
duke
parents:
diff changeset
   139
7f561c08de6b Initial load
duke
parents:
diff changeset
   140
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   141
     * <p>W3C XML Schema Instance Namespace URI.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   142
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   143
     * <p>Defined to be "<code>http://www.w3.org/2001/XMLSchema-instance</code>".</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   144
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   145
     * @see <a href=
7f561c08de6b Initial load
duke
parents:
diff changeset
   146
     *  "http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions">
7f561c08de6b Initial load
duke
parents:
diff changeset
   147
     *  XML Schema Part 1:
7f561c08de6b Initial load
duke
parents:
diff changeset
   148
     *  Structures, 2.6 Schema-Related Markup in Documents Being Validated</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
   149
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   150
    public static final String W3C_XML_SCHEMA_INSTANCE_NS_URI =
7f561c08de6b Initial load
duke
parents:
diff changeset
   151
        "http://www.w3.org/2001/XMLSchema-instance";
7f561c08de6b Initial load
duke
parents:
diff changeset
   152
7f561c08de6b Initial load
duke
parents:
diff changeset
   153
        /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   154
         * <p>W3C XPath Datatype Namespace URI.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   155
         *
7f561c08de6b Initial load
duke
parents:
diff changeset
   156
         * <p>Defined to be "<code>http://www.w3.org/2003/11/xpath-datatypes</code>".</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   157
         *
7f561c08de6b Initial load
duke
parents:
diff changeset
   158
         * @see <a href="http://www.w3.org/TR/xpath-datamodel">XQuery 1.0 and XPath 2.0 Data Model</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
   159
         */
7f561c08de6b Initial load
duke
parents:
diff changeset
   160
        public static final String W3C_XPATH_DATATYPE_NS_URI = "http://www.w3.org/2003/11/xpath-datatypes";
7f561c08de6b Initial load
duke
parents:
diff changeset
   161
7f561c08de6b Initial load
duke
parents:
diff changeset
   162
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   163
     * <p>XML Document Type Declaration Namespace URI as an arbitrary value.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   164
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   165
     * <p>Since not formally defined by any existing standard, arbitrarily define to be "<code>http://www.w3.org/TR/REC-xml</code>".
7f561c08de6b Initial load
duke
parents:
diff changeset
   166
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   167
    public static final String XML_DTD_NS_URI = "http://www.w3.org/TR/REC-xml";
7f561c08de6b Initial load
duke
parents:
diff changeset
   168
7f561c08de6b Initial load
duke
parents:
diff changeset
   169
        /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   170
         * <p>RELAX NG Namespace URI.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   171
         *
7f561c08de6b Initial load
duke
parents:
diff changeset
   172
         * <p>Defined to be "<code>http://relaxng.org/ns/structure/1.0</code>".</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   173
         *
7f561c08de6b Initial load
duke
parents:
diff changeset
   174
         * @see <a href="http://relaxng.org/spec-20011203.html">RELAX NG Specification</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
   175
         */
7f561c08de6b Initial load
duke
parents:
diff changeset
   176
        public static final String RELAXNG_NS_URI = "http://relaxng.org/ns/structure/1.0";
7f561c08de6b Initial load
duke
parents:
diff changeset
   177
7f561c08de6b Initial load
duke
parents:
diff changeset
   178
        /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   179
         * <p>Feature for secure processing.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   180
         *
7f561c08de6b Initial load
duke
parents:
diff changeset
   181
         * <ul>
7f561c08de6b Initial load
duke
parents:
diff changeset
   182
         *   <li>
7f561c08de6b Initial load
duke
parents:
diff changeset
   183
         *     <code>true</code> instructs the implementation to process XML securely.
7f561c08de6b Initial load
duke
parents:
diff changeset
   184
         *     This may set limits on XML constructs to avoid conditions such as denial of service attacks.
7f561c08de6b Initial load
duke
parents:
diff changeset
   185
         *   </li>
7f561c08de6b Initial load
duke
parents:
diff changeset
   186
         *   <li>
7f561c08de6b Initial load
duke
parents:
diff changeset
   187
         *     <code>false</code> instructs the implementation to process XML acording the letter of the XML specifications
7f561c08de6b Initial load
duke
parents:
diff changeset
   188
         *     ingoring security issues such as limits on XML constructs to avoid conditions such as denial of service attacks.
7f561c08de6b Initial load
duke
parents:
diff changeset
   189
         *   </li>
7f561c08de6b Initial load
duke
parents:
diff changeset
   190
         * </ul>
7f561c08de6b Initial load
duke
parents:
diff changeset
   191
         */
7f561c08de6b Initial load
duke
parents:
diff changeset
   192
        public static final String FEATURE_SECURE_PROCESSING = "http://javax.xml.XMLConstants/feature/secure-processing";
7f561c08de6b Initial load
duke
parents:
diff changeset
   193
}