2
* Copyright 2003-2004 The Apache Software Foundation.
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
17
// $Id: XMLConstants.java 226183 2005-04-08 10:39:14Z neeraj $
22
* <p>Utility class to contain basic XML values as constants.</p>
24
* @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
25
* @version $Revision: 226183 $, $Date: 2005-04-08 06:39:14 -0400 (Fri, 08 Apr 2005) $
26
* @see <a href="http://www.w3.org/TR/xml11/">Extensible Markup Language (XML) 1.1</a>
27
* @see <a href="http://www.w3.org/TR/REC-xml">Extensible Markup Language (XML) 1.0 (Second Edition)</a>
28
* @see <a href="http://www.w3.org/XML/xml-V10-2e-errata">XML 1.0 Second Edition Specification Errata</a>
29
* @see <a href="http://www.w3.org/TR/xml-names11/">Namespaces in XML 1.1</a>
30
* @see <a href="http://www.w3.org/TR/REC-xml-names">Namespaces in XML</a>
31
* @see <a href="http://www.w3.org/XML/xml-names-19990114-errata">Namespaces in XML Errata</a>
32
* @see <a href="http://www.w3.org/TR/xmlschema-1/">XML Schema Part 1: Structures</a>
36
public final class XMLConstants {
39
* <p>Private constructor to prevent instantiation.</p>
41
private XMLConstants() {
45
* <p>Namespace URI to use to represent that there is no Namespace.</p>
47
* <p>Defined by the Namespace specification to be "".</p>
49
* @see <a href="http://www.w3.org/TR/REC-xml-names/#defaulting">
50
* Namespaces in XML, 5.2 Namespace Defaulting</a>
52
public static final String NULL_NS_URI = "";
55
* <p>Prefix to use to represent the default XML Namespace.</p>
57
* <p>Defined by the XML specification to be "".</p>
60
* href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
61
* Namespaces in XML, 3. Qualified Names</a>
63
public static final String DEFAULT_NS_PREFIX = "";
66
* <p>The official XML Namespace name URI.</p>
68
* <p>Defined by the XML specification to be
69
* "<code>http://www.w3.org/XML/1998/namespace</code>".</p>
72
* href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
73
* Namespaces in XML, 3. Qualified Names</a>
75
public static final String XML_NS_URI =
76
"http://www.w3.org/XML/1998/namespace";
79
* <p>The official XML Namespace prefix.</p>
81
* <p>Defined by the XML specification to be "<code>xml</code>".</p>
84
* href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
85
* Namespaces in XML, 3. Qualified Names<</a>
87
public static final String XML_NS_PREFIX = "xml";
90
* <p>The official XML attribute used for specifying XML Namespace
91
* declarations, {@link #XMLNS_ATTRIBUTE
92
* XMLConstants.XMLNS_ATTRIBUTE}, Namespace name URI.</p>
94
* <p>Defined by the XML specification to be
95
* "<code>http://www.w3.org/2000/xmlns/</code>".</p>
98
* href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
99
* Namespaces in XML, 3. Qualified Names</a>
101
* href="http://www.w3.org/XML/xml-names-19990114-errata/">
102
* Namespaces in XML Errata</a>
104
public static final String XMLNS_ATTRIBUTE_NS_URI =
105
"http://www.w3.org/2000/xmlns/";
108
* <p>The official XML attribute used for specifying XML Namespace
111
* <p>It is <strong><em>NOT</em></strong> valid to use as a
112
* prefix. Defined by the XML specification to be
113
* "<code>xmlns</code>".</p>
116
* href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
117
* Namespaces in XML, 3. Qualified Names</a>
119
public static final String XMLNS_ATTRIBUTE = "xmlns";
122
* <p>W3C XML Schema Namespace URI.</p>
124
* <p>Defined to be "<code>http://www.w3.org/2001/XMLSchema</code>".
127
* "http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions">
129
* Structures, 2.6 Schema-Related Markup in Documents Being Validated</a>
131
public static final String W3C_XML_SCHEMA_NS_URI =
132
"http://www.w3.org/2001/XMLSchema";
135
* <p>W3C XML Schema Instance Namespace URI.</p>
137
* <p>Defined to be "<code>http://www.w3.org/2001/XMLSchema-instance</code>".</p>
140
* "http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions">
142
* Structures, 2.6 Schema-Related Markup in Documents Being Validated</a>
144
public static final String W3C_XML_SCHEMA_INSTANCE_NS_URI =
145
"http://www.w3.org/2001/XMLSchema-instance";
148
* <p>W3C XPath Datatype Namespace URI.</p>
150
* <p>Defined to be "<code>http://www.w3.org/2003/11/xpath-datatypes</code>".</p>
152
* @see <a href="http://www.w3.org/TR/xpath-datamodel">XQuery 1.0 and XPath 2.0 Data Model</a>
154
public static final String W3C_XPATH_DATATYPE_NS_URI = "http://www.w3.org/2003/11/xpath-datatypes";
157
* <p>XML Document Type Declaration Namespace URI as an arbitrary value.</p>
159
* <p>Since not formally defined by any existing standard, arbitrarily define to be "<code>http://www.w3.org/TR/REC-xml</code>".
161
public static final String XML_DTD_NS_URI = "http://www.w3.org/TR/REC-xml";
164
* <p>RELAX NG Namespace URI.</p>
166
* <p>Defined to be "<code>http://relaxng.org/ns/structure/1.0</code>".</p>
168
* @see <a href="http://relaxng.org/spec-20011203.html">RELAX NG Specification</a>
170
public static final String RELAXNG_NS_URI = "http://relaxng.org/ns/structure/1.0";
173
* <p>Feature for secure processing.</p>
177
* <code>true</code> instructs the implementation to process XML securely.
178
* This may set limits on XML constructs to avoid conditions such as denial of service attacks.
181
* <code>false</code> instructs the implementation to process XML acording the letter of the XML specifications
182
* ingoring security issues such as limits on XML constructs to avoid conditions such as denial of service attacks.
186
public static final String FEATURE_SECURE_PROCESSING = "http://javax.xml.XMLConstants/feature/secure-processing";