XSLT doesn't have a convenient way to process the text
content of an XML document. STX should add appropriate
<!-- Category: template -->
<stx:replace select = string-expression>
<!-- one or more stx:pattern elements: -->
<stx:pattern value = string-expression>
<!-- Content: template -->
The mandatory select attribute of stx:replace selects a
string to process. The mandatory value attributes of
each stx:pattern take a regular expression, describing
a substring to look for.
The semantics of stx:replace is: find the pattern that
matches first in the selected string. Create a text
node with the substring before the matched string,
process the contents of this pattern, process the
substring after the matched string with this
stx:replace. If no pattern matches then output the
remaining string as a text node. A pattern must match
at least one character.
If two or more pattern matches at the same position
then the pattern which matches the longest character
sequence will be used. If still two or more patterns
meet this condition then the first will be used.