Hi,
I am running this query on my DB in BasexGui. The updates are performed, but the info window shows hit=0 and update=0.
( for $i in db:open('en-us')//p/node()[1] return if ($i instance of text() and normalize-space($i) = '') then replace node $i with '' else (), for $i in db:open('en-us')//p/node()[last()] return if ($i instance of text() and normalize-space($i) = '') then replace node $i with '' else () )
The DB has items like this one:
<td id="j1359186"> <p id="j1360382"> <q id="j1213306">Turn off projector</q> </p> <p id="j1348"><q id="j1158327">Switch off projector</q></p> <p id="j1279295"><q id="j11037">Projector off</q> </p> <p id="j169323"><q id="j147181">Turn projector off</q></p> <p id="j1157299"> <q id="j1277">Deactivate projector</q></p> <p id="j1145358"> <q id="j122584">Disable projector</q> </p> </td>
Hi France,
Thanks for the hint. This was a little bug in the query info output: Empty string replacements were not counted as updates (with "delete node $i", it works). Fixed in the latest snapshot.
Best, Christian
On Wed, Jun 5, 2019 at 11:22 AM France Baril france.baril@architextus.com wrote:
Hi,
I am running this query on my DB in BasexGui. The updates are performed, but the info window shows hit=0 and update=0.
( for $i in db:open('en-us')//p/node()[1] return if ($i instance of text() and normalize-space($i) = '') then replace node $i with '' else (), for $i in db:open('en-us')//p/node()[last()] return if ($i instance of text() and normalize-space($i) = '') then replace node $i with '' else () )
The DB has items like this one:
<td id="j1359186"> <p id="j1360382"> <q id="j1213306">Turn off projector</q> </p> <p id="j1348"><q id="j1158327">Switch off projector</q></p> <p id="j1279295"><q id="j11037">Projector off</q> </p> <p id="j169323"><q id="j147181">Turn projector off</q></p> <p id="j1157299"> <q id="j1277">Deactivate projector</q></p> <p id="j1145358"> <q id="j122584">Disable projector</q> </p> </td>
-- France Baril Architecte documentaire / Documentation architect france.baril@architextus.com
Awesome, thanks!
On Wed, Jun 19, 2019 at 9:31 AM Christian Grün christian.gruen@gmail.com wrote:
Hi France,
Thanks for the hint. This was a little bug in the query info output: Empty string replacements were not counted as updates (with "delete node $i", it works). Fixed in the latest snapshot.
Best, Christian
On Wed, Jun 5, 2019 at 11:22 AM France Baril france.baril@architextus.com wrote:
Hi,
I am running this query on my DB in BasexGui. The updates are performed,
but the info window shows hit=0 and update=0.
( for $i in db:open('en-us')//p/node()[1] return if ($i instance of text() and normalize-space($i) = '') then replace node $i with '' else (), for $i in db:open('en-us')//p/node()[last()] return if ($i instance of text() and normalize-space($i) = '') then replace node $i with '' else () )
The DB has items like this one:
<td id="j1359186"> <p id="j1360382"> <q id="j1213306">Turn off
projector</q> </p>
<p id="j1348"><q id="j1158327">Switch off projector</q></p> <p id="j1279295"><q id="j11037">Projector off</q> </p> <p id="j169323"><q id="j147181">Turn projector off</q></p> <p id="j1157299"> <q id="j1277">Deactivate
projector</q></p>
<p id="j1145358"> <q id="j122584">Disable
projector</q> </p>
</td>
-- France Baril Architecte documentaire / Documentation architect france.baril@architextus.com
basex-talk@mailman.uni-konstanz.de