jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Fwd: [jira] Created: (JCR-859) rep:excerpt() may return malformed XML
Date Wed, 25 Apr 2007 08:10:47 GMT
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.


//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>


View raw message