com.ibm.xml.xapi
Interface XExecutable
All known subinterfaces:
- public interface XExecutable
Base executable class. Provides common execute
methods.
Parameters to the execute
methods include:
- Either a JAXP
Source
object or anXItemView
object for the initial context item. ValidSource
types are:StreamSource
SAXSource
DOMSource
StAXSource
- An
XDynamicContext
object containing the execution-time settings. If none is provided the default settings are used.
The return value is an XSequenceCursor
which is
a cursor view of the resulting sequence of items. A List
of
XItemView
return type is also provided for random access.
If the result is the empty sequence and the return type is XSequenceCursor
then the value will be null
. If the result is empty and the
return type is List
then the value will be an empty list.
Note that XSequenceCursor
implements XItemView
allowing
the result of one execution to be passed in as the context item for another.
All XExecutable
objects are thread safe.
See Also:
Method Summary
Modifier and Type | Method and Description |
---|---|
execute()
Execute for no source.
|
|
execute(javax.xml.transform.Source source)
Execute for the given source.
|
|
execute(javax.xml.transform.Source source,XDynamicContext dynamicContext)
Execute for the given source and dynamic context.
|
|
execute(XDynamicContext dynamicContext)
Execute for no source.
|
|
execute(XItemView item)
Execute for the given item.
|
|
execute(XItemView item,XDynamicContext dynamicContext)
Execute for the given item and dynamic context.
|
|
|
executeToList()
Execute for no source.
|
|
executeToList(javax.xml.transform.Source source)
Execute for the given source.
|
|
executeToList(javax.xml.transform.Source source,XDynamicContext dynamicContext)
Execute for the given source and dynamic context.
|
|
executeToList(XDynamicContext dynamicContext)
Execute for no source.
|
|
executeToList(XItemView item)
Execute for the given item.
|
|
executeToList(XItemView item,XDynamicContext dynamicContext)
Execute for the given item and dynamic context.
|
Method Detail
execute
- XSequenceCursor execute(javax.xml.transform.Source source)
Execute for the given source. The default dynamic context settings are used.
Parameters:
source
- The input source. May be null
for XPath and XQuery.
Note that if the context item is null and an expression accesses the context item
an error will be raised by the processor (it is an error if a part of the
dynamic context is accessed which has not been initialized). Returns:
A sequence cursor or
null
if the result is
empty. execute
- XSequenceCursor execute(javax.xml.transform.Source source,
- XDynamicContext dynamicContext)
Execute for the given source and dynamic context.
Parameters:
source
- The input source. May be null
for XPath and XQuery and for XSLT
when an initial named template is specified using XDynamicContext.setXSLTInitialTemplate(QName)
.
Note that if the context item is null and an expression accesses the context item
an error will be raised by the processor (it is an error if a part of the
dynamic context is accessed which has not been initialized). dynamicContext
- The dynamic context. Returns:
A sequence cursor or
null
if the result is
empty. execute
- XSequenceCursor execute(XItemView item)
Execute for the given item. The default dynamic context settings are used.
Parameters:
item
- The context item. May be null
for XPath and XQuery.
Note that if the context item is null and an expression accesses the context item
an error will be raised by the processor (it is an error if a part of the
dynamic context is accessed which has not been initialized). Returns:
A sequence cursor or
null
if the result is
empty. execute
- XSequenceCursor execute(XItemView item,
- XDynamicContext dynamicContext)
Execute for the given item and dynamic context.
Parameters:
item
- The context item. May be null
for XPath and XQuery and for XSLT
when an initial named template is specified using XDynamicContext.setXSLTInitialTemplate(QName)
.
Note that if the context item is null and an expression accesses the context item
an error will be raised by the processor (it is an error if a part of the
dynamic context is accessed which has not been initialized). dynamicContext
- The dynamic context. Returns:
A sequence cursor or
null
if the result is
empty. execute
- XSequenceCursor execute()
Execute for no source. The default dynamic context settings are used.
Valid for XPath and XQuery. Note that if an expression accesses the context item
an error will be raised by the processor (it is an error if a part of the
dynamic context is accessed which has not been initialized).
Returns:
A sequence cursor or
null
if the result is empty. execute
- XSequenceCursor execute(XDynamicContext dynamicContext)
Execute for no source. Valid for XPath and XQuery and for XSLT when an initial named template
is specified using
XDynamicContext.setXSLTInitialTemplate(QName)
.
Note that if an expression accesses the context item
an error will be raised by the processor (it is an error if a part of the
dynamic context is accessed which has not been initialized).
Parameters:
dynamicContext
- The dynamic context. Returns:
A sequence cursor or
null
if the result is empty. executeToList
- java.util.List<XItemView> executeToList( javax.xml.transform.Source source)
Execute for the given source. The default dynamic context settings are used.
Parameters:
source
- The input source. May be null
for XPath and XQuery.
Note that if the context item is null and an expression accesses the context item
an error will be raised by the processor (it is an error if a part of the
dynamic context is accessed which has not been initialized). Returns:
A list of
XItemView
. If the result of the
execution is empty then an empty list is returned. executeToList
- java.util.List<XItemView> executeToList( javax.xml.transform.Source source,
- XDynamicContext dynamicContext)
Execute for the given source and dynamic context.
Parameters:
source
- The input source. May be null
for XPath and XQuery and for XSLT
when an initial named template is specified using XDynamicContext.setXSLTInitialTemplate(QName)
.
Note that if the context item is null and an expression accesses the context item
an error will be raised by the processor (it is an error if a part of the
dynamic context is accessed which has not been initialized). Returns:
A list of
XItemView
. If the result of the
execution is empty then an empty list is returned. executeToList
Execute for the given item. The default dynamic context settings are used.
Parameters:
item
- The context item. May be null
for XPath and XQuery.
Note that if the context item is null and an expression accesses the context item
an error will be raised by the processor (it is an error if a part of the
dynamic context is accessed which has not been initialized). Returns:
A list of
XItemView
. If the result of the
execution is empty then an empty list is returned. executeToList
- java.util.List<XItemView> executeToList( XItemView item,
- XDynamicContext dynamicContext)
Execute for the given item and dynamic context.
Parameters:
item
- The context item. May be null
for XPath and XQuery and for XSLT
when an initial named template is specified using XDynamicContext.setXSLTInitialTemplate(QName)
.
Note that if the context item is null and an expression accesses the context item
an error will be raised by the processor (it is an error if a part of the
dynamic context is accessed which has not been initialized). dynamicContext
- The dynamic context. Returns:
A list of
XItemView
. If the result of the
execution is empty then an empty list is returned. executeToList
- java.util.List<XItemView> executeToList( )
Execute for no source. The default dynamic context settings are used.
Valid for XPath and XQuery. Note that if an expression accesses the context item
an error will be raised by the processor (it is an error if a part of the
dynamic context is accessed which has not been initialized).
Returns:
A list of
XItemView
. If the result of the
execution is empty then an empty list is returned. executeToList
- java.util.List<XItemView> executeToList( XDynamicContext dynamicContext)
Execute for no source. Valid for XPath and XQuery and for XSLT when an initial named template
is specified using
XDynamicContext.setXSLTInitialTemplate(QName)
.
Note that if an expression accesses the context item
an error will be raised by the processor (it is an error if a part of the
dynamic context is accessed which has not been initialized).
Parameters:
dynamicContext
- The dynamic context. Returns:
A list of
XItemView
. If the result of the
execution is empty then an empty list is returned.