KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > XMLConstants


1 // $Id: XMLConstants.java,v 1.10.12.1 2004/05/05 20:04:51 jsuttor Exp $
2

3 /*
4  * @(#)XMLConstants.java 1.8 04/07/26
5  *
6  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
7  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
8  */

9
10 package javax.xml;
11
12 /**
13  * <p>Utility class to contain basic XML values as constants.</p>
14  *
15  * @author <a HREF="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
16  * @version $Revision: 1.10.12.1 $, $Date: 2004/05/05 20:04:51 $
17  * @see <a HREF="http://www.w3.org/TR/xml11/">Extensible Markup Language (XML) 1.1</a>
18  * @see <a HREF="http://www.w3.org/TR/REC-xml">Extensible Markup Language (XML) 1.0 (Second Edition)</a>
19  * @see <a HREF="http://www.w3.org/XML/xml-V10-2e-errata">XML 1.0 Second Edition Specification Errata</a>
20  * @see <a HREF="http://www.w3.org/TR/xml-names11/">Namespaces in XML 1.1</a>
21  * @see <a HREF="http://www.w3.org/TR/REC-xml-names">Namespaces in XML</a>
22  * @see <a HREF="http://www.w3.org/XML/xml-names-19990114-errata">Namespaces in XML Errata</a>
23  * @see <a HREF="http://www.w3.org/TR/xmlschema-1/">XML Schema Part 1: Structures</a>
24  * @since 1.5
25  **/

26
27 public final class XMLConstants {
28     
29     /**
30      * <p>Private constructor to prevent instantiation.</p>
31      */

32     private XMLConstants() {
33     }
34
35     /**
36      * <p>Namespace URI to use to represent that there is no Namespace.</p>
37      *
38      * <p>Defined by the Namespace specification to be "".</p>
39      *
40      * @see <a HREF="http://www.w3.org/TR/REC-xml-names/#defaulting">
41      * Namespaces in XML, 5.2 Namespace Defaulting</a>
42      */

43     public static final String JavaDoc NULL_NS_URI = "";
44
45     /**
46      * <p>Prefix to use to represent the default XML Namespace.</p>
47      *
48      * <p>Defined by the XML specification to be "".</p>
49      *
50      * @see <a
51      * HREF="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
52      * Namespaces in XML, 3. Qualified Names</a>
53      */

54     public static final String JavaDoc DEFAULT_NS_PREFIX = "";
55
56     /**
57      * <p>The official XML Namespace name URI.</p>
58      *
59      * <p>Defined by the XML specification to be
60      * "<code>http://www.w3.org/XML/1998/namespace</code>".</p>
61      *
62      * @see <a
63      * HREF="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
64      * Namespaces in XML, 3. Qualified Names</a>
65      */

66     public static final String JavaDoc XML_NS_URI =
67         "http://www.w3.org/XML/1998/namespace";
68
69     /**
70      * <p>The official XML Namespace prefix.</p>
71      *
72      * <p>Defined by the XML specification to be "<code>xml</code>".</p>
73      *
74      * @see <a
75      * HREF="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
76      * Namespaces in XML, 3. Qualified Names<</a>
77      */

78     public static final String JavaDoc XML_NS_PREFIX = "xml";
79
80     /**
81      * <p>The official XML attribute used for specifying XML Namespace
82      * declarations, {@link #XMLNS_ATTRIBUTE
83      * XMLConstants.XMLNS_ATTRIBUTE}, Namespace name URI.</p>
84      *
85      * <p>Defined by the XML specification to be
86      * "<code>http://www.w3.org/2000/xmlns/</code>".</p>
87      *
88      * @see <a
89      * HREF="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
90      * Namespaces in XML, 3. Qualified Names</a>
91      * @see <a
92      * HREF="http://www.w3.org/XML/xml-names-19990114-errata/">
93      * Namespaces in XML Errata</a>
94      */

95     public static final String JavaDoc XMLNS_ATTRIBUTE_NS_URI =
96         "http://www.w3.org/2000/xmlns/";
97
98     /**
99      * <p>The official XML attribute used for specifying XML Namespace
100      * declarations.</p>
101      *
102      * <p>It is <strong><em>NOT</em></strong> valid to use as a
103      * prefix. Defined by the XML specification to be
104      * "<code>xmlns</code>".</p>
105      *
106      * @see <a
107      * HREF="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
108      * Namespaces in XML, 3. Qualified Names</a>
109      */

110     public static final String JavaDoc XMLNS_ATTRIBUTE = "xmlns";
111     
112     /**
113      * <p>W3C XML Schema Namespace URI.</p>
114      *
115      * <p>Defined to be "<code>http://www.w3.org/2001/XMLSchema</code>".
116      *
117      * @see <a HREF=
118      * "http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions">
119      * XML Schema Part 1:
120      * Structures, 2.6 Schema-Related Markup in Documents Being Validated</a>
121      */

122     public static final String JavaDoc W3C_XML_SCHEMA_NS_URI =
123         "http://www.w3.org/2001/XMLSchema";
124
125     /**
126      * <p>W3C XML Schema Instance Namespace URI.</p>
127      *
128      * <p>Defined to be "<code>http://www.w3.org/2001/XMLSchema-instance</code>".</p>
129      *
130      * @see <a HREF=
131      * "http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions">
132      * XML Schema Part 1:
133      * Structures, 2.6 Schema-Related Markup in Documents Being Validated</a>
134      */

135     public static final String JavaDoc W3C_XML_SCHEMA_INSTANCE_NS_URI =
136         "http://www.w3.org/2001/XMLSchema-instance";
137
138     /**
139      * <p>W3C XPath Datatype Namespace URI.</p>
140      *
141      * <p>Defined to be "<code>http://www.w3.org/2003/11/xpath-datatypes</code>".</p>
142      *
143      * @see <a HREF="http://www.w3.org/TR/xpath-datamodel">XQuery 1.0 and XPath 2.0 Data Model</a>
144      */

145     public static final String JavaDoc W3C_XPATH_DATATYPE_NS_URI = "http://www.w3.org/2003/11/xpath-datatypes";
146
147     /**
148      * <p>XML Document Type Declaration Namespace URI as an arbitrary value.</p>
149      *
150      * <p>Since not formally defined by any existing standard, arbitrarily define to be "<code>http://www.w3.org/TR/REC-xml</code>".
151      */

152     public static final String JavaDoc XML_DTD_NS_URI = "http://www.w3.org/TR/REC-xml";
153
154     /**
155      * <p>RELAX NG Namespace URI.</p>
156      *
157      * <p>Defined to be "<code>http://relaxng.org/ns/structure/1.0</code>".</p>
158      *
159      * @see <a HREF="http://relaxng.org/spec-20011203.html">RELAX NG Specification</a>
160      */

161     public static final String JavaDoc RELAXNG_NS_URI = "http://relaxng.org/ns/structure/1.0";
162     
163     /**
164      * <p>Feature for secure processing.</p>
165      *
166      * <ul>
167      * <li>
168      * <code>true</code> instructs the implementation to process XML securely.
169      * This may set limits on XML constructs to avoid conditions such as denial of service attacks.
170      * </li>
171      * <li>
172      * <code>false</code> instructs the implementation to process XML acording the letter of the XML specifications
173      * ingoring security issues such as limits on XML constructs to avoid conditions such as denial of service attacks.
174      * </li>
175      * </ul>
176      */

177     public static final String JavaDoc FEATURE_SECURE_PROCESSING = "http://javax.xml.XMLConstants/feature/secure-processing";
178 }
179
Popular Tags