Created
August 1, 2019 17:31
-
-
Save jonbitgood/d3eac3aa9dc25a1413cebf1c437b93ec to your computer and use it in GitHub Desktop.
XSLT for USX 3.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output indent="yes" /> | |
<xsl:strip-space elements="*" /> | |
<xsl:template match="usx"> | |
<html> | |
<head> | |
<meta content="utf-8" /> | |
<link rel="stylesheet" href="bible.css" /> | |
</head> | |
<body> | |
<main><xsl:apply-templates /></main> | |
</body> | |
</html> | |
</xsl:template> | |
<xsl:template match="para[@style='rem']|para[@style='ide']|verse[@eid]"></xsl:template> | |
<xsl:template match="para"> | |
<p><xsl:apply-templates select="@*|node()" /></p> | |
</xsl:template> | |
<xsl:template match="char"> | |
<em><xsl:apply-templates select="@*|node()" /></em> | |
</xsl:template> | |
<xsl:template match="note"> | |
<span class="note"><xsl:apply-templates select="@*|node()" /></span> | |
</xsl:template> | |
<xsl:template match="chapter"> | |
<b class="c"><xsl:value-of select="@number" /></b> | |
</xsl:template> | |
<xsl:template match="verse[@sid]"> | |
<sup class="verse"><xsl:value-of select="@number" /></sup> | |
</xsl:template> | |
<xsl:template match="book"> | |
<div> | |
<xsl:attribute name="id"> | |
<xsl:value-of select="@code" /> | |
</xsl:attribute> | |
</div> | |
</xsl:template> | |
<xsl:template match="@*|node()"> | |
<xsl:copy><xsl:apply-templates select="@*|node()" /></xsl:copy> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment