как отправить результаты FLOWR обратно на basex? - PullRequest
0 голосов
/ 07 октября 2019

Как можно передать результаты обратно в basex для простого запроса:

<new_catalog>{
let $db := db:open("books")
for $x in $db/catalog/book
return <new_book>{$x/title,$x/author}</new_book>
}</new_catalog>

results:

thufir@dur:~/basex/microsoft$ 
thufir@dur:~/basex/microsoft$ basex new_catalog.xq 
<new_catalog>
  <new_book>
    <title>XML Developer's Guide</title>
    <author>Gambardella, Matthew</author>
  </new_book>
  <new_book>
    <title>Midnight Rain</title>
    <author>Ralls, Kim</author>
  </new_book>
  <new_book>
    <title>Maeve Ascendant</title>
    <author>Corets, Eva</author>
  </new_book>
  <new_book>
    <title>Oberon's Legacy</title>
    <author>Corets, Eva</author>
  </new_book>
  <new_book>
    <title>The Sundered Grail</title>
    <author>Corets, Eva</author>
  </new_book>
  <new_book>
    <title>Lover Birds</title>
    <author>Randall, Cynthia</author>
  </new_book>
  <new_book>
    <title>Splish Splash</title>
    <author>Thurman, Paula</author>
  </new_book>
  <new_book>
    <title>Creepy Crawlies</title>
    <author>Knorr, Stefan</author>
  </new_book>
  <new_book>
    <title>Paradox Lost</title>
    <author>Kress, Peter</author>
  </new_book>
  <new_book>
    <title>Microsoft .NET: The Programming Bible</title>
    <author>O'Brien, Tim</author>
  </new_book>
  <new_book>
    <title>MSXML3: A Comprehensive Guide</title>
    <author>O'Brien, Tim</author>
  </new_book>
  <new_book>
    <title>Visual Studio 7: A Comprehensive Guide</title>
    <author>Galos, Mike</author>
  </new_book>
</new_catalog>thufir@dur:~/basex/microsoft$ 
thufir@dur:~/basex/microsoft$ 

from:

https://stackoverflow.com/a/58269488/262852

...