Class NamespaceConstant

java.lang.Object
net.sf.saxon.lib.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.

Author:
Michael H. Kay
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Namespace for names allocated to anonymous types.
    static final String
    URI identifying the Unicode codepoint collation
    static final String
    Namespace for types representing external .NET objects
    static final String
    The standard namespace for system error codes
    static final String
    Fixed namespace name for EXSLT/Common: "http://exslt.org/common"
    static final String
    Fixed namespace name for EXSLT/date: "http://exslt.org/dates-and-times"
    static final String
    Fixed namespace name for EXSLT/math: "http://exslt.org/math"
    static final String
    Fixed namespace name for EXSLT/random: "http://exslt.org/random"
    static final String
    Fixed namespace name for EXSLT/sets: "http://exslt.org/sets"
    static final String
    The standard namespace for functions and operators
    static final String
    Namespace for types representing external Java objects
    static final String
    Predefined XQuery namespace for local functions
    static final String
    Namespace URI for XPath 3.0 functions associated with maps
    static final String
    Math namespace for the XPath 3.0 math functions
    static final String
    Recognize the Microsoft namespace so we can give a suitably sarcastic error message
    static final String
    A URI representing the null namespace (actually, an empty string)
    static final short
    The numeric URI code representing the null namespace (actually, zero)
    static final String
    URI identifying the DOM4J object model for use in the JAXP 1.3 XPath API
    static final String
    URI identifying the .NET DOM object model (not used, but needed for consistency)
    static final String
    URI identifying the JDOM object model for use in the JAXP 1.3 XPath API
    static final String
    URI identifying the Saxon object model for use in the JAXP 1.3 XPath API
    static final String
    URI identifying the XOM object model for use in the JAXP 1.3 XPath API
    static final String
    Fixed namespace name for SAXON: "http://saxon.sf.net/"
    static final short
    Numeric code representing the SAXON namespace
    static final String
    URI for the Saxon configuration file
    static final String
    URI for the names of generated global variables
    static final String
    Namespace name for XML Schema: "http://www.w3.org/2001/XMLSchema"
    static final short
    Numeric code representing the schema namespace
    static final String
    XML-schema-defined namespace for use in instance documents ("xsi")
    static final String
    Namespace defined in XSD 1.1 for schema versioning
    static final String
    Namespace for the Saxon serialization of the schema component model
    static final String
    Fixed namespace name for SAXON SQL extension: "http://saxon.sf.net/sql"
    static final String
    The XHTML namespace http://www.w3.org/1999/xhtml
    static final String
    Fixed namespace name for XML: "http://www.w3.org/XML/1998/namespace".
    static final short
    Numeric code representing the XML namespace
    static final String
    The XMLNS namespace (used in DOM)
    static final short
     
    static final String
    Fixed namespace name for XSLT: "http://www.w3.org/1999/XSL/Transform"
    static final short
    Numeric code representing the XSLT namespace
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    Find a similar namespace to one that is a possible mis-spelling
    static boolean
    Determine whether a namespace is a reserved namespace
    static boolean
    Determine whether a namespace is a reserved namespace

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NULL

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

      public static final short NULL_CODE
      The numeric URI code representing the null namespace (actually, zero)
      See Also:
    • XML

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

      public static final short XML_CODE
      Numeric code representing the XML namespace
      See Also:
    • XSLT

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

      public static final short XSLT_CODE
      Numeric code representing the XSLT namespace
      See Also:
    • SAXON

      public static final String SAXON
      Fixed namespace name for SAXON: "http://saxon.sf.net/"
      See Also:
    • SAXON_CODE

      public static final short SAXON_CODE
      Numeric code representing the SAXON namespace
      See Also:
    • SCHEMA

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

      public static final short SCHEMA_CODE
      Numeric code representing the schema namespace
      See Also:
    • SCHEMA_INSTANCE

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

      public static final short XSI_CODE
      See Also:
    • SCHEMA_VERSIONING

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

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

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

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

      public static final String EXSLT_SETS
      Fixed namespace name for EXSLT/sets: "http://exslt.org/sets"
      See Also:
    • 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:
    • EXSLT_RANDOM

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

      public static final String FN
      The standard namespace for functions and operators
      See Also:
    • ERR

      public static final String ERR
      The standard namespace for system error codes
      See Also:
    • LOCAL

      public static final String LOCAL
      Predefined XQuery namespace for local functions
      See Also:
    • MATH

      public static final String MATH
      Math namespace for the XPath 3.0 math functions
      See Also:
    • MAP_FUNCTIONS

      public static final String MAP_FUNCTIONS
      Namespace URI for XPath 3.0 functions associated with maps
      See Also:
    • MICROSOFT_XSL

      public static final String MICROSOFT_XSL
      Recognize the Microsoft namespace so we can give a suitably sarcastic error message
      See Also:
    • XHTML

      public static final String XHTML
      The XHTML namespace http://www.w3.org/1999/xhtml
      See Also:
    • XMLNS

      public static final String XMLNS
      The XMLNS namespace (used in DOM)
      See Also:
    • JAVA_TYPE

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

      public static final String DOT_NET_TYPE
      Namespace for types representing external .NET objects
      See Also:
    • 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:
    • SCM

      public static final String SCM
      Namespace for the Saxon serialization of the schema component model
      See Also:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • CODEPOINT_COLLATION_URI

      public static final String CODEPOINT_COLLATION_URI
      URI identifying the Unicode codepoint collation
      See Also:
    • SAXON_GENERATED_GLOBAL

      public static final String SAXON_GENERATED_GLOBAL
      URI for the names of generated global variables
      See Also:
    • SAXON_CONFIGURATION

      public static final String SAXON_CONFIGURATION
      URI for the Saxon configuration file
      See Also:
  • Method Details

    • 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
    • isReservedInQuery

      public static boolean isReservedInQuery(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 reserved in XQuery
    • 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