|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ucl.xpath.DefaultStaticContext
Default implementation of a static context as described by the XPath 2.0 specification.
Constructor Summary | |
DefaultStaticContext()
Constructor for schema-less documents. |
|
DefaultStaticContext(org.apache.xerces.xs.XSModel schema)
Constructor. |
Method Summary | |
void |
add_function_library(FunctionLibrary fl)
Adds a function to the library. |
void |
add_namespace(java.lang.String prefix,
java.lang.String namespace)
adds namespace |
void |
add_variable(QName var)
Adds a variable to current scope. |
boolean |
attribute_declared(QName attr)
Checks if an attribute is in the in-scope schema definitions. |
org.apache.xerces.xs.XSTypeDefinition |
attribute_type_definition(QName elem)
Retrieves type definition of the attribute in an element. |
XSAnyURI |
base_uri()
return the base URI |
void |
debug_print_vars()
Debug function which will print current variable scopes and info. |
java.lang.String |
default_function_namespace()
Retrieves the defaul function namespace |
java.lang.String |
default_namespace()
Retrieves the default namespace, when one is not allocated |
boolean |
del_variable(QName var)
Deletes a variable from current scope. |
boolean |
derives_from(NodeType at,
QName et)
Checks if an XML node derives from a specified type. |
boolean |
derives_from(NodeType at,
org.apache.xerces.xs.XSTypeDefinition et)
Checks if an XML node derives from a specified type definition. |
void |
destroy_scope()
Destroys a scope. |
boolean |
element_declared(QName elem)
is element declared? |
org.apache.xerces.xs.XSTypeDefinition |
element_type_definition(QName elem)
Obtains schema definition of the type of an element. |
boolean |
expand_elem_type_qname(QName name)
Expands a qname and uses the default type/element namespace if unprefixed. |
boolean |
expand_function_qname(QName name)
Expands a qname and uses the default function namespace if unprefixed. |
boolean |
expand_qname(QName name)
Expands the qname's prefix into a namespace. |
boolean |
function_exists(QName name,
int arity)
Check for existance of function. |
protected Function |
function(QName name,
int arity)
|
protected AnyType |
get_var(QName var)
|
AnyAtomicType |
make_atomic(QName name)
Creates an atomic from a specific type name initialized with a default value. |
void |
new_scope()
Creates a new scope level. |
boolean |
prefix_exists(java.lang.String pref)
does prefix exist? |
java.lang.String |
resolve_prefix(java.lang.String pref)
Resolves a prefix into a namespace URI. |
protected void |
set_variable(QName var,
AnyType val)
|
boolean |
type_defined(QName qname)
Checks whether the type is defined in the in scope schema definitions. |
boolean |
type_defined(java.lang.String ns,
java.lang.String type)
Checks whether the type is defined in the in scope schema definitions. |
boolean |
variable_exists(QName var)
does variable exist in current scope ? |
boolean |
variable_in_scope(QName var)
checks to see if variable is in scope |
boolean |
xpath1_compatible()
is it xpath1 compatible? |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultStaticContext(org.apache.xerces.xs.XSModel schema)
schema
- Schema information from document. May be null.public DefaultStaticContext()
Method Detail |
public XSAnyURI base_uri()
base_uri
in interface StaticContext
public boolean xpath1_compatible()
xpath1_compatible
in interface StaticContext
public void add_namespace(java.lang.String prefix, java.lang.String namespace)
add_namespace
in interface StaticContext
prefix
- namespace prefixnamespace
- namespace URIpublic java.lang.String default_namespace()
default_namespace
in interface StaticContext
public java.lang.String default_function_namespace()
default_function_namespace
in interface StaticContext
public void add_function_library(FunctionLibrary fl)
add_function_library
in interface StaticContext
fl
- Function library to add.public boolean function_exists(QName name, int arity)
function_exists
in interface StaticContext
name
- function name.arity
- arity of function.
protected Function function(QName name, int arity)
public AnyAtomicType make_atomic(QName name)
make_atomic
in interface StaticContext
name
- name of type to create
public boolean expand_qname(QName name)
expand_qname
in interface StaticContext
name
- qname to expand.
public boolean expand_function_qname(QName name)
expand_function_qname
in interface StaticContext
name
- qname to expand.
public boolean expand_elem_type_qname(QName name)
expand_elem_type_qname
in interface StaticContext
name
- qname to expand.
public boolean type_defined(QName qname)
type_defined
in interface StaticContext
qname
- type name.
public boolean type_defined(java.lang.String ns, java.lang.String type)
ns
- namespace of type.type
- name of type.
public boolean element_declared(QName elem)
element_declared
in interface StaticContext
elem
- name of element.
public org.apache.xerces.xs.XSTypeDefinition element_type_definition(QName elem)
element_type_definition
in interface StaticContext
elem
- name of element who's type is desired.
public boolean attribute_declared(QName attr)
attribute_declared
in interface StaticContext
attr
- name of attribute.
public org.apache.xerces.xs.XSTypeDefinition attribute_type_definition(QName elem)
attribute_type_definition
in interface StaticContext
elem
- element name
public boolean prefix_exists(java.lang.String pref)
prefix_exists
in interface StaticContext
pref
- prefix name.
public java.lang.String resolve_prefix(java.lang.String pref)
resolve_prefix
in interface StaticContext
pref
- prefix name
public boolean derives_from(NodeType at, QName et)
derives_from
in interface StaticContext
at
- node actual typeet
- name of expected type
public boolean derives_from(NodeType at, org.apache.xerces.xs.XSTypeDefinition et)
derives_from
in interface StaticContext
at
- node actual type.et
- type definition of expected type.
public void new_scope()
new_scope
in interface StaticContext
public void destroy_scope()
destroy_scope
in interface StaticContext
public boolean variable_exists(QName var)
variable_exists
in interface StaticContext
var
- variable name.
public boolean variable_in_scope(QName var)
variable_in_scope
in interface StaticContext
var
- variable name.
public void add_variable(QName var)
add_variable
in interface StaticContext
var
- variable name to add.protected void set_variable(QName var, AnyType val)
public boolean del_variable(QName var)
del_variable
in interface StaticContext
var
- variable name to delete.
protected AnyType get_var(QName var)
public void debug_print_vars()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |