## net.sf.saxon.instruct
Class Executable

    java.lang.Object
      |
      +--net.sf.saxon.instruct.Executable

All Implemented Interfaces:
  java.io.Serializable

public class Executable
extends java.lang.Object
implements java.io.Serializable

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

See Also:
  Serialized Form

Constructor Summary
`Executable()`

Method Summary
`void` `addQueryLibraryModule(StaticQueryContext module)` Add an XQuery library module to the configuration
`java.util.HashMap` `getCharacterMapIndex()` Get the index of named character maps
`java.util.HashMap` `getCollationTable()` Get the table of collations
`Configuration` `getConfiguration()` Get the configuration
`DecimalFormatManager` `getDecimalFormatManager()` Get the DecimalFormatManager which handles decimal-format definitions
`java.util.Comparator` `getDefaultCollation()` Get the default collation
`java.lang.String` `getDefaultCollationName()` Get the name of the default collation
`java.util.Properties` `getDefaultOutputProperties()` Get the default output properties
`FunctionLibrary` `getFunctionLibrary()` Get the library containing all the in-scope functions in the static context
`java.util.HashMap` `getGlobalVariableIndex()` Get the index of global variables
`SlotManager` `getGlobalVariableMap()` Get the global variable map
`KeyManager` `getKeyManager()` Get the KeyManager which handles key definitions
`int` `getLargestPatternStackFrame()` Determine the size of the stack frame needed for evaluating match patterns
`LocationMap` `getLocationMap()` Get the location map
`java.util.Comparator` `getNamedCollation(java.lang.String name)` Find a named collation.
`Template` `getNamedTemplate(int fingerprint)` Get the named template with a given name.
`java.util.HashMap` `getNamedTemplateTable()` Get the named template table
`StaticQueryContext` `getQueryLibraryModule(java.lang.String namespace)` Locate an XQuery library module in the configuration.
`RuleManager` `getRuleManager()` Get the RuleManager which handles template rules
`Mode` `getStripperRules()` Get the rules determining which nodes are to be stripped from the tree
`void` `initialiseBindery(Bindery bindery)` Allocate space in bindery for all the variables needed
`Stripper` `newStripper()` Create a Stripper which handles whitespace stripping definitions
`void` `registerGlobalVariable(GeneralVariable variable)` Register a global variable
`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` `setFunctionLibrary(FunctionLibrary functionLibrary)` Set the library containing all the in-scope functions in the static context
`void` `setKeyManager(KeyManager km)` Set the KeyManager which handles key definitions
`void` `setLocationMap(LocationMap map)` Set the location map
`void` `setPatternSlotSpace(int patternLocals)` Set the space requirements for variables used in template match patterns
`void` `setRuleManager(RuleManager rm)` Set the RuleManager that handles template rules
`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 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

### 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

### 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

### getNamedTemplate

    public Template getNamedTemplate(int fingerprint)

  Get the named template with a given name.

  Parameters:
    `fingerprint` - The namepool fingerprint of the template name
  Returns:
    The template (of highest import precedence) with this name if there is one; null if none is found.

### getFunctionLibrary

    public FunctionLibrary getFunctionLibrary()

  Get the library containing all the in-scope functions in the static context

  Returns:
    the function libary

### setFunctionLibrary

    public void setFunctionLibrary(FunctionLibrary functionLibrary)

  Set the library containing all the in-scope functions in the static context

  Parameters:
    `functionLibrary` - the function libary

### 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.

### getStripperRules

    public Mode getStripperRules()

  Get the rules determining which nodes are to be stripped from the tree

  Returns:
    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

### getDefaultCollationName

    public java.lang.String getDefaultCollationName()

  Get the name of the default collation

  Returns:
    the name of the default collation; this is the code point collation URI if no other default has been set up.

### 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

### getCollationTable

    public java.util.HashMap getCollationTable()

  Get the table of collations

  Returns:
    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

### addQueryLibraryModule

    public void addQueryLibraryModule(StaticQueryContext module)

  Add an XQuery library module to the configuration

### getQueryLibraryModule

    public StaticQueryContext getQueryLibraryModule(java.lang.String namespace)

  Locate an XQuery library module in the configuration.

  Parameters:
    `namespace` - the module namespace URI
  Returns:
    the StaticQueryContext representing the module, or null if the module namespace is unknown

### setPatternSlotSpace

    public void setPatternSlotSpace(int patternLocals)

  Set the space requirements for variables used in template match patterns

  Parameters:
    `patternLocals` - The largest number of local variables used in the match pattern of any template rule

### getGlobalVariableMap

    public SlotManager getGlobalVariableMap()

  Get the global variable map

  Returns:
    the SlotManager defining the allocation of slots to global variables

### getGlobalVariableIndex

    public java.util.HashMap getGlobalVariableIndex()

  Get the index of global variables

  Returns:
    the index of global variables. This is a HashMap in which the key is the integer fingerprint of the variable name, and the value is the VariableDeclaration of the global variable

### registerGlobalVariable

    public void registerGlobalVariable(GeneralVariable variable)

  Register a global variable

### initialiseBindery

    public void initialiseBindery(Bindery bindery)

  Allocate space in bindery for all the variables needed

  Parameters:
    `bindery` - The bindery to be initialized

### getLargestPatternStackFrame

    public int getLargestPatternStackFrame()

  Determine the size of the stack frame needed for evaluating match patterns

### setLocationMap

    public void setLocationMap(LocationMap map)

  Set the location map

### getLocationMap

    public LocationMap getLocationMap()

  Get the location map