Skip to content

Instantly share code, notes, and snippets.

View dmj's full-sized avatar

David Maus dmj

View GitHub Profile
This file has been truncated, but you can view the full file.
<collection xmlns="http://www.loc.gov/MARC21/slim">
<record>
<leader>00770ncm a2200169Ia 4500</leader>
<controlfield tag="008">190522s9999||||fr |||||||||||||| | und||</controlfield>
<datafield tag="024" ind1="2" ind2="_">
<subfield code="a"> 979-0-2325-0608-1</subfield>
</datafield>
<datafield tag="040" ind1="#" ind2="#">
<subfield code="a"> BabelScores</subfield>
<subfield code="c">BabelScores </subfield>
@dmj
dmj / hytext.el
Created November 3, 2019 09:23
hytext.el
;;; hytext.el --- Global hypertext functionality for GNU Emacsen
;;; Commentary:
;;
;;; Code:
(defvar hytext-action-alist nil)
(define-minor-mode hytext-mode
@dmj
dmj / merge-siblings
Created August 29, 2019 06:16
Merge siblings
<xsl:transform version="2.0"
xmlns:fn="tag:[email protected],2019:merge-siblings"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:function name="fn:sibling-group-key" as="xs:string">
<xsl:param name="node" as="node()"/>
<xsl:value-of select="generate-id(fn:sibling-group($node)[1])"/>
@dmj
dmj / gist:2052c437dfb36ba61ef4e6c4628a2988
Created August 19, 2019 12:47
Personenregistereintrag auf Grundlage der GND Entityfacs
<xsl:transform version="3.0"
expand-text="yes"
xmlns="http://www.tei-c.org/ns/1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes"/>
<xsl:variable name="gndId" select="'11855140X'"/>
<xsl:template name="main">
@dmj
dmj / beispiel.xpl
Created July 9, 2019 08:43
Serialize secondary result port in p:xslt
<p:declare-step name="main" version="1.0"
xmlns:p="http://www.w3.org/ns/xproc">
<p:xslt name="transformation">
<p:input port="stylesheet">
<p:document href="beispiel.xsl"/>
</p:input>
<p:input port="source">
<p:inline>
<document/>

Keybase proof

I hereby claim:

  • I am dmj on github.
  • I am dmaus (https://keybase.io/dmaus) on keybase.
  • I have a public key whose fingerprint is 5BB5 786F 7B4B CECA DC69 70D9 292E B8E5 68C7 E0C9

To claim this, I am signing this object:

@dmj
dmj / emoji.xml
Created December 4, 2018 09:27
Schematron assertion: Text contains characters with Emoji presentation as default
<report xmlns="http://purl.oclc.org/dsdl/schematron" test="matches(., '[&#x231A;-&#x231B;]|[&#x23E9;-&#x23EC;]|[&#x23F0;]|[&#x23F3;]|[&#x25FD;-&#x25FE;]|[&#x2614;-&#x2615;]|[&#x2648;-&#x2653;]|[&#x267F;]|[&#x2693;]|[&#x26A1;]|[&#x26AA;-&#x26AB;]|[&#x26BD;-&#x26BE;]|[&#x26C4;-&#x26C5;]|[&#x26CE;]|[&#x26D4;]|[&#x26EA;]|[&#x26F2;-&#x26F3;]|[&#x26F5;]|[&#x26FA;]|[&#x26FD;]|[&#x2705;]|[&#x270A;-&#x270B;]|[&#x2728;]|[&#x274C;]|[&#x274E;]|[&#x2753;-&#x2755;]|[&#x2757;]|[&#x2795;-&#x2797;]|[&#x27B0;]|[&#x27BF;]|[&#x2B1B;-&#x2B1C;]|[&#x2B50;]|[&#x2B55;]|[&#x1F004;]|[&#x1F0CF;]|[&#x1F18E;]|[&#x1F191;-&#x1F19A;]|[&#x1F1E6;-&#x1F1FF;]|[&#x1F201;]|[&#x1F21A;]|[&#x1F22F;]|[&#x1F232;-&#x1F236;]|[&#x1F238;-&#x1F23A;]|[&#x1F250;-&#x1F251;]|[&#x1F300;-&#x1F320;]|[&#x1F32D;-&#x1F32F;]|[&#x1F330;-&#x1F335;]|[&#x1F337;-&#x1F37C;]|[&#x1F37E;-&#x1F37F;]|[&#x1F380;-&#x1F393;]|[&#x1F3A0;-&#x1F3C4;]|[&#x1F3C5;]|[&#x1F3C6;-&#x1F3CA;]|[&#x1F3CF;-&#x1F3D3;]|[&#x1F3E0;-&#x1F3F0;]|[&#x1F3F4;]|[&#x1F3F8;-&#x1F3FF;]|[&#x1F400;-&#x1F43E;]|[&#
@dmj
dmj / rfc6901.xml
Created November 14, 2018 07:49
JSON-Pointer over canonical XML representation of JSON (just for the fun of it)
<json:map xmlns:json="http://www.w3.org/2005/xpath-functions">
<json:array key="foo">
<json:string>bar</json:string>
<json:string>baz</json:string>
</json:array>
<json:number key="">0</json:number>
<json:number key="a/b">1</json:number>
<json:number key="c%d">2</json:number>
<json:number key="e^f">3</json:number>
<json:number key="g|h">4</json:number>
@dmj
dmj / iiif.xsl
Last active October 22, 2020 10:34
DFG-Viewer METS nach IIIF
<xsl:transform version="3.0" expand-text="true"
xmlns:json="http://www.w3.org/2005/xpath-functions"
xmlns:mets="http://www.loc.gov/METS/"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:mode on-no-match="shallow-skip"/>
<xsl:output indent="true"/>
@dmj
dmj / image-api.json
Created August 21, 2018 13:15
Schema for the IIIF Image API image information metadata
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "IIIF Image API 2.1",
"description": "Schema for the IIIF Image API image information metadata",
"definitions": {
"attribution": {
"oneOf": [
{
"type": "array",
"items": {