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
xquery version "3.0"; | |
sm:chmod(xs:anyURI('/db/apps/srophe-data/git-sync.xql'), "rwsr-xr-x") |
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
xquery version "3.0"; | |
import module namespace functx="http://www.functx.com"; | |
declare namespace tei = "http://www.tei-c.org/ns/1.0"; | |
declare namespace fn="http://www.w3.org/2005/xpath-functions"; | |
for $b in collection('/db/apps/srophe-data/data/spear/tei')//tei:TEI | |
let $id := substring-before($b/descendant::tei:idno[starts-with(.,'http://syriaca.org/')],'/tei') | |
return | |
for $div at $pos in $b/descendant::tei:body/tei:div |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<root> | |
<row> | |
<BHS>1</BHS> | |
<French_Prologue>On nous a réclamé de raconter l’histoire des amis du Christ, et nous n’avons pas assez de force pour nous acquitter de ce qui nous a été réclamé, car la petitesse est notre mesure…</French_Prologue> | |
<Text_French_Title>Pierre, apôtre</Text_French_Title> | |
</row> | |
<row> | |
<BHS>2</BHS> | |
<French_Prologue>Venons-en donc à l’histoire des hauts faits du bienheureux Paul, lui qui, plus que tous, peina comme parole de l’Esprit qui parla en lui; il acheva sa course, garda son ministère, et pour notre Seigneur Jésus-Christ, il répandit la libation de son sang en vue de réconcilier son troupeau…</French_Prologue> |
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
xquery version "3.0"; | |
(:~ | |
: POC: Migrate bitbucket issues to github repository, run in eXistdb 2.2 | |
: Prerequisites: | |
: In order to run the module, you will need a github Authorization token. | |
: When you create authorization token your OAuth Scope will need to include repo, allowing you to update files. | |
: @see https://github.com/blog/1509-personal-api-tokens | |
: | |
: Github API Steps for migrating issues: | |
: 1. Get BitBucket JSON output, serialize as xml |
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
xquery version "3.0"; | |
declare namespace tei = "http://www.tei-c.org/ns/1.0"; | |
declare namespace fn="http://www.w3.org/2005/xpath-functions"; | |
(: | |
: A simple addaptation of @joewiz highlight-match.xql [https://gist.github.com/joewiz/5937897] for POC of simple NER based on predefined list. | |
: Allow placeName recognition against a pre determined list of names, in this case uses place names in https://github.com/srophe/srophe-app-data | |
: Names a wrapped in a placeName tag with a @ref attribute linking them to the authority record in https://github.com/srophe/srophe-app-data | |
:) |
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
xquery version "3.0"; | |
(:~ | |
: POC: eXist DB module to commit files to github reop via github API | |
: Prerequisites: | |
: In order to run the module, you will need a github Authorization token. | |
: When you create authorization token your OAuth Scope will need to include repo, allowing you to update files. | |
: @see https://github.com/blog/1509-personal-api-tokens | |
: | |
: @Notes |
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
xquery version "1.0"; | |
declare namespace tei="http://www.tei-c.org/ns/1.0"; | |
<root> | |
{ | |
( | |
for $place in collection('/db/apps/srophe-data/data/places/tei')//tei:place[tei:placeName[matches(@xml:lang, '^syr')]] | |
let $id := $place/tei:idno[starts-with(.,'http://syriaca.org/')]/text() | |
return | |
<row> |
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
xquery version "3.0"; | |
import module namespace functx="http://www.functx.com"; | |
declare namespace tei = "http://www.tei-c.org/ns/1.0"; | |
(: Add correct padding to dates. :) | |
declare function local:fix-dates($date as xs:string){ | |
let $plain-date := if(starts-with($date,'-')) then substring($date,2) else $date | |
let $add-padding := | |
if(contains($plain-date,'-')) then | |
let $year := functx:pad-integer-to-length(xs:integer(tokenize($plain-date,'-')[1]),4) |
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
xquery version "3.0"; | |
(:~ | |
: POC: eXist DB module to commit files to github reop via github API | |
: Prerequisites: | |
: In order to run the module, you will need a github Authorization token. | |
: When you create authorization token your OAuth Scope will need to include repo, allowing you to update files. | |
: @see https://github.com/blog/1509-personal-api-tokens | |
: | |
: @Notes |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> | |
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" | |
schematypens="http://purl.oclc.org/dsdl/schematron"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0" xmlns:syriaca="http://syriaca.org" | |
xmlns:saxon="http://saxon.sf.net/" xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" xmlns:functx="http://www.functx.com"> | |
<xsl:output encoding="UTF-8" indent="yes" method="xml" name="xml" /> |