KWIC display does not space words properly.
Issue #58
resolved
The KWIC display which contains the results of a search does not display the spacing between words properly.
Comments (2)
-
-
- changed status to resolved
We are now using BlackLab for search, so the problem with the eXist-based KWIC results is no longer relevant.
- Log in to comment
The problem with spaces next to highlighted matches that have adjacent punctuation is the difference between the following axis (which we can't use for performance reasons) and following-sibling, which we are currently using. For example, the highlighted word "iron" comes through looking like this:
<tei-w><mark>iron</mark></tei-w>
so that <mark> element that indicates the highlight puts the content at a different level in the hierarchy than any adjacent <pc> element. They aren't siblings, so the space processing that depends on following-sibling doesn't work. It's the exact same problem we have elsewhere with <hi> surrounding a word but not its adjacent punctuation.