com.ibm.xml.xapi

Interface XSLTExecutable

All Superinterfaces:
XExecutable

  1. public interface XSLTExecutable
  2. extends XExecutable

Represents a prepared XSLT stylesheet.

Parameters to the execute methods include:

All XSLTExecutable objects are thread safe.

See Also:
XDynamicContext, XItemView, XExecutable

Method Summary

Modifier and Type Method and Description
  1. void
execute(javax.xml.transform.Source source,javax.xml.transform.Result result)
Execute for the given source, sending the output to the specified result.
  1. 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.
  1. 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.
  1. void
execute(XItemView item,javax.xml.transform.Result result)
Execute for the given item, sending the output to the specified result.
  1. 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.
  1. XOutputParameters
getOutputParameters()
Get the output parameters declared in the stylesheet.
  1. XOutputParameters
getOutputParameters(javax.xml.namespace.QName outputName)
Get the output parameters declared in the stylesheet for the given QName.
  1. 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

execute

  1. void execute(javax.xml.transform.Source source,
  2. 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

  1. void execute(javax.xml.transform.Source source,
  2. XDynamicContext dynamicContext,
  3. 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 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.
See Also:

execute

  1. void execute(XItemView item,
  2. 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

  1. void execute(XItemView item,
  2. XDynamicContext dynamicContext,
  3. 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 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.
See Also:

execute

  1. void execute(XDynamicContext dynamicContext,
  2. 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 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).
Parameters:
dynamicContext - The dynamic context.
result - The target result.
See Also:

getOutputParameters

  1. XOutputParameters getOutputParameters( )
Get the output parameters declared in the stylesheet.
Returns:
An XOutputParameters object containing the settings for the unnamed output definition.
See Also:

getOutputParameters

  1. XOutputParameters getOutputParameters( javax.xml.namespace.QName outputName)
Get the output parameters declared in the stylesheet for the given 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:

registerImportedSchemas

  1. void registerImportedSchemas()
Registers any schemas that the stylesheet imports using <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.