From: Michael B. <mbe...@mb...> - 2004-12-14 10:10:45
|
Bruno Chatel wrote: [...] > > (document('/db/bv/rules/en_03/doc/n00010001000100020004.xml')/dy:fragment/dy :content//(RREQ) [. &= 'bulk' and not (. &= > 'carrier*')]/ancestor::dy:fragment)[1] > > The problem is that in the returned XML, the exist:match are lost... > I try with the root function and the result is the same. > > Is it a normal behavior ? I would have thought so. As I understand it, eXist match-tags those elements (or if so configured, attribute values) where the value(s) matched by its fulltext index lookups are actually returned as part of the result. However, in your query the actual index matches aren't returned as matches at all: they occur in predicate expressions which the XPath engine evaluates as Boolean values before filtering the intial result set accordingly. Consequently there is nothing in the returned results that could be match-tagged using eXist's internal mechanism. Looks like a case for piping the result through XSLT to me... Michael Beddow |