Skip to content

Instantly share code, notes, and snippets.

@djbpitt
djbpitt / gist:3e3768364fb9287c6d50241d5b48e6f5
Created November 14, 2024 00:20
Mitford geo info as json
<?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" xpath-default-namespace="http://www.tei-c.org/ns/1.0"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:math="http://www.w3.org/2005/xpath-functions/math" exclude-result-prefixes="#all"
version="3.0">
<xsl:output method="text" indent="yes"/>
<!-- ================================================================= -->
<!-- Stylesheet variables -->
<!-- ================================================================= -->
@djbpitt
djbpitt / mitford-placenames.xsl
Created November 13, 2024 23:23
Mitford placename exploration
<?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" xpath-default-namespace="http://www.tei-c.org/ns/1.0"
xmlns="http://www.w3.org/1999/xhtml" xmlns:math="http://www.w3.org/2005/xpath-functions/math"
exclude-result-prefixes="#all" version="3.0">
<xsl:output method="xhtml" html-version="5" omit-xml-declaration="no" include-content-type="no"
indent="yes"/>
<!-- ================================================================= -->
<!-- Stylesheet variables -->
<!-- ================================================================= -->
@djbpitt
djbpitt / insult-test.sch
Created November 4, 2021 15:25
Schematron validation for order of tokens in attribute value
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2"
xmlns:sqf="http://www.schematron-quickfix.com/validator/process">
<sch:pattern>
<sch:p>Validates the insult types specified in the @type attribute on an &lt;insultStart&gt;
element. The value of @types must be a whitespace-separated token list consisting only
of one or more string tokens ordered as in $types with no other values and no
repetition.</sch:p>
<sch:p>If there are illegal values and the legal values are also in the wrong order, only
the illegal value error is reported. When that has been corrected, revalidation will
@djbpitt
djbpitt / manifest.json
Created May 23, 2019 18:51
Bdinski manifest
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "http://jeffreycwitt.com/custom/manifest",
"@type": "sc:Manifest",
"label": "Manifest for custom",
"description": "Manifest for custom",
"license": "https://creativecommons.org/publicdomain/zero/1.0/",
"sequences": [
{
"@context": "http://iiif.io/api/presentation/2/context.json",