Skip to content

Instantly share code, notes, and snippets.

View pdaengeli's full-sized avatar

Peter Daengeli pdaengeli

View GitHub Profile
### Keybase proof
I hereby claim:
* I am pdaengeli on github.
* I am xpd (https://keybase.io/xpd) on keybase.
* I have a public key whose fingerprint is F652 C26B 3148 6E7D 4A15 E976 597A 3BE4 AFD9 09E9
To claim this, I am signing this object:
@pdaengeli
pdaengeli / data.xml
Created March 17, 2016 15:56
ODD/Schematron: testing between files
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="out/myTei.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="out/myTei.rng" type="application/xml"
schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<title>Title</title>
<author>Author</author>
@pdaengeli
pdaengeli / monitoring-conversions.xsl
Last active June 23, 2016 14:42
XSLT: monitoring conversions wrt attributes and unhandled elements
<?xml version="1.0" encoding="UTF-8"?>
<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">
<xsl:template match="/">
<!-- ATTRIBUTES IN USE -->
<xsl:variable name="root-node" select="."/>
<xsl:comment>
@pdaengeli
pdaengeli / tei_custom_attributes.odd
Created March 9, 2017 13:27
Allowing custom attributes in TEI (globally)
<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0"
xml:lang="en">
<teiHeader>
<fileDesc>
<titleStmt>
<title>TEI with custom attributes</title>
</titleStmt>
<publicationStmt>
<publisher></publisher>
@pdaengeli
pdaengeli / biblio-matching.xsl
Created March 12, 2017 12:15
Papyri-WL: fuzzy bibliographic entry matching, taking roman and arabic numerals and differing formatting into account
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:p="http://github.com/pdaengeli"
exclude-result-prefixes="xs"
version="2.0">
<!-- fuzzy bibliographic entry matching, taking roman and arabic numerals and differing formatting into account -->
<xsl:variable name="literature" select="doc('literature.xml')//*:bibl"/>
@pdaengeli
pdaengeli / XProc-Z_localhost.md
Created March 30, 2017 10:01
Getting XProc-Z up and running on localhost (OSX)

Getting XProc-Z up and running on localhost (OSX)

Some things I had to take into account (on OS X v10.11 with JDK 1.8 installed):

Prerequisite: Apache Tomcat

Building XProc-Z

@pdaengeli
pdaengeli / .block
Last active April 2, 2017 21:17
Voronoi Scatterplot with zooming
height: 550
@pdaengeli
pdaengeli / input.txt
Last active June 8, 2017 17:11
Transpose csv style data using XSLT
A1¦A2¦A3¦A4¦A5
B1¦B2¦B3¦B4¦B5
C1¦C2¦C3¦C4¦C5
@pdaengeli
pdaengeli / RenamaUsingFirstRow.xsl
Created July 10, 2017 23:07
Restructure Spreadsheet ML
<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
exclude-result-prefixes="xs xd"
version="2.0">
<xsl:output indent="yes"/>
<xd:doc>
<xd:desc>
@pdaengeli
pdaengeli / 99-bottles-of-beer.xsl
Last active July 26, 2017 21:12
99 bottles of beer
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="https://gist.github.com/pdaengeli/fd9050284a96e5d0aacacf617a8e789c"
exclude-result-prefixes="xs"
version="3.0">
<!-- 99 bottles of beer (http://www.99-bottles-of-beer.net), XSLT 3.0 -->
<!-- https://gist.github.com/pdaengeli/fd9050284a96e5d0aacacf617a8e789c -->