net.sf.saxon.om
Class NamespaceConstant

java.lang.Object
  extended by net.sf.saxon.om.NamespaceConstant

public class NamespaceConstant
extends java.lang.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
static java.lang.String ANONYMOUS
          Namespace for names allocated to anonymous types.
static java.lang.String CODEPOINT_COLLATION_URI
          URI identifying the Unicode codepoint collation
static java.lang.String DOT_NET_TYPE
          Namespace for types representing external .NET objects
static java.lang.String ERR
          The standard namespace for system error codes
static java.lang.String EXSLT_COMMON
          Fixed namespace name for EXSLT/Common: "http://exslt.org/common"
static java.lang.String EXSLT_DATES_AND_TIMES
          Fixed namespace name for EXSLT/date: "http://exslt.org/dates-and-times"
static java.lang.String EXSLT_MATH
          Fixed namespace name for EXSLT/math: "http://exslt.org/math"
static java.lang.String EXSLT_RANDOM
          Fixed namespace name for EXSLT/random: "http://exslt.org/random"
static java.lang.String EXSLT_SETS
          Fixed namespace name for EXSLT/sets: "http://exslt.org/sets"
static java.lang.String FN
          The standard namespace for functions and operators
static java.lang.String JAVA_TYPE
          Namespace for types representing external Java objects
static java.lang.String LOCAL
          Predefined XQuery namespace for local functions
static java.lang.String MICROSOFT_XSL
          Recognize the Microsoft namespace so we can give a suitably sarcastic error message
static java.lang.String NULL
          A URI representing the null namespace (actually, an empty string)
static short NULL_CODE
          The numeric URI code representing the null namespace (actually, zero)
static int NULL_NAMESPACE_CODE
          The namespace code for the null namespace
static java.lang.String OBJECT_MODEL_DOM4J
          URI identifying the DOM4J object model for use in the JAXP 1.3 XPath API
static java.lang.String OBJECT_MODEL_DOT_NET_DOM
          URI identifying the .NET DOM object model (not used, but needed for consistency)
static java.lang.String OBJECT_MODEL_JDOM
          URI identifying the JDOM object model for use in the JAXP 1.3 XPath API
static java.lang.String OBJECT_MODEL_SAXON
          URI identifying the Saxon object model for use in the JAXP 1.3 XPath API
static java.lang.String OBJECT_MODEL_XOM
          URI identifying the XOM object model for use in the JAXP 1.3 XPath API
static java.lang.String SAXON
          Fixed namespace name for SAXON: "http://saxon.sf.net/"
static short SAXON_CODE
          Numeric code representing the SAXON namespace
static java.lang.String SCHEMA
          Namespace name for XML Schema: "http://www.w3.org/2001/XMLSchema"
static short SCHEMA_CODE
          Numeric code representing the schema namespace
static java.lang.String SCHEMA_INSTANCE
          XML-schema-defined namespace for use in instance documents ("xsi")
static java.lang.String SCM
          Namespace for the Saxon serialization of the schema component model
static java.lang.String XHTML
          The XHTML namespace http://www.w3.org/1999/xhtml
static java.lang.String XML
          Fixed namespace name for XML: "http://www.w3.org/XML/1998/namespace".
static short XML_CODE
          Numeric code representing the XML namespace
static int XML_NAMESPACE_CODE
          The namespace code for the XML namespace
static java.lang.String XMLNS
          The XMLNS namespace (used in DOM)
static short XSI_CODE
           
static java.lang.String XSLT
          Fixed namespace name for XSLT: "http://www.w3.org/1999/XSL/Transform"
static short XSLT_CODE
          Numeric code representing the XSLT namespace
 
Method Summary
static java.lang.String findSimilarNamespace(java.lang.String candidate)
          Find a similar namespace to one that is a possible mis-spelling
static boolean isReserved(java.lang.String uri)
          Determine whether a namespace is a reserved namespace
static boolean isReservedInQuery(java.lang.String uri)
          Determine whether a namespace is a reserved namespace
static boolean isSpecialURICode(short uriCode)
          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 Detail

NULL

public static final java.lang.String NULL
A URI representing the null namespace (actually, an empty string)

See Also:
Constant Field Values

NULL_CODE

public static final short NULL_CODE
The numeric URI code representing the null namespace (actually, zero)

See Also:
Constant Field Values

NULL_NAMESPACE_CODE

public static final int NULL_NAMESPACE_CODE
The namespace code for the null namespace

See Also:
Constant Field Values

XML

public static final java.lang.String XML
Fixed namespace name for XML: "http://www.w3.org/XML/1998/namespace".

See Also:
Constant Field Values

XML_CODE

public static final short XML_CODE
Numeric code representing the XML namespace

See Also:
Constant Field Values

XML_NAMESPACE_CODE

public static final int XML_NAMESPACE_CODE
The namespace code for the XML namespace

See Also:
Constant Field Values

XSLT

public static final java.lang.String XSLT
Fixed namespace name for XSLT: "http://www.w3.org/1999/XSL/Transform"

See Also:
Constant Field Values

XSLT_CODE

public static final short XSLT_CODE
Numeric code representing the XSLT namespace

See Also:
Constant Field Values

SAXON

public static final java.lang.String SAXON
Fixed namespace name for SAXON: "http://saxon.sf.net/"

See Also:
Constant Field Values

SAXON_CODE

public static final short SAXON_CODE
Numeric code representing the SAXON namespace

See Also:
Constant Field Values

SCHEMA

public static final java.lang.String SCHEMA
Namespace name for XML Schema: "http://www.w3.org/2001/XMLSchema"

See Also:
Constant Field Values

SCHEMA_CODE

public static final short SCHEMA_CODE
Numeric code representing the schema namespace

See Also:
Constant Field Values

SCHEMA_INSTANCE

public static final java.lang.String SCHEMA_INSTANCE
XML-schema-defined namespace for use in instance documents ("xsi")

See Also:
Constant Field Values

XSI_CODE

public static final short XSI_CODE
See Also:
Constant Field Values

EXSLT_COMMON

public static final java.lang.String EXSLT_COMMON
Fixed namespace name for EXSLT/Common: "http://exslt.org/common"

See Also:
Constant Field Values

EXSLT_MATH

public static final java.lang.String EXSLT_MATH
Fixed namespace name for EXSLT/math: "http://exslt.org/math"

See Also:
Constant Field Values

EXSLT_SETS

public static final java.lang.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 java.lang.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 java.lang.String EXSLT_RANDOM
Fixed namespace name for EXSLT/random: "http://exslt.org/random"

See Also:
Constant Field Values

FN

public static final java.lang.String FN
The standard namespace for functions and operators

See Also:
Constant Field Values

ERR

public static final java.lang.String ERR
The standard namespace for system error codes

See Also:
Constant Field Values

LOCAL

public static final java.lang.String LOCAL
Predefined XQuery namespace for local functions

See Also:
Constant Field Values

MICROSOFT_XSL

public static final java.lang.String MICROSOFT_XSL
Recognize the Microsoft namespace so we can give a suitably sarcastic error message

See Also:
Constant Field Values

XHTML

public static final java.lang.String XHTML
The XHTML namespace http://www.w3.org/1999/xhtml

See Also:
Constant Field Values

XMLNS

public static final java.lang.String XMLNS
The XMLNS namespace (used in DOM)

See Also:
Constant Field Values

JAVA_TYPE

public static final java.lang.String JAVA_TYPE
Namespace for types representing external Java objects

See Also:
Constant Field Values

DOT_NET_TYPE

public static final java.lang.String DOT_NET_TYPE
Namespace for types representing external .NET objects

See Also:
Constant Field Values

ANONYMOUS

public static final java.lang.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 java.lang.String SCM
Namespace for the Saxon serialization of the schema component model

See Also:
Constant Field Values

OBJECT_MODEL_SAXON

public static final java.lang.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 java.lang.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 java.lang.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_DOM4J

public static final java.lang.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 java.lang.String OBJECT_MODEL_DOT_NET_DOM
URI identifying the .NET DOM object model (not used, but needed for consistency)

See Also:
Constant Field Values

CODEPOINT_COLLATION_URI

public static final java.lang.String CODEPOINT_COLLATION_URI
URI identifying the Unicode codepoint collation

See Also:
Constant Field Values
Method Detail

isReserved

public static final boolean isReserved(java.lang.String uri)
Determine whether a namespace is a reserved namespace


isSpecialURICode

public static final boolean isSpecialURICode(short uriCode)
Determine whether a namespace is a reserved namespace


isReservedInQuery

public static final boolean isReservedInQuery(java.lang.String uri)
Determine whether a namespace is a reserved namespace


findSimilarNamespace

public static java.lang.String findSimilarNamespace(java.lang.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


Copyright (c) Saxonica Limited. All rights reserved.