exist-db

FLWOR query in eXist gives: XML Parsing Error: no root element found

陌路散爱 提交于 2021-02-11 15:14:37
问题 I'm looking to adapt the simplest possible FLWOR possible from BaseX to eXist as below. Error in eXist : XML Parsing Error: no root element found Location: http://localhost:8080/exist/rest/db/scripts/notes.xq Line Number 1, Column 1: Query: xquery version "3.0"; for $note in collection("/db/temp/notes") return $note Collection: <notes> <note> foo </note> <note> bar </note> <note> baz </note> </notes> from BaseX : nicholas@mordor:~/basex$ nicholas@mordor:~/basex$ cat notes.xq xquery version "3

Why does Firefox show: XML Parsing Error: junk after document element?

限于喜欢 提交于 2021-02-11 14:22:57
问题 Error: yet from the console, desired output: nicholas@mordor:~$ nicholas@mordor:~$ curl http://localhost:8080/exist/rest/db/scripts/notes.xq <notes> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> <note> foo </note> <note> bar </note> </notes> <notes> <note> foo </note> <note> bar </note> <note> baz </note> </notes>nicholas@mordor:~$ nicholas@mordor:~$ nicholas@mordor:~$ lynx http://localhost:8080/exist/rest/db/scripts

Combine two for loops and union results in XQuery

谁说我不能喝 提交于 2021-02-08 10:01:51
问题 Let's say we have this folders not_my_files collections collection1.xml collection2.xml collection3.xml etc... my_files my_documents mydoc1.xml mydoc2.xml mydoc3.xml etc... There are the structure of xml files collection1.xml (same structure for collection2.xml, collection3.xml, etc...) <collection xml:id="name_of_collection_1"> <ref id="id_of_ref_1"> <title>This is title 1 of first document in this collection</title> </ref> <ref id="id_of_ref_2"> <title>This is title 2 of second document in

How to export XML from a SQLite query to a file with PowerShell?

旧巷老猫 提交于 2020-12-15 03:36:02
问题 Using Linux , getting started with SQLite , PowerShell and xml , and so this question is in that context. How do I nicely export the results below? PS /home/nicholas> PS /home/nicholas> $Database /home/nicholas/sql/covid.db PS /home/nicholas> PS /home/nicholas> $Query select * from labs limit 3 PS /home/nicholas> PS /home/nicholas> Invoke-SqliteQuery -DataSource $Database -Query $Query Date : 1/23/2020 12:00:00 AM Region : BC New_Tests : 2 Total_Tests : 2 Positivity : 0 Turn_Around : 32 Date

Loading and saving text-data of a “plugined” textarea in eXist-db with HTML forms

╄→尐↘猪︶ㄣ 提交于 2020-06-17 10:06:53
问题 My original need was that of getting a plugin (tailwriter) to work with XForms (within eXist-db + XSLTForms), in order to transform textareas into markdown editors. It turned out, however, to be a hard issue to be solved, in reason of the "difficult relations" between the CSSs and JSs used by the plugin and by XSLTForms (overlapping and conflicts). In other words, I couldn't succeed in applying the plugin to any xf:textarea. Therefore I opted for using a simple HTML form. This way I was able

How to pass an HTML widget's value from an HTML form to an Xquery in eXist-db?

会有一股神秘感。 提交于 2020-06-01 05:08:23
问题 In my intention this question represents an universalization of a specific issue indicated in a previous request: see related question (this is why I dare to send a second help request). I still cannot find an answer to the problem of how exacltly an html widget's value could be passed to an Xquery. The specific widget is a textarea, added to an html form (not to an XForm!) by means of the external function, the code of which can be found within the mentioned related question. So, the

eXist-db passing parameters to templates through controller.xql (URL mapping)

岁酱吖の 提交于 2020-01-15 10:00:26
问题 I am working with eXist-db 4.2.1 and Xquery 3.1 using the eXist's default installation of controller.xql and view.xq . I have a document.html to which I pass any incoming url structured with /doc/some-requested-doc-id at the end to produce a dynamically-created page based on some-requested-doc-id . So, the incoming url can be either http://localhost:8080/exist/apps/deheresi/doc/MS609-0001 or http://localhost:8080/exist/apps/deheresi/doc/MS609-0001.xml and they are treated the same... In the

eXist-db passing parameters to templates through controller.xql (URL mapping)

做~自己de王妃 提交于 2020-01-15 10:00:07
问题 I am working with eXist-db 4.2.1 and Xquery 3.1 using the eXist's default installation of controller.xql and view.xq . I have a document.html to which I pass any incoming url structured with /doc/some-requested-doc-id at the end to produce a dynamically-created page based on some-requested-doc-id . So, the incoming url can be either http://localhost:8080/exist/apps/deheresi/doc/MS609-0001 or http://localhost:8080/exist/apps/deheresi/doc/MS609-0001.xml and they are treated the same... In the

eXist-db / XSLT / Saxon collection() slow as molasses (or errors out with memory limit)

泪湿孤枕 提交于 2020-01-06 05:36:08
问题 Coming from this question, I managed one entirely unsatisfactory solution for accessing an eXist-DB collection() from an XSLT 2.0 document loaded from within an eXist-db/Xquery transformation function: The XSLT file declares a variable : <xsl:variable name="coll" select="collection('xmldb:exist:///db/apps/deheresi/data/collection_ms609.xml')"/> This points to a catalog xml file I created (per Saxon documentation) that looks like this, in order to load the actual collection: <collection stable

eXist-db - basic Lucene query returns empty sequence

烈酒焚心 提交于 2019-12-24 11:57:51
问题 In eXist-db 4.4 I am attempting to implement a basic Lucene query structure, but it is returning no results. In /db/apps/deheresi/data I have a collection of tei-xml documents which have the same structure, and I want to apply my query only to the text content found within the element tei:seg and its descendants. A typical sample would be: <TEI> <text> [...] <seg type="dep_event" subtype="event" xml:id="MS609-0001-1"> <pb n="1r"/> <lb break="n" n="1"/> <date type="deposition_date" when="1245