Source Home >> Java Source 1.6.0 >> javax.xml.XMLConstants V 0.09
  • 001/*
  • 002 * The contents of this file are subject to the terms
  • 003 * of the Common Development and Distribution License
  • 004 * (the "License"). You may not use this file except
  • 005 * in compliance with the License.
  • 006 *
  • 007 * You can obtain a copy of the license at
  • 008 * https://jaxp.dev.java.net/CDDLv1.0.html.
  • 009 * See the License for the specific language governing
  • 010 * permissions and limitations under the License.
  • 011 *
  • 012 * When distributing Covered Code, include this CDDL
  • 013 * HEADER in each file and include the License file at
  • 014 * https://jaxp.dev.java.net/CDDLv1.0.html
  • 015 * If applicable add the following below this CDDL HEADER
  • 016 * with the fields enclosed by brackets "[]" replaced with
  • 017 * your own identifying information: Portions Copyright
  • 018 * [year] [name of copyright owner]
  • 019 */
  • 020
  • 021/*
  • 022 * $Id: XMLEntityReader.java,v 1.3 2005/11/03 17:02:21 jeffsuttor Exp $
  • 023 * @(#)XMLConstants.java 1.15 05/11/17
  • 024 *
  • 025 * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
  • 026 */
  • 027
  • 028package javax.xml;
  • 029
  • 030/**
  • 031 * <p>Utility class to contain basic XML values as constants.</p>
  • 032 *
  • 033 * @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
  • 034 * @version $Revision: 1.2 $, $Date: 2005/06/10 03:50:26 $
  • 035 * @see <a href="http://www.w3.org/TR/xml11/">Extensible Markup Language (XML) 1.1</a>
  • 036 * @see <a href="http://www.w3.org/TR/REC-xml">Extensible Markup Language (XML) 1.0 (Second Edition)</a>
  • 037 * @see <a href="http://www.w3.org/XML/xml-V10-2e-errata">XML 1.0 Second Edition Specification Errata</a>
  • 038 * @see <a href="http://www.w3.org/TR/xml-names11/">Namespaces in XML 1.1</a>
  • 039 * @see <a href="http://www.w3.org/TR/REC-xml-names">Namespaces in XML</a>
  • 040 * @see <a href="http://www.w3.org/XML/xml-names-19990114-errata">Namespaces in XML Errata</a>
  • 041 * @see <a href="http://www.w3.org/TR/xmlschema-1/">XML Schema Part 1: Structures</a>
  • 042 * @since 1.5
  • 043 **/
  • 044
  • 045public final class XMLConstants {
  • 046
  • 047 /**
  • 048 * <p>Private constructor to prevent instantiation.</p>
  • 049 */
  • 050 private XMLConstants() {
  • 051 }
  • 052
  • 053 /**
  • 054 * <p>Namespace URI to use to represent that there is no Namespace.</p>
  • 055 *
  • 056 * <p>Defined by the Namespace specification to be "".</p>
  • 057 *
  • 058 * @see <a href="http://www.w3.org/TR/REC-xml-names/#defaulting">
  • 059 * Namespaces in XML, 5.2 Namespace Defaulting</a>
  • 060 */
  • 061 public static final String NULL_NS_URI = "";
  • 062
  • 063 /**
  • 064 * <p>Prefix to use to represent the default XML Namespace.</p>
  • 065 *
  • 066 * <p>Defined by the XML specification to be "".</p>
  • 067 *
  • 068 * @see <a
  • 069 * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
  • 070 * Namespaces in XML, 3. Qualified Names</a>
  • 071 */
  • 072 public static final String DEFAULT_NS_PREFIX = "";
  • 073
  • 074 /**
  • 075 * <p>The official XML Namespace name URI.</p>
  • 076 *
  • 077 * <p>Defined by the XML specification to be
  • 078 * "<code>http://www.w3.org/XML/1998/namespace</code>".</p>
  • 079 *
  • 080 * @see <a
  • 081 * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
  • 082 * Namespaces in XML, 3. Qualified Names</a>
  • 083 */
  • 084 public static final String XML_NS_URI =
  • 085 "http://www.w3.org/XML/1998/namespace";
  • 086
  • 087 /**
  • 088 * <p>The official XML Namespace prefix.</p>
  • 089 *
  • 090 * <p>Defined by the XML specification to be "<code>xml</code>".</p>
  • 091 *
  • 092 * @see <a
  • 093 * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
  • 094 * Namespaces in XML, 3. Qualified Names<</a>
  • 095 */
  • 096 public static final String XML_NS_PREFIX = "xml";
  • 097
  • 098 /**
  • 099 * <p>The official XML attribute used for specifying XML Namespace
  • 100 * declarations, {@link #XMLNS_ATTRIBUTE
  • 101 * XMLConstants.XMLNS_ATTRIBUTE}, Namespace name URI.</p>
  • 102 *
  • 103 * <p>Defined by the XML specification to be
  • 104 * "<code>http://www.w3.org/2000/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 * @see <a
  • 110 * href="http://www.w3.org/XML/xml-names-19990114-errata/">
  • 111 * Namespaces in XML Errata</a>
  • 112 */
  • 113 public static final String XMLNS_ATTRIBUTE_NS_URI =
  • 114 "http://www.w3.org/2000/xmlns/";
  • 115
  • 116 /**
  • 117 * <p>The official XML attribute used for specifying XML Namespace
  • 118 * declarations.</p>
  • 119 *
  • 120 * <p>It is <strong><em>NOT</em></strong> valid to use as a
  • 121 * prefix. Defined by the XML specification to be
  • 122 * "<code>xmlns</code>".</p>
  • 123 *
  • 124 * @see <a
  • 125 * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
  • 126 * Namespaces in XML, 3. Qualified Names</a>
  • 127 */
  • 128 public static final String XMLNS_ATTRIBUTE = "xmlns";
  • 129
  • 130 /**
  • 131 * <p>W3C XML Schema Namespace URI.</p>
  • 132 *
  • 133 * <p>Defined to be "<code>http://www.w3.org/2001/XMLSchema</code>".
  • 134 *
  • 135 * @see <a href=
  • 136 * "http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions">
  • 137 * XML Schema Part 1:
  • 138 * Structures, 2.6 Schema-Related Markup in Documents Being Validated</a>
  • 139 */
  • 140 public static final String W3C_XML_SCHEMA_NS_URI =
  • 141 "http://www.w3.org/2001/XMLSchema";
  • 142
  • 143 /**
  • 144 * <p>W3C XML Schema Instance Namespace URI.</p>
  • 145 *
  • 146 * <p>Defined to be "<code>http://www.w3.org/2001/XMLSchema-instance</code>".</p>
  • 147 *
  • 148 * @see <a href=
  • 149 * "http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions">
  • 150 * XML Schema Part 1:
  • 151 * Structures, 2.6 Schema-Related Markup in Documents Being Validated</a>
  • 152 */
  • 153 public static final String W3C_XML_SCHEMA_INSTANCE_NS_URI =
  • 154 "http://www.w3.org/2001/XMLSchema-instance";
  • 155
  • 156 /**
  • 157 * <p>W3C XPath Datatype Namespace URI.</p>
  • 158 *
  • 159 * <p>Defined to be "<code>http://www.w3.org/2003/11/xpath-datatypes</code>".</p>
  • 160 *
  • 161 * @see <a href="http://www.w3.org/TR/xpath-datamodel">XQuery 1.0 and XPath 2.0 Data Model</a>
  • 162 */
  • 163 public static final String W3C_XPATH_DATATYPE_NS_URI = "http://www.w3.org/2003/11/xpath-datatypes";
  • 164
  • 165 /**
  • 166 * <p>XML Document Type Declaration Namespace URI as an arbitrary value.</p>
  • 167 *
  • 168 * <p>Since not formally defined by any existing standard, arbitrarily define to be "<code>http://www.w3.org/TR/REC-xml</code>".
  • 169 */
  • 170 public static final String XML_DTD_NS_URI = "http://www.w3.org/TR/REC-xml";
  • 171
  • 172 /**
  • 173 * <p>RELAX NG Namespace URI.</p>
  • 174 *
  • 175 * <p>Defined to be "<code>http://relaxng.org/ns/structure/1.0</code>".</p>
  • 176 *
  • 177 * @see <a href="http://relaxng.org/spec-20011203.html">RELAX NG Specification</a>
  • 178 */
  • 179 public static final String RELAXNG_NS_URI = "http://relaxng.org/ns/structure/1.0";
  • 180
  • 181 /**
  • 182 * <p>Feature for secure processing.</p>
  • 183 *
  • 184 * <ul>
  • 185 * <li>
  • 186 * <code>true</code> instructs the implementation to process XML securely.
  • 187 * This may set limits on XML constructs to avoid conditions such as denial of service attacks.
  • 188 * </li>
  • 189 * <li>
  • 190 * <code>false</code> instructs the implementation to process XML acording the letter of the XML specifications
  • 191 * ingoring security issues such as limits on XML constructs to avoid conditions such as denial of service attacks.
  • 192 * </li>
  • 193 * </ul>
  • 194 */
  • 195 public static final String FEATURE_SECURE_PROCESSING = "http://javax.xml.XMLConstants/feature/secure-processing";
  • 196}

文件:XMLConstants.java
包名:javax.xml
类名:XMLConstants
继承:
接口: