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

Save This Page
Home » openjdk-7 » javax » xml » [javadoc | source]