On 1/3/07, Walter Underwood <[EMAIL PROTECTED]> wrote:
I've implemented this before, once in Python and once in C, so I'd be glad to take a look at it. I'm not sure I have time to do a lot of implementation, but I'd sure be glad to help.
Cool. I'll post the current fragmenter as a JIRA issue soon.
We tried several APIs and decided that the best was an array of String with the odd elements containing the strings that needed highlighting. That made it really easy to step through and wrap highlighted stuff with the right markup, while properly escaping any angle brackets in the source text.
That is _much_ better than the current system. It wouldn't be hard to add start/end offsets to the fragments too, as Chris suggested so long ago.
I'm not sure how easy it is to handle that format in XSLT, but it might be worth it. Embedded highlight markup just doesn't work.
Quite a few aspects of the result format appear to be problematic from a direct-XSLT-consumption perspective... which probably isn't too surprising as I don't think that was really the original intent. Maybe it would be a good idea to work toward a simplified XML response writer designed for XSLT consumption? -Mike