|
||||||||||
| 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 StaticContextpublic boolean xpath1_compatible()
xpath1_compatible in interface StaticContext
public void add_namespace(java.lang.String prefix,
java.lang.String namespace)
add_namespace in interface StaticContextprefix - namespace prefixnamespace - namespace URIpublic java.lang.String default_namespace()
default_namespace in interface StaticContextpublic java.lang.String default_function_namespace()
default_function_namespace in interface StaticContextpublic void add_function_library(FunctionLibrary fl)
add_function_library in interface StaticContextfl - Function library to add.
public boolean function_exists(QName name,
int arity)
function_exists in interface StaticContextname - function name.arity - arity of function.
protected Function function(QName name,
int arity)
public AnyAtomicType make_atomic(QName name)
make_atomic in interface StaticContextname - name of type to create
public boolean expand_qname(QName name)
expand_qname in interface StaticContextname - qname to expand.
public boolean expand_function_qname(QName name)
expand_function_qname in interface StaticContextname - qname to expand.
public boolean expand_elem_type_qname(QName name)
expand_elem_type_qname in interface StaticContextname - qname to expand.
public boolean type_defined(QName qname)
type_defined in interface StaticContextqname - 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 StaticContextelem - name of element.
public org.apache.xerces.xs.XSTypeDefinition element_type_definition(QName elem)
element_type_definition in interface StaticContextelem - name of element who's type is desired.
public boolean attribute_declared(QName attr)
attribute_declared in interface StaticContextattr - name of attribute.
public org.apache.xerces.xs.XSTypeDefinition attribute_type_definition(QName elem)
attribute_type_definition in interface StaticContextelem - element name
public boolean prefix_exists(java.lang.String pref)
prefix_exists in interface StaticContextpref - prefix name.
public java.lang.String resolve_prefix(java.lang.String pref)
resolve_prefix in interface StaticContextpref - prefix name
public boolean derives_from(NodeType at,
QName et)
derives_from in interface StaticContextat - node actual typeet - name of expected type
public boolean derives_from(NodeType at,
org.apache.xerces.xs.XSTypeDefinition et)
derives_from in interface StaticContextat - node actual type.et - type definition of expected type.
public void new_scope()
new_scope in interface StaticContextpublic void destroy_scope()
destroy_scope in interface StaticContextpublic boolean variable_exists(QName var)
variable_exists in interface StaticContextvar - variable name.
public boolean variable_in_scope(QName var)
variable_in_scope in interface StaticContextvar - variable name.
public void add_variable(QName var)
add_variable in interface StaticContextvar - variable name to add.
protected void set_variable(QName var,
AnyType val)
public boolean del_variable(QName var)
del_variable in interface StaticContextvar - 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 | |||||||||