On 4/25/07, Marcel Reutegger <[EMAIL PROTECTED]> wrote:
Alexandru Popescu ☀ wrote:
> Sorry to ask a beginner question but what is rep:excerpt() function
> meant for?

It creates a small XML fragment with text fragments where the query matches are
marked up.

example:

//element(*, nt:resource)[jcr:contains(., 'peeter')]/rep:excerpt()

on the jcr spec will returns something like:

<excerpt><fragment>Acknowledgements This specification is the collaborative
product of David Nuescheler (specification lead, Day Software),
<highlight>Peeter</highlight> Piegaze (author, Day Software),
and other members of the JSR 170 expert group, including</fragement><excerpt>


Thanks a lot for the explanations.  I have also found this that
provides an explanation:
https://issues.apache.org/jira/browse/JCR-820. My next question would
be: how is the fragment chosen (on what basis is the decission taken
from where to where is the fragment to be returned - or is it the
whole property value?).

bests,

./alex
--
.w( the_mindstorm )p.

regards
  marcel

Reply via email to