[Home] [By Thread] [By Date] [Recent Entries]
I think any time going from a string "up" to rich markup (remember
the Omnimark triangle? Perhaps they used the triangle from someone
else) I would use analyze-string.
And I think it would be the easiest to synthesize as well, something along the lines of: regex="([cde]+)|([g]+)" ... then using regex-group(n) for each range. One would have to use tail recursion for XSLT 1, but I don't think it buys anything, plus your synthesis would be a lot more complicated (yes, I know it is done only once). Remember the XSLT processor is optimizing analyze-string rather than any stylesheet expression of the tail recursion. . . . . . . Ken At 2016-04-29 15:04 +0000, Eliot Kimber ekimber@xxxxxxxxxxxx wrote: Using XSLT 2, I have a requirement to take text and group contiguous sequences of characters in markup according to a given character range the characters are in. This is to support the application of range-specific fonts to text in HTML. -- Check our site for free XML, XSLT, XSL-FO and UBL developer resources | Streaming hands-on XSLT/XPath 2 training @US$45: http://goo.gl/Dd9qBK | Crane Softwrights Ltd. _ _ _ _ _ _ http://www.CraneSoftwrights.com/s/ | G Ken Holman _ _ _ _ _ _ _ _ _ _ mailto:gkholman@xxxxxxxxxxxxxxxxxxxx | Google+ blog _ _ _ _ _ http://plus.google.com/+GKenHolman-Crane/posts | Legal business disclaimers: _ _ http://www.CraneSoftwrights.com/legal |
|

Cart



