|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Grouping by character runs (and keeping element s
> Is there a certain pattern on how to tackle these kind of problems in > XSLT, or is the language just not the tool of choice for this kind of > transformation? last time this came up on this list (a while ago, not sure I could find it in the archives) two solutions were proposed (one from Mike and one from me, so that made a change:-) they were radically different. I made a pre-pass that flattened all the markup in the paragraph to text so there was a single text node that could be handled with analyze-string, then did a final pass that handled each remaining text node with analyze-string to put the markup back. Mike did a pre-pass to tokenize the original text node and wrap every word in an element (as I recall) then use xsl:for-each-group to add your grouping element (<marker> in your case) then did a final pass taht unwrapped the tokenized words back into larger text nodes. David
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






