Skip to content

Instantly share code, notes, and snippets.

View dwcramer's full-sized avatar

David Cramer dwcramer

  • Apple Inc.
  • Austin
View GitHub Profile
@dwcramer
dwcramer / pxp:nvdl output
Last active June 25, 2019 22:58
Output of pxp:nvdl with errors
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step version='1.0' name="main"
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:pxp="http://exproc.org/proposed/steps"
xmlns:ex="http://xproc.org/ns/xproc/ex">
<!-- Always include this to ward off evil -->
<p:import href="http://xmlcalabash.com/extension/steps/library-1.0.xpl"/>
<p:input port="source">
@dwcramer
dwcramer / dialog.png
Last active September 11, 2018 18:20
Nice oxygen dialog
dialog.png
@dwcramer
dwcramer / 1) Output
Last active April 17, 2018 20:11
Loading collection() from a second document provided on the input port to an xslt
dcramer@anatine-2 ~/Downloads/load-xinclude
$ /Applications/xmlcalabash-1.1.20-98/calabash -i ./book.xml load-xinclude.xpl
<wrapper xmlns:c="http://www.w3.org/ns/xproc-step"><loadme.xml><book xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<title>test</title>
<chapter version="5.0" xml:base="file:/Users/dcramer/Downloads/load-xinclude/chapter.xml">
<title>Chapter</title>
<para>Ipsum</para>
</chapter>
<glossary role="auto"/>
</book></loadme.xml><glossary.xml><glossary xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
@dwcramer
dwcramer / Oxygen-Error-Dialog.png
Last active January 16, 2018 15:36
Oxygen insert row bug
Oxygen-Error-Dialog.png
@dwcramer
dwcramer / load-xinclude.xpl
Last active November 17, 2017 21:33
Sample Pipeline to test Calabash's caching of loaded source (assumes a loadme.xml that contains a valid xi:include element)
<?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" name="main">
<p:input port="source">
<p:inline>
<doc>Hello world!</doc>
</p:inline>
</p:input>
<p:output port="result">
<p:pipe port="result" step="test"/>
@dwcramer
dwcramer / 1-Sample Output
Last active October 15, 2017 19:20
XProc Preprocessing Parameters Example
dcramer@Anatine ~
$ /Applications/xmlcalabash-1.1.16-97/calabash -pgen.summary.tables='0' -pfoo='' Documents/git-repos/xproc-param-example/pipeline.xpl
INFO : Documents/git-repos/xproc-param-example/library.xpl:49:42:
Incoming Parameters:
<c:param-set xmlns:c="http://www.w3.org/ns/xproc-step">
<c:param name="gen.summary.tables" namespace="" value="0"/>
<c:param name="foo" namespace="" value=""/>
</c:param-set>
@dwcramer
dwcramer / DeltaXML-table-fixes.xsl
Last active October 11, 2017 20:36
Fixup of DocBook CALS tables to make DeltaXML happy
<?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="http://docbook.org/ns/docbook"
xmlns:db="http://docbook.org/ns/docbook"
exclude-result-prefixes="xs db"
version="2.0">
<!--
DeltaXML is much better at diffing tables if the following things are true:
@dwcramer
dwcramer / Simple xslt
Last active December 26, 2015 04:08
Simple xslt that does an identity copy but removes one element.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
@dwcramer
dwcramer / logabuglinktest
Last active December 23, 2015 10:59
Log a bug link experiements
<a id="logABugLink" href="">Log a bug</a>
<script language="JavaScript">
var bugTitle = "4.1. Simplicity in Cloud Files™ Introduction - API v1";
var buildTime = "Built 20130918T23 04 24Z05 00"
var docUrl = "at url " + window.location.pathname;
var gitSha = "git SHA a997cbc1" ;
var gitRepo = "git Repo git@github.rackspace.com:IX/cloud-files.git ";
var lineFeed = "%0A";
<!-- + lineFeed + encodeURI(gitRepo) -->
<xi:include
href="../install-guide/basic-install-files/basic-install_architecture.xml"
xpointer="xmlns(db=http://docbook.org/ns/docbook)
xpath(/*/*[not(self::db:title)])">
<xi:fallback/>
</xi:include>