|
API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XSLTExecutable
Represents a prepared XSLT stylesheet.
Parameters to the execute
methods include:
Source
object or an XItemView
object for
the initial context item. Valid Source
types are:
StreamSource
SAXSource
DOMSource
StAXSource
XDynamicContext
object containing the execution-time settings. If none
is provided the default settings are used.Result
object to serialize the result to. Valid
Result
types are:
StreamResult
SAXResult
DOMResult
StAXResult
All XSLTExecutable
objects are thread safe.
XDynamicContext
,
XItemView
,
XExecutable
Method Summary | |
---|---|
void |
execute(Source source,
Result result)
Execute for the given source, sending the output to the specified result. |
void |
execute(Source source,
XDynamicContext dynamicContext,
Result result)
Execute for the given source and dynamic context, sending the output to the specified result. |
void |
execute(XDynamicContext dynamicContext,
Result result)
Execute for no source and the given dynamic context, sending the output to the specified result. |
void |
execute(XItemView item,
Result result)
Execute for the given item, sending the output to the specified result. |
void |
execute(XItemView item,
XDynamicContext dynamicContext,
Result result)
Execute for the given item and dynamic context, sending the output to the specified result. |
XOutputParameters |
getOutputParameters()
Get the output parameters declared in the stylesheet. |
XOutputParameters |
getOutputParameters(QName outputName)
Get the output parameters declared in the stylesheet for the given QName |
void |
registerImportedSchemas()
Registers any schemas that the stylesheet imports using <xsl:import-schema> declarations with the XFactory that
created this XSLTExecutable instance. |
Methods inherited from interface com.ibm.xml.xapi.XExecutable |
---|
execute, execute, execute, execute, execute, execute, executeToList, executeToList, executeToList, executeToList, executeToList, executeToList |
Method Detail |
---|
void execute(Source source, Result result)
source
- The input source.result
- The target result.void execute(Source source, XDynamicContext dynamicContext, Result result)
source
- The input source. May be null
when an
initial named template is specified using XDynamicContext.setXSLTInitialTemplate(QName)
,
however if the context item is accessed an error will be raised
(if the context item is accessed it must not be null).dynamicContext
- The dynamic context.result
- The target result.XDynamicContext.setXSLTInitialTemplate(QName)
void execute(XItemView item, Result result)
item
- The context item.result
- The target result.void execute(XItemView item, XDynamicContext dynamicContext, Result result)
item
- The context item. May be null
when an
initial named template is specified using XDynamicContext.setXSLTInitialTemplate(QName)
,
however if the context item is accessed an error will be raised
(if the context item is accessed it must not be null).dynamicContext
- The dynamic context.result
- The target result.XDynamicContext.setXSLTInitialTemplate(QName)
void execute(XDynamicContext dynamicContext, Result result)
XDynamicContext.setXSLTInitialTemplate(QName)
,
however if the context item is accessed an error will be raised
(if the context item is accessed it must not be null).
dynamicContext
- The dynamic context.result
- The target result.XDynamicContext.setXSLTInitialTemplate(QName)
XOutputParameters getOutputParameters()
XOutputParameters
object containing the settings
for the unnamed output definition.XOutputParameters
XOutputParameters getOutputParameters(QName outputName)
QName.
- Parameters:
outputName
- The name of the output definition. Corresponds
to the name
attribute of an xsl:output
element.
- Returns:
- An
XOutputParameters
object containing the settings
for the output definition or null if there is no output definition for
the given name. - See Also:
XOutputParameters
void registerImportedSchemas()
<xsl:import-schema>
declarations with the XFactory
that
created this XSLTExecutable
instance.
By default imported schemas are not registered, so they will not be used to validate input documents - they can only be used to validate result trees in that case.
If registerImportedSchemas
is not called, the imported schemas
will be loaded every time one of the execute
methods is called,
so there can be a tremendous performance benefit to registering the
schemas.
XFactory.registerSchema(Source)
|
IBM Copyright 2004-2008 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |