-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
100 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<package xmlns="http://expath.org/ns/pkg" name="http://syriac-corpus.org/syriac-corpus" abbrev="syriac-corpus" version="3.00" spec="1.0"> | ||
<package xmlns="http://expath.org/ns/pkg" name="http://syriac-corpus.org/syriac-corpus" abbrev="syriac-corpus" version="3.15" spec="1.0"> | ||
<title>Digital Syriac Corpus</title> | ||
<!-- TEI data --> | ||
<dependency package="http://syriac-corpus.org/syriaca-corpus-data"/> | ||
<!-- eXist shared resources --> | ||
<dependency package="http://exist-db.org/apps/shared"/> | ||
<!-- JSON Parser and Serializer for XQuery --> | ||
<dependency package="http://xqilla.sourceforge.net/pkg/xqjson"/> | ||
<!-- Functx --> | ||
<dependency package="http://www.functx.com"/> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
xquery version "3.0"; | ||
xquery version "3.1"; | ||
|
||
import module namespace http="http://expath.org/ns/http-client"; | ||
|
||
(: | ||
: Take posted SPARQL query and send it to Syriaca.org sparql endpoint | ||
(:~ | ||
: Take posted SPARQL query and send it to the Syriaca.org SPARQL endpoint | ||
: Returns JSON | ||
: This will hopefully get around the javascript issues with http/https and same origin. | ||
:) | ||
let $query := if(request:get-parameter('query', '')) then request:get-parameter('query', '') | ||
else if(not(empty(request:get-data()))) then request:get-data() | ||
else () | ||
let $subject-sparql-results := | ||
let $query := | ||
if(request:get-parameter('query', '')) then request:get-parameter('query', '') | ||
else if(not(empty(request:get-data()))) then request:get-data() | ||
else () | ||
let $results := | ||
try{ | ||
util:base64-decode(http:send-request(<http:request href="http://wwwb.library.vanderbilt.edu/exist/apps/srophe/api/sparql?format=json&query={fn:encode-for-uri($query)}" method="get"/>)[2]) | ||
} catch * {<error>Caught error {$err:code}: {$err:description}</error>} | ||
|
||
return (response:set-header("Content-Type", "application/json"),$subject-sparql-results) | ||
if($query != '') then | ||
util:base64-decode(http:send-request(<http:request href="http://wwwb.library.vanderbilt.edu/exist/apps/srophe/api/sparql?format=json&query={fn:encode-for-uri($query)}" method="get"/>)[2]) | ||
else <message>No query data</message> | ||
} catch * { | ||
<error>Caught error {$err:code}: {$err:description}</error> | ||
} | ||
return (response:set-header("Content-Type", "application/json"), $results) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters