Skip to content

Instantly share code, notes, and snippets.

View gimsieke's full-sized avatar

Gerrit Imsieke gimsieke

View GitHub Profile

Keybase proof

I hereby claim:

  • I am gimsieke on github.
  • I am gimsieke (https://keybase.io/gimsieke) on keybase.
  • I have a public key whose fingerprint is 7A3A 7FDF 14F5 9A36 4237 313A D295 2E2E E987 232E

To claim this, I am signing this object:

<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
xmlns:pxp="http://exproc.org/proposed/steps"
version="1.0"
name="xsl-to-zip"
exclude-inline-prefixes="#all">
<p:documentation>Store XSLT transformation results in a zip file.
@gimsieke
gimsieke / gist:3846098
Created October 6, 2012 20:58
IDML madness
<!-- Remove a Br at the end of a story, a footnote, or a table cell (with no content after it).
These Brs have been inserted in the previous pass, after each paragraph, and they should
be removed as they insert additional and unwanted empty lines.
Ok, the pattern's predicate looks weird. Suggestions on how to simplify it? -->
<xsl:template mode="xml2idml:storify_content-n-cleanup"
match="Br[for $scoper in ancestor::*[idml2xml:is-scope-origin(.)][1]
(: a let statement might come in handy here – if only for the sake of syntactic sweetness :)
return
current() is (
$scoper//*[name() = $idml2xml:idml-scope-terminal-names]
@gimsieke
gimsieke / dtdanalyzer
Created November 3, 2012 14:20
dtdanalyzer frontend script for Cygwin + Windows Java
#!/bin/bash
cygwin=false;
case "`uname`" in
CYGWIN*) cygwin=true;
esac
# Figure out DTDANALYZER_HOME, which is the directory in which this script
# resides.
DTDANALYZER_HOME="$( cd -P "$(dirname $( readlink -f "${BASH_SOURCE[0]}" ))" && pwd )"
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
xmlns:pxp="http://exproc.org/proposed/steps"
version="1.0"
name="zip-info"
exclude-inline-prefixes="#all">
<p:documentation>Get zip file info.
\documentclass{scrbook}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage[ngerman]{babel}
\begin{document}
\begin{align*}
\left (x+\alpha \right )^{n}&=\sum _{k=0}^{n} \binom{n}{k} x^{k}\alpha ^{n-k} \\
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0">
<p:documentation>Checks the availability of a resource given in the href option.
URL that works (HTTP status 200): http://www.le-tex.de/
URL that is unavailable (404): http://www.le-tex.de/foo
<?xml version="1.0" encoding="UTF-8"?>
<c:param-set xmlns:c="http://www.w3.org/ns/xproc-step">
<c:param name="_params-from-filename-parsing"
value="base=CSMI_2014_701 ext=docx journal=CSMI ms=CSMI_2014_701 publisher=ulsp"/>
<c:param name="_params-given"
value="base=CSMI_2014_701 ext=docx journal=CSMI ms=CSMI_2014_701 publisher=ulsp"/>
<c:param name="_params-given-in-clades-string" value=""/>
<c:param name="basename" value="CSMI_2014_701"/>
<c:param name="debug" value="'no'"/>
<c:param name="debug-dir-uri" value="debug"/>
<?xml version="1.0"?>
<!-- Sample output for the patched jing of https://github.com/transpect/rng-extension/
Invocation (using an example in http://transpect.github.io/tutorial.html):
calabash/calabash.sh -o result=rng-errors-with-xpaths.xml \
-i source=debug/hub2bits/20.clean-up.xml
-i schema=schema/jats/archiving/1.0/rng/JATS-archivearticle1.rng
calabash/extensions/transpect/rng-extension/xpl/rng-validate.xpl
In order to use it, either check out that project or, if you only need Calabash with
the patched jing:
git clone https://github.com/transpect/calabash-frontend.git --recursive
<?xml version="1.0" encoding="UTF-8"?>
<css xmlns="http://www.w3.org/1996/css"
xmlns:xslout="bogo"
xmlns:tr="http://transpect.io"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:css="http://www.w3.org/1996/css"
xml:base="file:/C:/cygwin/home/gerrit/XML/Prague/2016/transpect-tutorial/content/ulsp/Test/Test_2014_701/docx/Test_2014_701.xhtml">
<ruleset origin="file:///C:/cygwin/home/gerrit/XML/Prague/2016/transpect-tutorial/docx2jats-demo/a9s/common/css/overrides.css">
<raw-css>.inline-title{ margin-right: 20px; font-style: italic; color: gray; margin-left: 0; }</raw-css>
<selector raw-selector=".inline-title" priority="0,0,1,0" position="1">*[matches(@class,'(^|\s)inline-title(\s|$)')]</selector>