Package org.eclipse.wst.xml.xpath2.api


org.eclipse.wst.xml.xpath2.api
Class StaticContext



public class StaticContext
extends 
interface to static context


Method Summary

public java.net.URIgetBaseUri()
     [Definition: Base URI. This is an absolute URI, used when necessary in the resolution of relative URIs (for example, by the fn:resolve-uri function.)] The URI value is whitespace normalized according to the rules for the xs:anyURI type in [XML Schema].
public org.eclipse.wst.xml.xpath2.api.CollationProvidergetCollationProvider()
     [Definition: Statically known collations. This is an implementation-defined set of (URI, collation) pairs. It defines the names of the collations that are available for use in processing expressions.]
public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinitiongetCollectionType(java.lang.String collectionName)
     [Definition: Statically known collections. This is a mapping from strings onto types. The string represents the absolute URI of a resource that is potentially available using the fn:collection function. The type is the type of the sequence of nodes that would result from calling the fn:collection function with this URI as its argument.] If the argument to fn:collection is a string literal that is not present in statically known collections, then the static type of fn:collection is node()*. Note: The purpose of the statically known collections is to provide static type information, not to determine which collections are available. A URI need not be found in the statically known collections to be accessed using fn:collection.
public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinitiongetDefaultCollectionType()
     [Definition: Statically known default collection type. This is the type of the sequence of nodes that would result from calling the fn:collection function with no arguments.] Unless initialized to some other value by an implementation, the value of statically known default collection type is node()*.
public java.lang.StringgetDefaultFunctionNamespace()
     Definition: Default function namespace. This is a namespace URI or "none". The namespace URI, if present, is used for any unprefixed QName appearing in a position where a function name is expected.] The URI value is whitespace normalized according to the rules for the xs:anyURI type in [XML Schema].
public java.lang.StringgetDefaultNamespace()
     [Definition: Default element/type namespace. This is a namespace URI or "none". The namespace URI, if present, is used for any unprefixed QName appearing in a position where an element or type name is expected.] The URI value is whitespace normalized according to the rules for the xs:anyURI type in [XML Schema].
public org.eclipse.wst.xml.xpath2.api.typesystem.ItemTypegetDocumentType(java.net.URI documentUri)
     [Definition: Statically known documents. This is a mapping from strings onto types. The string represents the absolute URI of a resource that is potentially available using the fn:doc function. The type is the static type of a call to fn:doc with the given URI as its literal argument. ] If the argument to fn:doc is a string literal that is not present in statically known documents, then the static type of fn:doc is document-node()?. Note: The purpose of the statically known documents is to provide static type information, not to determine which documents are available. A URI need not be found in the statically known documents to be accessed using fn:doc.
public java.util.MapgetFunctionLibraries()
     [Definition: Function signatures. This component defines the set of functions that are available to be called from within an expression. Each function is uniquely identified by its expanded QName and its arity (number of parameters).] In addition to the name and arity, each function signature specifies the static types of the function parameters and result. The function signatures include the signatures of constructor functions, which are discussed in 3.10.4 Constructor Functions.
public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinitiongetInitialContextType()
     [Definition: Context item static type. This component defines the static type of the context item within the scope of a given expression.]
public org.eclipse.wst.xml.xpath2.api.StaticVariableResolvergetInScopeVariables()
     [Definition: In-scope variables. This is a set of (expanded QName, type) pairs. It defines the set of variables that are available for reference within an expression. The expanded QName is the name of the variable, and the type is the static type of the variable.] An expression that binds a variable (such as a for, some, or every expression) extends the in-scope variables of its subexpressions with the new bound variable and its type.
public javax.xml.namespace.NamespaceContextgetNamespaceContext()
     [Definition: Statically known namespaces. This is a set of (prefix, URI) pairs that define all the namespaces that are known during static processing of a given expression.] The URI value is whitespace normalized according to the rules for the xs:anyURI type in [XML Schema]. Note the difference between in-scope namespaces, which is a dynamic property of an element node, and statically known namespaces, which is a static property of an expression.
public org.eclipse.wst.xml.xpath2.api.typesystem.TypeModelgetTypeModel()
     [Definition: In-scope schema definitions. This is a generic term for all the element declarations, attribute declarations, and schema type definitions that are in scope during processing of an expression.]
public booleanisXPath1Compatible()
     XPath 1.0 compatibility mode.
public org.eclipse.wst.xml.xpath2.api.FunctionresolveFunction(javax.xml.namespace.QName name , int arity)
     is the function declared/available in the source context?

Methods Detail

getBaseUri

public java.net.URI getBaseUri()

[Definition: Base URI. This is an absolute URI, used when necessary in the resolution of relative URIs (for example, by the fn:resolve-uri function.)] The URI value is whitespace normalized according to the rules for the xs:anyURI type in [XML Schema].

Returns

java.net.URI


getCollationProvider

public org.eclipse.wst.xml.xpath2.api.CollationProvider getCollationProvider()

[Definition: Statically known collations. This is an implementation-defined set of (URI, collation) pairs. It defines the names of the collations that are available for use in processing expressions.]

Returns

org.eclipse.wst.xml.xpath2.api.CollationProvider


getCollectionType

public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition getCollectionType(java.lang.String collectionName)

[Definition: Statically known collections. This is a mapping from strings onto types. The string represents the absolute URI of a resource that is potentially available using the fn:collection function. The type is the type of the sequence of nodes that would result from calling the fn:collection function with this URI as its argument.] If the argument to fn:collection is a string literal that is not present in statically known collections, then the static type of fn:collection is node()*. Note: The purpose of the statically known collections is to provide static type information, not to determine which collections are available. A URI need not be found in the statically known collections to be accessed using fn:collection.

Parameters

collectionName

Returns

org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition


getDefaultCollectionType

public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition getDefaultCollectionType()

[Definition: Statically known default collection type. This is the type of the sequence of nodes that would result from calling the fn:collection function with no arguments.] Unless initialized to some other value by an implementation, the value of statically known default collection type is node()*.

Returns

org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition


getDefaultFunctionNamespace

public java.lang.String getDefaultFunctionNamespace()

Definition: Default function namespace. This is a namespace URI or "none". The namespace URI, if present, is used for any unprefixed QName appearing in a position where a function name is expected.] The URI value is whitespace normalized according to the rules for the xs:anyURI type in [XML Schema].

Returns

java.lang.String - The default function namespace


getDefaultNamespace

public java.lang.String getDefaultNamespace()

[Definition: Default element/type namespace. This is a namespace URI or "none". The namespace URI, if present, is used for any unprefixed QName appearing in a position where an element or type name is expected.] The URI value is whitespace normalized according to the rules for the xs:anyURI type in [XML Schema].

Returns

java.lang.String


getDocumentType

public org.eclipse.wst.xml.xpath2.api.typesystem.ItemType getDocumentType(java.net.URI documentUri)

[Definition: Statically known documents. This is a mapping from strings onto types. The string represents the absolute URI of a resource that is potentially available using the fn:doc function. The type is the static type of a call to fn:doc with the given URI as its literal argument. ] If the argument to fn:doc is a string literal that is not present in statically known documents, then the static type of fn:doc is document-node()?. Note: The purpose of the statically known documents is to provide static type information, not to determine which documents are available. A URI need not be found in the statically known documents to be accessed using fn:doc.

Parameters

documentUri

Returns

org.eclipse.wst.xml.xpath2.api.typesystem.ItemType


getFunctionLibraries

public java.util.Map getFunctionLibraries()

[Definition: Function signatures. This component defines the set of functions that are available to be called from within an expression. Each function is uniquely identified by its expanded QName and its arity (number of parameters).] In addition to the name and arity, each function signature specifies the static types of the function parameters and result. The function signatures include the signatures of constructor functions, which are discussed in 3.10.4 Constructor Functions.

Returns

java.util.Map


getInitialContextType

public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition getInitialContextType()

[Definition: Context item static type. This component defines the static type of the context item within the scope of a given expression.]

Returns

org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition


getInScopeVariables

public org.eclipse.wst.xml.xpath2.api.StaticVariableResolver getInScopeVariables()

[Definition: In-scope variables. This is a set of (expanded QName, type) pairs. It defines the set of variables that are available for reference within an expression. The expanded QName is the name of the variable, and the type is the static type of the variable.] An expression that binds a variable (such as a for, some, or every expression) extends the in-scope variables of its subexpressions with the new bound variable and its type.

Returns

org.eclipse.wst.xml.xpath2.api.StaticVariableResolver


getNamespaceContext

public javax.xml.namespace.NamespaceContext getNamespaceContext()

[Definition: Statically known namespaces. This is a set of (prefix, URI) pairs that define all the namespaces that are known during static processing of a given expression.] The URI value is whitespace normalized according to the rules for the xs:anyURI type in [XML Schema]. Note the difference between in-scope namespaces, which is a dynamic property of an element node, and statically known namespaces, which is a static property of an expression.

Returns

javax.xml.namespace.NamespaceContext - The statically known namespace context


getTypeModel

public org.eclipse.wst.xml.xpath2.api.typesystem.TypeModel getTypeModel()

[Definition: In-scope schema definitions. This is a generic term for all the element declarations, attribute declarations, and schema type definitions that are in scope during processing of an expression.]

Returns

org.eclipse.wst.xml.xpath2.api.typesystem.TypeModel - A type model which covers the


isXPath1Compatible

public boolean isXPath1Compatible()

XPath 1.0 compatibility mode.

Returns

boolean - true if rules for backward compatibility with XPath Version 1.0 are in effect; otherwise false.


resolveFunction

public org.eclipse.wst.xml.xpath2.api.Function resolveFunction(javax.xml.namespace.QName name , int arity)

is the function declared/available in the source context?

Parameters

name - is the qname name

arity - integer of qname

Returns

org.eclipse.wst.xml.xpath2.api.Function - boolean