XSLT doesn't have a convenient way to process the text
content of an XML document. STX should add appropriate
functionality.
Proposal:
<!-- Category: template -->
<stx:replace select = string-expression>
<!-- one or more stx:pattern elements: -->
<stx:pattern value = string-expression>
<!-- Content: template -->
</stx:pattern>
</stx:replace>
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.
Logged In: YES
user_id=76736
Added to the CVS version
still one open issue (also marked in the spec):
is there a global attribute sensible and what would it mean?
Logged In: YES
user_id=76736
Clarification: is there an attribute global="yes"|"no"
sensible and what would it mean?