On Thu, Feb 11, 2010 at 2:00 AM, Christian Grün
<christian.gruen@gmail.com> wrote:
..but to really get equivalent results, you should go along with:
b) //SPEECH[ .//text() contains text "romeo"][ .//text() contains text "juliet"]
OK, thanks, Christian, but:
1) I suspect that programmers in XQuery FT will not like to rewrite their query until it works.
2) There are some cases when you cannot rewrite. For example imagine you have a paragraph like that:
<p>This is a really <b>strong</b> statement!</p>
and that the query is:
//p[ . contains text "really strong statement"]
I don't see a way to rewrite using text() so that it works in the general case.
And from what I understand of XQuery FT, that query should work in any implementation.
I have the feeling that currently, BaseX cannot match a FT query accross several text() nodes,
am I wrong?
This might be due to the phenomena of node atomization, which is
handled differently by all implementations. The following query..
<xml>A<x>B</x></xml> contains text 'A'
..returns "false" in BaseX, whereas other implementations might return
"true", if "A" and "B" are handles as two independent tokens. If you
apply query b) above, you might get the results you are expecting.
Sorry, I am confused. Why do you speak of 'atomization' ?
I really think that all implementations should recognize "romeo" and "juliet" as independent words
in Shakespeare's plays...
mit besten Grüßen