com.jclark.xsl.tr

Class TemplateRuleSet

class TemplateRuleSet extends Object

holds a collection of Templates (Actions) for a mode .. their match patterns ranked by priority and importance
Constructor Summary
TemplateRuleSet(Action builtinAction)
construct/ initialize with the default, builtin Action
Method Summary
voidadd(TopLevelPattern pattern, Importance importImportance, Priority priority, Action action)
add a new (match template) rule to the set
voidcompile()
After all the patterns and actions have been added, this must be called to organize them to facilitate quick finding of the best template action when "apply-templates" is performed on a Node
ActiongetAction(Node node, ExprContext context)
finds and returns the TemplateAction that is the best match (or highest priority) for the given Node in the given context
ActiongetImportAction(Node node, ExprContext context, int importLevel)

Constructor Detail

TemplateRuleSet

TemplateRuleSet(Action builtinAction)
construct/ initialize with the default, builtin Action

Method Detail

add

void add(TopLevelPattern pattern, Importance importImportance, Priority priority, Action action)
add a new (match template) rule to the set

compile

void compile()
After all the patterns and actions have been added, this must be called to organize them to facilitate quick finding of the best template action when "apply-templates" is performed on a Node

getAction

Action getAction(Node node, ExprContext context)
finds and returns the TemplateAction that is the best match (or highest priority) for the given Node in the given context

getImportAction

Action getImportAction(Node node, ExprContext context, int importLevel)