Class NamespaceConstant


  • public class NamespaceConstant
    extends Object
    This class is not instantiated, it exists to hold a set of constants representing known namespaces. For each of these, there is a constant for the namespace URI and for many of them, there is a numeric constant used as the code for this namespace in the name pool.

    This class also defines constant URIs for some objects other than namespaces - for example, URIs that identify the various object models used in the JAXP XPath API, and the Unicode codepoint collation URI.

    • Field Detail

      • NULL

        public static final String NULL
        A URI representing the null namespace (actually, an empty string)
        See Also:
        Constant Field Values
      • XML

        public static final String XML
        Fixed namespace name for XML: "http://www.w3.org/XML/1998/namespace".
        See Also:
        Constant Field Values
      • XSLT

        public static final String XSLT
        Fixed namespace name for XSLT: "http://www.w3.org/1999/XSL/Transform"
        See Also:
        Constant Field Values
      • SAXON

        public static final String SAXON
        Current namespace name for SAXON (from 7.0 onwards): "http://saxon.sf.net/"
        See Also:
        Constant Field Values
      • SAXON_XSLT_EXPORT

        public static final String SAXON_XSLT_EXPORT
        Fixed namespace name for the export of a Saxon stylesheet package
        See Also:
        Constant Field Values
      • SCHEMA

        public static final String SCHEMA
        Namespace name for XML Schema: "http://www.w3.org/2001/XMLSchema"
        See Also:
        Constant Field Values
      • SCHEMA_INSTANCE

        public static final String SCHEMA_INSTANCE
        XML-schema-defined namespace for use in instance documents ("xsi")
        See Also:
        Constant Field Values
      • SCHEMA_VERSIONING

        public static final String SCHEMA_VERSIONING
        Namespace defined in XSD 1.1 for schema versioning
        See Also:
        Constant Field Values
      • SQL

        public static final String SQL
        Fixed namespace name for SAXON SQL extension: "http://saxon.sf.net/sql"
        See Also:
        Constant Field Values
      • EXSLT_COMMON

        public static final String EXSLT_COMMON
        Fixed namespace name for EXSLT/Common: "http://exslt.org/common"
        See Also:
        Constant Field Values
      • EXSLT_MATH

        public static final String EXSLT_MATH
        Fixed namespace name for EXSLT/math: "http://exslt.org/math"
        See Also:
        Constant Field Values
      • EXSLT_SETS

        public static final String EXSLT_SETS
        Fixed namespace name for EXSLT/sets: "http://exslt.org/sets"
        See Also:
        Constant Field Values
      • EXSLT_DATES_AND_TIMES

        public static final String EXSLT_DATES_AND_TIMES
        Fixed namespace name for EXSLT/date: "http://exslt.org/dates-and-times"
        See Also:
        Constant Field Values
      • EXSLT_RANDOM

        public static final String EXSLT_RANDOM
        Fixed namespace name for EXSLT/random: "http://exslt.org/random"
        See Also:
        Constant Field Values
      • MAP_FUNCTIONS

        public static final String MAP_FUNCTIONS
        Namespace URI for XPath 3.0 functions associated with maps
        See Also:
        Constant Field Values
      • ARRAY_FUNCTIONS

        public static final String ARRAY_FUNCTIONS
        Namespace URI for XPath 3.1 functions associated with arrays
        See Also:
        Constant Field Values
      • JAVA_TYPE

        public static final String JAVA_TYPE
        Namespace for types representing external Java objects
        See Also:
        Constant Field Values
      • DOT_NET_TYPE

        public static final String DOT_NET_TYPE
        Namespace for types representing external .NET objects
        See Also:
        Constant Field Values
      • ANONYMOUS

        public static final String ANONYMOUS
        Namespace for names allocated to anonymous types. This exists so that a name fingerprint can be allocated for use as a type annotation.
        See Also:
        Constant Field Values
      • SCM

        public static final String SCM
        Namespace for the Saxon serialization of the schema component model
        See Also:
        Constant Field Values
      • OBJECT_MODEL_SAXON

        public static final String OBJECT_MODEL_SAXON
        URI identifying the Saxon object model for use in the JAXP 1.3 XPath API
        See Also:
        Constant Field Values
      • OBJECT_MODEL_XOM

        public static final String OBJECT_MODEL_XOM
        URI identifying the XOM object model for use in the JAXP 1.3 XPath API
        See Also:
        Constant Field Values
      • OBJECT_MODEL_JDOM

        public static final String OBJECT_MODEL_JDOM
        URI identifying the JDOM object model for use in the JAXP 1.3 XPath API
        See Also:
        Constant Field Values
      • OBJECT_MODEL_AXIOM

        public static final String OBJECT_MODEL_AXIOM
        URI identifying the AXIOM object model for use in the JAXP 1.3 XPath API
        See Also:
        Constant Field Values
      • OBJECT_MODEL_DOM4J

        public static final String OBJECT_MODEL_DOM4J
        URI identifying the DOM4J object model for use in the JAXP 1.3 XPath API
        See Also:
        Constant Field Values
      • OBJECT_MODEL_DOT_NET_DOM

        public static final String OBJECT_MODEL_DOT_NET_DOM
        URI identifying the .NET DOM object model (not used, but needed for consistency)
        See Also:
        Constant Field Values
      • OBJECT_MODEL_DOMINO

        public static final String OBJECT_MODEL_DOMINO
        URI identifying the DOMINO object model (not used, but needed for consistency)
        See Also:
        Constant Field Values
      • CODEPOINT_COLLATION_URI

        public static final String CODEPOINT_COLLATION_URI
        URI identifying the Unicode codepoint collation
        See Also:
        Constant Field Values
      • HTML5_CASE_BLIND_COLLATION_URI

        public static final String HTML5_CASE_BLIND_COLLATION_URI
        URI identifying the HTML5 ascii-case-blind collation
        See Also:
        Constant Field Values
      • SAXON_GENERATED_VARIABLE

        public static final String SAXON_GENERATED_VARIABLE
        URI for the names of generated variables
        See Also:
        Constant Field Values
      • SAXON_CONFIGURATION

        public static final String SAXON_CONFIGURATION
        URI for the Saxon configuration file
        See Also:
        Constant Field Values
    • Method Detail

      • getConventionalPrefix

        public static String getConventionalPrefix​(String uri)
        Get the conventional prefix for a common namespace
        Parameters:
        uri - the namespace URI
        Returns:
        the conventional prefix for this URI if there is one, or null otherwise
      • getUriForConventionalPrefix

        public static String getUriForConventionalPrefix​(String prefix)
        Get the URI associated with a commonly-used conventional prefix
        Parameters:
        prefix - the namespace prefix
        Returns:
        the namespace URI associated with this conventional prefix
      • isReserved

        public static boolean isReserved​(String uri)
        Determine whether a namespace is a reserved namespace
        Parameters:
        uri - the namespace URI to be tested
        Returns:
        true if this namespace URI is a reserved namespace
      • isReservedInQuery31

        public static boolean isReservedInQuery31​(String uri)
        Determine whether a namespace is a reserved namespace in XQuery
        Parameters:
        uri - the namespace URI to be tested
        Returns:
        true if this namespace URI is reserved in XQuery 3.1
      • findSimilarNamespace

        public static String findSimilarNamespace​(String candidate)
        Find a similar namespace to one that is a possible mis-spelling
        Parameters:
        candidate - the possibly mis-spelt namespace
        Returns:
        the correct spelling of the namespace