Skip to content

Instantly share code, notes, and snippets.

View gimsieke's full-sized avatar

Gerrit Imsieke gimsieke

View GitHub Profile
@gimsieke
gimsieke / in.xml
Created February 1, 2022 21:35
JATS page numbers
<body>
<sec>
<title><target id="p-3"/>Title<fn>
<p>Footnote, <target id="fnp-4"/>continued</p>
</fn></title>
<p>Text<fn>
<p>Second footnote</p>
</fn>
<target id="p-4"/>flow<fn>
<p>Next footnote</p>
@gimsieke
gimsieke / invocation.sh
Created September 18, 2022 16:28
REx EBNF for a parsing problem presented by Martynas Jusevičius on the xml.com slack
# Go to https://bottlecaps.de/rex/ and use this command line on nested-parentheses.ebnf: -xslt -main -tree -ll 3 -backtrack
# Assumption: A Saxon front-end script called 'saxon' is on the path
saxon -o:out.xml -it:main -xsl:nested-parentheses.xslt input='{(((40 40, 20 45, 45 30, 40 40)), ((20 35, 10 30, 10 10, 30 5, 45 20, 20 35), (30 20, 20 15, 20 25, 30 20)))}' '!indent=yes'
# Looking at the main template of the generated XSLT, you need to surround the input string with curly braces; otherweise it will be interpreted as a file name