001 // $Id: XMLConstants.java,v 1.1 2002/12/19 23:53:58 ryans Exp $
002
003 package javax.xml;
004
005 /**
006 * Utility class to contain basic XML values as constants.
007 *
008 * @author <a href="http://jcp.org/">JAXP Java Community Process</a>
009 * @author <a href="http://java.sun.com/">JAXP Reference Implementation</a>
010 * @version 1.0.proposed
011 * @see <a href="http://www.w3.org/TR/REC-xml">
012 * Extensible Markup Language (XML) 1.0 (Second Edition)</a>
013 * @see <a href="http://www.w3.org/TR/REC-xml-names">
014 * Namespaces in XML</a>
015 * @see <a href="http://www.w3.org/XML/xml-names-19990114-errata">
016 * Namespaces in XML Errata</a>
017 **/
018
019 public class XMLConstants {
020
021 /**
022 * Constructor to prevent instantiation.
023 */
024 private XMLConstants() { }
025
026 /**
027 * Prefix to use to represent the default XML Namespace.
028 *
029 * <p>Defined by the XML specification to be "".</p>
030 *
031 * @see <a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
032 * Namespaces in XML</a>
033 */
034 public static final String DEFAULT_NS_PREFIX = "";
035
036 /**
037 * The official XML Namespace prefix.
038 *
039 * <p>Defined by the XML specification to be "<code>xml</code>".</p>
040 *
041 * @see <a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
042 * Namespaces in XML</a>
043 */
044 public static final String XML_NS_PREFIX = "xml";
045
046 /**
047 * The official XML Namespace name URI.
048 *
049 * <p>Defined by the XML specification to be
050 * "<code>http://www.w3.org/XML/1998/namespace</code>".</p>
051 *
052 * @see <a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
053 * Namespaces in XML</a>
054 */
055 public static final String XML_NS_URI =
056 "http://www.w3.org/XML/1998/namespace";
057
058 /**
059 * The official XML attribute used for specifying XML Namespace
060 * declarations.
061 *
062 * <p>It is <strong>not</strong> valid to use as a prefix.
063 * Defined by the XML specification to be
064 * "<code>xmlns</code>".</p>
065 *
066 * @see <a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
067 * Namespaces in XML</a>
068 */
069 public static final String XMLNS_ATTRIBUTE = "xmlns";
070
071 /**
072 * The official XML attribute used for specifying XML Namespace
073 * declarations, {@link #XMLNS_ATTRIBUTE "xmlns"}, Namespace name
074 * URI.
075 *
076 * <p>Defined by the XML specification to be
077 * "<code>http://www.w3.org/2000/xmlns/</code>".</p>
078 *
079 * @see <a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
080 * Namespaces in XML</a>
081 * @see <a href="http://www.w3.org/XML/xml-names-19990114-errata/">
082 * Namespaces in XML Errata</a>
083 */
084 public static final String XMLNS_ATTRIBUTE_NS_URI =
085 "http://www.w3.org/2000/xmlns/";
086 }