com.ibm.xml.xapi
Interface XSLTExecutable
-
- All Superinterfaces:
- XExecutable
public interface XSLTExecutable extends XExecutable
Represents a prepared XSLT stylesheet.
Parameters to the
executemethods include:- Either a JAXP
Sourceobject or anXItemViewobject for the initial context item. ValidSourcetypes are:StreamSourceSAXSourceDOMSourceStAXSource
- An
XDynamicContextobject containing the execution-time settings. If none is provided the default settings are used. - A JAXP
Resultobject to serialize the result to. ValidResulttypes are:StreamResultSAXResultDOMResultStAXResult
All
XSLTExecutableobjects are thread safe.- See Also:
XDynamicContext,XItemView,XExecutable
-
-
Method Summary
Methods Modifier and Type Method and Description voidexecute(javax.xml.transform.Source source, javax.xml.transform.Result result)Execute for the given source, sending the output to the specified result.voidexecute(javax.xml.transform.Source source, XDynamicContext dynamicContext, javax.xml.transform.Result result)Execute for the given source and dynamic context, sending the output to the specified result.voidexecute(XDynamicContext dynamicContext, javax.xml.transform.Result result)Execute for no source and the given dynamic context, sending the output to the specified result.voidexecute(XItemView item, javax.xml.transform.Result result)Execute for the given item, sending the output to the specified result.voidexecute(XItemView item, XDynamicContext dynamicContext, javax.xml.transform.Result result)Execute for the given item and dynamic context, sending the output to the specified result.XOutputParametersgetOutputParameters()Get the output parameters declared in the stylesheet.XOutputParametersgetOutputParameters(javax.xml.namespace.QName outputName)Get the output parameters declared in the stylesheet for the givenQName.voidregisterImportedSchemas()Registers any schemas that the stylesheet imports using<xsl:import-schema>declarations with theXFactorythat created thisXSLTExecutableinstance.-
Methods inherited from interface com.ibm.xml.xapi.XExecutable
execute, execute, execute, execute, execute, execute, executeToList, executeToList, executeToList, executeToList, executeToList, executeToList
-
-
-
-
Method Detail
-
execute
void execute(javax.xml.transform.Source source, javax.xml.transform.Result result)Execute for the given source, sending the output to the specified result. The default dynamic context settings are used.- Parameters:
source- The input source.result- The target result.
-
execute
void execute(javax.xml.transform.Source source, XDynamicContext dynamicContext, javax.xml.transform.Result result)Execute for the given source and dynamic context, sending the output to the specified result.- Parameters:
source- The input source. May benullwhen an initial named template is specified usingXDynamicContext.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.- See Also:
XDynamicContext.setXSLTInitialTemplate(QName)
-
execute
void execute(XItemView item, javax.xml.transform.Result result)
Execute for the given item, sending the output to the specified result. The default dynamic context settings are used.- Parameters:
item- The context item.result- The target result.
-
execute
void execute(XItemView item, XDynamicContext dynamicContext, javax.xml.transform.Result result)
Execute for the given item and dynamic context, sending the output to the specified result.- Parameters:
item- The context item. May benullwhen an initial named template is specified usingXDynamicContext.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.- See Also:
XDynamicContext.setXSLTInitialTemplate(QName)
-
execute
void execute(XDynamicContext dynamicContext, javax.xml.transform.Result result)
Execute for no source and the given dynamic context, sending the output to the specified result. Valid only if an initial named template is specified usingXDynamicContext.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).- Parameters:
dynamicContext- The dynamic context.result- The target result.- See Also:
XDynamicContext.setXSLTInitialTemplate(QName)
-
getOutputParameters
XOutputParameters getOutputParameters()
Get the output parameters declared in the stylesheet.- Returns:
- An
XOutputParametersobject containing the settings for the unnamed output definition. - See Also:
XOutputParameters
-
getOutputParameters
XOutputParameters getOutputParameters(javax.xml.namespace.QName outputName)
Get the output parameters declared in the stylesheet for the givenQName.- Parameters:
outputName- The name of the output definition. Corresponds to thenameattribute of anxsl:outputelement.- Returns:
- An
XOutputParametersobject containing the settings for the output definition or null if there is no output definition for the given name. - See Also:
XOutputParameters
-
registerImportedSchemas
void registerImportedSchemas()
Registers any schemas that the stylesheet imports using<xsl:import-schema>declarations with theXFactorythat created thisXSLTExecutableinstance.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
registerImportedSchemasis not called, the imported schemas will be loaded every time one of theexecutemethods is called, so there can be a tremendous performance benefit to registering the schemas.- See Also:
XFactory.registerSchema(Source)
-
-