net.sf.saxon.instruct
Class Executable

java.lang.Object
  extended bynet.sf.saxon.instruct.Instruction
      extended bynet.sf.saxon.instruct.Executable
All Implemented Interfaces:
java.io.Serializable, javax.xml.transform.SourceLocator

public class Executable
extends Instruction

A compiled stylesheet in executable form. Note that the original stylesheet tree is no longer retained.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.saxon.instruct.Instruction
children
 
Constructor Summary
Executable()
           
 
Method Summary
 java.util.HashMap getCharacterMapIndex()
          Get the index of named character maps
 Configuration getConfiguration()
          Get the configuration
 DecimalFormatManager getDecimalFormatManager()
          Get the DecimalFormatManager which handles decimal-format definitions
 java.util.Comparator getDefaultCollation()
          Get the default collation
 java.util.Properties getDefaultOutputProperties()
          Get the default output properties
 KeyManager getKeyManager()
          Get the KeyManager which handles key definitions
 java.util.Comparator getNamedCollation(java.lang.String name)
          Find a named collation.
 java.util.HashMap getNamedTemplateTable()
          Get the named template table
 RuleManager getRuleManager()
          Get the RuleManager which handles template rules
 java.lang.String getSystemId(int index)
          Get the ID of the stylesheet module with a given index
 void initialiseBindery(Bindery bindery)
          Allocate space in bindery for all the variables needed This has to be done early to accommodate preview mode
 Stripper newStripper()
          Create a Stripper which handles whitespace stripping definitions
 TailCall processLeavingTail(XPathContext context)
          Dummy processLeavingTail() method.
 void setCharacterMapIndex(java.util.HashMap cmi)
          Set the index of named character maps
 void setCollationTable(java.util.HashMap table)
          Set the table of collations
 void setConfiguration(Configuration config)
          Set the configuration
 void setDecimalFormatManager(DecimalFormatManager dfm)
          Set the DecimalFormatManager which handles decimal-format definitions
 void setDefaultCollationName(java.lang.String name)
          Set the default collation
 void setDefaultOutputProperties(java.util.Properties properties)
          Set the default output properties (the properties for the unnamed output format)
 void setInstructionDetails(Controller controller, NamePool namePool, InstructionDetails details)
          Get the name of this instruction
 void setKeyManager(KeyManager km)
          Set the KeyManager which handles key definitions
 void setModuleArray(java.lang.String[] modules)
          Set the list of stylesheet modules, for use in error messages and tracing
 void setNamedTemplateTable(java.util.HashMap table)
          Set the named template table
 void setRuleManager(RuleManager rm)
          Set the RuleManager that handles template rules
 void setSlotSpace(int globals, int locals)
          Set the space requirements for global and local variables
 void setStripperRules(Mode rules)
          Set the rules determining which nodes are to be stripped from the tree
 void setStripsWhitespace(boolean strips)
          Indicate that the stylesheet does some whitespace stripping
 boolean stripsWhitespace()
          Determine whether this stylesheet does any whitespace stripping
 
Methods inherited from class net.sf.saxon.instruct.Instruction
assembleParams, assembleTunnelParams, getChildren, getColumnNumber, getInstructionDetails, getInstructionName, getLineNumber, getPublicId, getResultType, getSystemId, getSystemId, process, processChildren, processChildrenLeavingTail, recoverableError, setChildren, setSourceLocation, styleError, styleError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Executable

public Executable()
Method Detail

setConfiguration

public void setConfiguration(Configuration config)
Set the configuration


getConfiguration

public Configuration getConfiguration()
Get the configuration


setInstructionDetails

public void setInstructionDetails(Controller controller,
                                  NamePool namePool,
                                  InstructionDetails details)
Get the name of this instruction

Specified by:
setInstructionDetails in class Instruction

setModuleArray

public void setModuleArray(java.lang.String[] modules)
Set the list of stylesheet modules, for use in error messages and tracing

Parameters:
modules - an array of strings containing the URIs of the stylesheet modules

getSystemId

public java.lang.String getSystemId(int index)
Get the ID of the stylesheet module with a given index

Parameters:
index - an integer identifying the module within the array of modules passed to the setModuleArray() method
Returns:
the URI of the index'th module

setRuleManager

public void setRuleManager(RuleManager rm)
Set the RuleManager that handles template rules

Parameters:
rm - the RuleManager containing details of all the template rules

getRuleManager

public RuleManager getRuleManager()
Get the RuleManager which handles template rules

Returns:
the RuleManager registered with setRuleManager

setNamedTemplateTable

public void setNamedTemplateTable(java.util.HashMap table)
Set the named template table

Parameters:
table - a hash table containing entries that map the names of named templates to the instructions representing the xsl:template instruction

getNamedTemplateTable

public java.util.HashMap getNamedTemplateTable()
Get the named template table

Returns:
a hash table containing entries that map the names of named templates to the instructions representing the xsl:template instruction

setCharacterMapIndex

public void setCharacterMapIndex(java.util.HashMap cmi)
Set the index of named character maps

Parameters:
cmi - a hash table that maps the names of character maps to the HashMap objects representing the character maps

getCharacterMapIndex

public java.util.HashMap getCharacterMapIndex()
Get the index of named character maps

Returns:
the hash table that maps the names of character maps to the HashMap objects representing the character maps

setStripperRules

public void setStripperRules(Mode rules)
Set the rules determining which nodes are to be stripped from the tree

Parameters:
rules - a Mode object containing the whitespace stripping rules. A Mode is generally a collection of template rules, but it is reused here to represent a collection of stripping rules.

setStripsWhitespace

public void setStripsWhitespace(boolean strips)
Indicate that the stylesheet does some whitespace stripping

Parameters:
strips - true if the stylesheet performs whitespace stripping of one or more elements.

newStripper

public Stripper newStripper()
Create a Stripper which handles whitespace stripping definitions

Returns:
the constructed Stripper object

stripsWhitespace

public boolean stripsWhitespace()
Determine whether this stylesheet does any whitespace stripping

Returns:
true if the stylesheet performs whitespace stripping of one or more elements.

setKeyManager

public void setKeyManager(KeyManager km)
Set the KeyManager which handles key definitions

Parameters:
km - the KeyManager containing the xsl:key definitions

getKeyManager

public KeyManager getKeyManager()
Get the KeyManager which handles key definitions

Returns:
the KeyManager containing the xsl:key definitions

setDefaultOutputProperties

public void setDefaultOutputProperties(java.util.Properties properties)
Set the default output properties (the properties for the unnamed output format)

Parameters:
properties - the output properties to be used when the unnamed output format is selected

getDefaultOutputProperties

public java.util.Properties getDefaultOutputProperties()
Get the default output properties

Returns:
the properties for the unnamed output format

setDecimalFormatManager

public void setDecimalFormatManager(DecimalFormatManager dfm)
Set the DecimalFormatManager which handles decimal-format definitions

Parameters:
dfm - the DecimalFormatManager containing the named xsl:decimal-format definitions

getDecimalFormatManager

public DecimalFormatManager getDecimalFormatManager()
Get the DecimalFormatManager which handles decimal-format definitions

Returns:
the DecimalFormatManager containing the named xsl:decimal-format definitions

setDefaultCollationName

public void setDefaultCollationName(java.lang.String name)
Set the default collation

Parameters:
name - the name of the default collation

getDefaultCollation

public java.util.Comparator getDefaultCollation()
Get the default collation

Returns:
a Comparator that implements the default collation

setCollationTable

public void setCollationTable(java.util.HashMap table)
Set the table of collations

Parameters:
table - a hash table that maps collation names (URIs) to objects representing the collation information

getNamedCollation

public java.util.Comparator getNamedCollation(java.lang.String name)
Find a named collation.

Parameters:
name - identifies the name of the collation required; null indicates that the default collation is required
Returns:
the requested collation, or null if the collation is not found

setSlotSpace

public void setSlotSpace(int globals,
                         int locals)
Set the space requirements for global and local variables

Parameters:
globals - The number of global variables and parameters
locals - The largest number of local variables used by any template or function (etc)

initialiseBindery

public void initialiseBindery(Bindery bindery)
Allocate space in bindery for all the variables needed This has to be done early to accommodate preview mode

Parameters:
bindery - The bindery to be initialized

processLeavingTail

public TailCall processLeavingTail(XPathContext context)
                            throws javax.xml.transform.TransformerException
Dummy processLeavingTail() method. This is called to initialize processing, but currently does nothing. The controller takes charge of finding the initial template.

Specified by:
processLeavingTail in class Instruction
Parameters:
context - The dynamic context of the transformation, giving access to the current node, the current variables, etc.
Returns:
null (always)
Throws:
javax.xml.transform.TransformerException