Am 26.02.2019 um 07:54 schrieb Mark Bordelon:
But I have a question about some behavior I am seeing in the *following-sibling* axis that does not seem logical to me.
Here is the data stored in basex:
xquery /text[@id='test']
<text id="test"> <clause> <word>A</word>a <word>B</word> <word>C</word>c </clause> </text>
Here is the query on that data:
*xquery /text[@id='test']//word/concat(text(), ' ',
normalize-space(./following-sibling::text()[1]))* A a B *c* C c
I think the result you get is caused by whitespace chopping during XML parsing, seems to be the default, see http://docs.basex.org/wiki/Command-Line_Options
|-w| Toggles whitespace chopping of XML text nodes. By default, whitespaces will be chopped.