Skip to content

Instantly share code, notes, and snippets.

@kschlottmann
Created January 18, 2019 20:26
Show Gist options
  • Select an option

  • Save kschlottmann/7d1264b89a77c40b5307c472cf133bb4 to your computer and use it in GitHub Desktop.

Select an option

Save kschlottmann/7d1264b89a77c40b5307c472cf133bb4 to your computer and use it in GitHub Desktop.
Sorts file-level EAD c tags alphabetically.
<?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="/">
<xsl:for-each select="c[@level='series']/c[@level='file']">
<xsl:sort select="did/unittitle"/>
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment