XSLT Transform tool
The XSLT Transform tool applies a sequence of regular-expression
transformation rules to block text. Each rule has a pattern and a replacement
(with $1, $2 backreference support), and the rules are applied in order.
Since Go has no built-in XSLT engine, this provides a lightweight,
regex-based equivalent for tag and text rewriting. It does not execute XSLT
stylesheets; for stylesheet-based transforms use the okapi-bridge transform
step.
By default the rules are applied to source text. When the rules list is empty, blocks pass through unchanged.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
applySource | boolean | true | Apply transformation to source text |
applyTarget | boolean | false | Apply transformation to target text |
passOnOutput | boolean | true | Pass the transformation output to subsequent pipeline steps |
rules | object[] | Regex-based tag and text transformation rules |
Configure these parameters interactively and copy the flow-step YAML on the Tool Reference.
Examples
Rewrite a tag in source text
Replace one element name with another using a regex rule.
applySource: true
rules:
- pattern: "<b>(.*?)</b>"
replace: "<strong>$1</strong>"Processing notes
Operates on translatable blocks only; non-translatable blocks pass through unchanged.
With no rules configured, blocks pass through unchanged.
Limitations
Transformation is regex-based; full XSLT stylesheets are not executed.
Patterns use Go's RE2 syntax, which does not support backreferences or lookaround within the match.
← Back to the Tool Reference