lujie wrote:
  I have such node structure:
  document
     --content
        --attachment
  if i want to get excerpt for attachment and at the sametime get the
document node,i 'm using
  //element(*,document)[jcr:contains(content/attachment,'test
content')]/rep:excerpt(.)
 but getting empty excerpt.
 Any ideas?

that's currently not properly supported but there's some kind of a 'hidden' feature in the query result implementation. even though the query selects the current node in rep:excerpt(.) you can also retrieve excerpts for descendant items:

QueryResult result = ...;
RowIterator rows = result.getRows();
while (rows.hasNext()) {
  rows.nextRow().getValue("rep:excerpt(content/attachement)").getString();
}

regards
 marcel

Reply via email to