On 2012-05-08, Christian Grün <christian.gr...@gmail.com> wrote: >> Ah, thanks a lot! I would have never guessed this... Maybe the >> documentation should say something like: "Querying across elements is >> only supported when whitespace chopping is off." If it's ok with you, >> I'll add it. > > Thanks; your edits are welcome.
Ok, I'll add this then. >> Another question: The examples in the documentation and the actual >> behavior of BaseX suggest that ft:extract and ft:mark only work for >> queries on a single text node, [...] > > Yes, that's true. In terms of the syntax, a dot (.) may work as well, > if the addressed elements have no more descendant elements, as the > following example shows: > > x.xml: > <x>A</x> > > query: > ft:mark(doc('x.xml')//x[. contains text 'a']) Thanks for the information, that's good to know. I think I'll file an enhancement request then: For text-oriented applications (e.g., TEI documents), it would be extremely useful if ft:mark would work with descendant elements; typically you have lots of mixed content, with elements containing rendering information or annotations, such as <hi>, <orig>, <corr>, <persName>, <placeName>, <handShift>, etc.: These elements don't interrupt the logical text flow. Best regards -- Dr.-Ing. Michael Piotrowski, M.A. <m...@cl.uzh.ch> Institute of Computational Linguistics, University of Zurich Phone +41 44 63-54313 | OpenPGP public key ID 0x1614A044 * OUT NOW: Systems and Frameworks for Computational Morphology * <http://www.springeronline.com/978-3-642-23137-7> _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk