The <patternOptimization> element

Techniques described here are experimental and only available in Saxon-EE.

The xslt element may contain one or more patternOptimization children defining pattern optimizations for template rule matching. The patternOptimization element has the following attributes:

Attribute

Applies to

Values

Effect

dita

EE

true|false

Whether to apply indexation for generic predicated template rules in the DITA-OT framework. Default false. For more information see the DITA-OT optimization.

index.comparison.predicates

EE

true|false

Whether to apply indexation for generic value-comparison predicated template rules (*[exp=value]). Default false. For more information see the Indexation of rule comparison predicates.

index.minUses

EE

xs:integer

The minimum number of rules that share some common indexation to build an index. Default 6.

index.rules

EE

true|false

Whether indexes for rules should be generated from configuration-supplied indexation patterns. Default false, in the absence of <index> children.

optimize

EE

true|false

Whether to carry out any rule optimization. Default true if a <patternOptimization> element has been defined. (This allows a simple switch off by defining optimize="false")

precondition.minUses

EE

xs:integer

The minimum number of uses a precondition needs to be considered for application. Default 2.

preconditions

EE

true|false

Whether to generate pattern-directed preconditions for rules. Default false, in the absence of <precondition> children.

Currently there are three different forms of optimization:

The third is highly experimental, requires detailed knowledge of XPath models and is not recommended for any production purposes.