This content has been marked as final. Show 4 replies
Not with snippet.
You can do it with ctx_doc.markup, but there is guarantee that the marked up document will be valid XML. This is a documented limitation.
Fortunately, I don't need valid XML. You may remember my last question, I wanted to restrict a snippet to the content of the tag specified by the WITHIN clause. Since you told me that this is not possible with ctx_doc.snippet, I'm trying to achieve this in a different way. Is it guarenteed, that tags are always included as a whole, e.g. "<FOOBAR>..." will not be contained as "OBAR>...", so I can search for the tag afterwards?
There's certainly no documented guarantee that it will work that way. It may work that way in practice, but if it's not documented it could potentially change in future versions.
I just had a look at tha markup function, according to the documentation it returns the whole document which is far too much for us. So it seems that there is no simple way to achieve what we need.