Skip to content

Instantly share code, notes, and snippets.

@davidamichelson
davidamichelson / 13.1 TEI Date format for Record 13
Last active August 29, 2015 13:56
Comparing TEI and MADS date formats
<birth when="0306" source="#bib13-11">0306</birth>
<death when="0373" source="#bib13-1">373</death>
declare default element namespace "http://www.tei-c.org/ns/1.0";
(: Which scene does each actor appear in?
Group by actor ($person)
Variable bound to scene, do not group
:)
for $scene in //div2[@type="scene"]
for $speech in $scene//sp
for $whoville in $speech//*[@who]
@davidamichelson
davidamichelson / gist:d2dd0a0a8feea13041e0
Created September 5, 2014 18:51
Update to Persons from GESDH Abstracts
xquery version "3.0";
declare namespace tei="http://www.tei-c.org/ns/1.0";
for $abstracts in doc('/db/apps/persons/data/working-files/gedsh-abstracts-in-correction-20140729.xml')//row[Type='person']
let $id := concat('person-',$abstracts/SRP_ID[1]/text())
let $abstract-text := $abstracts/Abstract
let $note := $abstracts/Not_Useful/text()
let $auth := $abstracts/Author/text()
let $title := $abstracts/Headword/text()
xquery version "1.0";
declare namespace tei="http://www.tei-c.org/ns/1.0";
let $langs := ("syr", "syr-Syrn", "syr-Syrj", "en", "en-x-gedsh")
let $doc := fn:doc("13.xml")
for $person in $doc//tei:person
let $uri := $doc//tei:person//tei:idno/text()
for $name in $person/tei:persName
let $names := $name//text()[. = normalize-space(.)]
let $lang :=$name/@xml:lang/string()
xquery version "3.0";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
for $node in doc("/Users/davidmichelson/GitHub Repositories/srophe/draft-data/data/works/Zanetti_XSL_Conversion/ZanettiBiblFull.xml")//tei:bibl/text()
return analyze-string($node
, "[,]*\s*[p]\.(\s)*\w*[-]*\w*.*$")
@davidamichelson
davidamichelson / VoID
Created February 2, 2016 17:52 — forked from suellenstringer-hye/VoID
VoID file
@prefix : <http://syriaca.org/terms> .
#we need to make the above namespace
@prefix void: <http://rdfs.org/ns/void#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
:my-dataset a void:Dataset;
dcterms:title "The Syriac Gazetteer";
dcterms:publisher "Syriaca.org: The Syriac Reference Portal";
foaf:homepage <https://syriaca.org/>;
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://syriaca.org/documentation/syriaca-tei-main.rnc" type="application/relax-ng-compact-syntax"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:functx="http://www.functx.com" xmlns:saxon="http://saxon.sf.net/" xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" xml:lang="en">
<teiHeader>
<fileDesc>
<titleStmt>
<title level="a" xml:lang="en">Shemʿon bar Ṣabbaʿe — <foreign xml:lang="syr">ܫܡܥܘܢ ܒܪ ܨܒܥ̈ܐ</foreign></title>
<!-- note, title level="a" etc. is the only node here that should differ, I would assume, all the rest should be the same for all merged docs -->
<title level="m">A Guide to Syriac Authors</title>
<title level="m">Qadishe: A Guide to the Syriac Saints</title>
xquery version "3.0";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
for $doc in fn:collection("/db/apps/incomplete-saints")//tei:TEI
let $abstract := $doc//tei:note[@type='abstract']
let $uri := $doc//tei:publicationStmt//tei:idno[@type="URI"]
let $name := $doc//tei:persName[@xml:lang="en"]
return
, Australian Early Medieval Association Journal
'Die Personennamen in den Akten der edessenischen Märtyrer Šarbēl und Bar Sāmyā'
"A Newly Discovered Wall Painting in the Church of Mar Giworgis in Qaraqosh, Iraq"
"Abgar"
"Bar 'Eta"
"Barsamyā, Märtyrer in Edessa"
"Children as Pilgrims and the Cult of the Holy Children in the Early Syriac Tradition: The Cases of Theodoret of Cyrrhus and the Child-Martyrs Behnām, Sarah, and Cyriacus"
"Christlicher Heiligenkult im Umkreis eines sassanidischen
"Commemoraisons"
"Die Legende von Mar Behnam"
A. Amore/M. Chiara Celletti
A. Harrak
A. Moreschini
A. Scheil
A. van Lantschoot
A. Vööbus
A.E. Look
Assemani
Barsaum
Bas Snelders