|
@@ -14,128 +14,101 @@ All rights reserved.
|
|
|
doctype-public="-//W3C/DTD XHTML 1.0 Strict//EN"
|
|
|
indent="yes"/>
|
|
|
|
|
|
- <xsl:template match="/*">
|
|
|
+ <!-- This is an identity template - it copies everything
|
|
|
+ that doesn't match another template -->
|
|
|
+ <xsl:template match="@* | node()">
|
|
|
+ <xsl:copy>
|
|
|
+ <xsl:apply-templates select="@* | node()"/>
|
|
|
+ </xsl:copy>
|
|
|
+ </xsl:template>
|
|
|
+ <xsl:template match="processing-instruction()">
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template match="//xhtml:div[@id='xmldata']/*">
|
|
|
<xsl:variable name="schema" select="//xsd:schema"/>
|
|
|
<xsl:variable name="tabletypename"
|
|
|
select="$schema/xsd:element[@name=name(current())]/@type"/>
|
|
|
<xsl:variable name="rowtypename"
|
|
|
select="$schema/xsd:complexType[@name=$tabletypename]/xsd:sequence/xsd:element[@name='row']/@type"/>
|
|
|
+
|
|
|
+ <table class="pure-table pure-table-bordered pure-table-striped">
|
|
|
+ <tr style="text-transform: capitalize">
|
|
|
+ <xsl:for-each select="$schema/xsd:complexType[@name=$rowtypename]/xsd:sequence/xsd:element/@name">
|
|
|
+ <xsl:variable name="elementtype"
|
|
|
+ select="."/>
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="$elementtype = 'txt'">
|
|
|
+ <th class="opt-all">Text</th>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:when test="$elementtype = 'category'">
|
|
|
+ <th class="opt-all">Section</th>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:when test="$elementtype = 'translation'">
|
|
|
+ <th class="opt-md opt-lg opt-xl opt-xxl">Reference</th>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:for-each>
|
|
|
+ </tr>
|
|
|
|
|
|
- <html>
|
|
|
- <head>
|
|
|
- <title>{{title}}</title>
|
|
|
- <meta name="description" content="Generate a template prayer following the form of the model prayer outlined in Matthew 6:9‑13 and Luke 11:2‑4"/>
|
|
|
- <meta name="keywords" content="Bible, Prayer, Generator, SWORD"/>
|
|
|
- <meta name="author" content="Daniel Sheffield"/>
|
|
|
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
|
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@2.1.0/build/pure-min.css" integrity="sha384-yHIFVG6ClnONEA5yB5DJXfW2/KC173DIQrYoZMEtBvGzmf0PKiGyNEqe9N6BNDBH" crossorigin="anonymous"/>
|
|
|
- <link rel="stylesheet" href="https://shandan.one/css/grids-responsive-min.css"/>
|
|
|
- <link rel="stylesheet" href="https://shandan.one/css/responsive-visibility-collapse.css"/>
|
|
|
- <style>
|
|
|
-span.engraved {
|
|
|
- color: #A8A8A8;
|
|
|
- font-size: 0.8em;
|
|
|
- text-shadow: 0px 0.1em 0px rgba(168,168,168,.1), 0px -0.1em 0px rgba(0,0,0,.7);
|
|
|
- float: right;
|
|
|
-}
|
|
|
- </style>
|
|
|
- </head>
|
|
|
- <body>
|
|
|
- <div style="background: darkgray; position: sticky; top: 0; margin: 0; padding: 0; width: 100%; z-index: 1; text-align: center;">
|
|
|
- <form action="random">
|
|
|
- <button type="submit" style="margin: 0.2em">Generate</button>
|
|
|
- <span style="position: absolute; right: 0; padding: 0.4em">
|
|
|
- <a>
|
|
|
- <xsl:attribute name="href">./pg?<xsl:for-each select="//row"><xsl:value-of select="category"/>=<xsl:value-of select="translate(reference,' ','')"/>+<xsl:value-of select="translation"/><xsl:if test="position() != last()">&</xsl:if></xsl:for-each></xsl:attribute>
|
|
|
- Permalink
|
|
|
- </a>
|
|
|
- </span>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
- <div style="position: relative; max-width: 68em; min-width: min(100%, 68em); left: 50%; transform: translate(max(-50%, -34em),0)">
|
|
|
- <table class="pure-table pure-table-bordered pure-table-striped">
|
|
|
- <tr style="text-transform: capitalize">
|
|
|
- <xsl:for-each select="$schema/xsd:complexType[@name=$rowtypename]/xsd:sequence/xsd:element/@name">
|
|
|
- <xsl:variable name="elementtype"
|
|
|
- select="."/>
|
|
|
- <xsl:choose>
|
|
|
- <xsl:when test="$elementtype = 'txt'">
|
|
|
- <th class="opt-all">Text</th>
|
|
|
- </xsl:when>
|
|
|
- <xsl:when test="$elementtype = 'category'">
|
|
|
- <th class="opt-all">Section</th>
|
|
|
- </xsl:when>
|
|
|
- <xsl:when test="$elementtype = 'translation'">
|
|
|
- <th class="opt-md opt-lg opt-xl opt-xxl">Reference</th>
|
|
|
- </xsl:when>
|
|
|
- <xsl:otherwise>
|
|
|
- </xsl:otherwise>
|
|
|
- </xsl:choose>
|
|
|
- </xsl:for-each>
|
|
|
- </tr>
|
|
|
-
|
|
|
- <xsl:for-each select="row">
|
|
|
- <tr>
|
|
|
- <xsl:for-each select="*">
|
|
|
- <xsl:variable name="elementtype"
|
|
|
- select="name(current())"/>
|
|
|
- <xsl:choose>
|
|
|
- <xsl:when test="$elementtype = 'txt'">
|
|
|
- <td class="opt-all" style="text-align: justify"><xsl:value-of select="."/> <span class="engraved">
|
|
|
- <xsl:value-of select="../translation"/>
|
|
|
- </span>
|
|
|
- </td>
|
|
|
- </xsl:when>
|
|
|
- <xsl:when test="$elementtype = 'category'">
|
|
|
- <xsl:choose>
|
|
|
- <xsl:when test="contains(.,'z_')">
|
|
|
+ <xsl:for-each select="row">
|
|
|
+ <tr>
|
|
|
+ <xsl:for-each select="*">
|
|
|
+ <xsl:variable name="elementtype"
|
|
|
+ select="name(current())"/>
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="$elementtype = 'txt'">
|
|
|
+ <td class="opt-all" style="text-align: justify"><xsl:value-of select="."/> <span class="engraved">
|
|
|
+ <xsl:value-of select="../translation"/>
|
|
|
+ </span>
|
|
|
+ </td>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:when test="$elementtype = 'category'">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="contains(.,'z_')">
|
|
|
<td class="opt-all" rowspan="2" style="text-transform: capitalize;">Kingdom</td>
|
|
|
- </xsl:when>
|
|
|
- <xsl:when test="contains(.,'a_')">
|
|
|
- </xsl:when>
|
|
|
- <xsl:otherwise>
|
|
|
- <td class="opt-all" style="text-transform: capitalize;"><xsl:value-of select="."/></td>
|
|
|
- </xsl:otherwise>
|
|
|
- </xsl:choose>
|
|
|
- </xsl:when>
|
|
|
- <xsl:when test="$elementtype = 'translation'">
|
|
|
</xsl:when>
|
|
|
+ <xsl:when test="contains(.,'a_')"></xsl:when>
|
|
|
<xsl:otherwise>
|
|
|
- <td class="opt-md opt-lg opt-xl opt-xxl">
|
|
|
- <xsl:value-of select="translate(translate(.,' ',' '),'-','‑')"/>
|
|
|
- <br/>
|
|
|
- <a>
|
|
|
- <xsl:attribute name="href">/license/<xsl:value-of select="preceding-sibling::translation"/>.txt</xsl:attribute>
|
|
|
- <xsl:value-of select="preceding-sibling::translation"/>
|
|
|
- </a>
|
|
|
- </td>
|
|
|
+ <td class="opt-all" style="text-transform: capitalize;"><xsl:value-of select="."/></td>
|
|
|
</xsl:otherwise>
|
|
|
- </xsl:choose>
|
|
|
- </xsl:for-each>
|
|
|
- </tr>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:when test="$elementtype = 'translation'">
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <td class="opt-md opt-lg opt-xl opt-xxl">
|
|
|
+ <xsl:value-of select="translate(translate(.,' ',' '),'-','‑')"/>
|
|
|
+ <br/>
|
|
|
+ <a>
|
|
|
+ <xsl:attribute name="href">/license/<xsl:value-of select="preceding-sibling::translation"/>.txt</xsl:attribute>
|
|
|
+ <xsl:value-of select="preceding-sibling::translation"/>
|
|
|
+ </a>
|
|
|
+ </td>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
</xsl:for-each>
|
|
|
- <tfoot style="line-height: 1.4">
|
|
|
+ </tr>
|
|
|
+ </xsl:for-each>
|
|
|
+ <tfoot style="line-height: 1.4">
|
|
|
<tr>
|
|
|
<td colspan="3">
|
|
|
- Copyright (c) Daniel Sheffield 2022. All right reserved.
|
|
|
- <br/>
|
|
|
- Powered by <a href="https://www.crosswire.org/jsword/">JSword</a> an implementation of <a href="https://www.crosswire.org/sword/index.jsp">The SWORD Project</a>'s SWORD API brought to you by the <a href="https://crosswire.org">The CrossWire Bible Society</a>.
|
|
|
- <br/>
|
|
|
- Quotes are taken from various translations as indicated. See
|
|
|
- <xsl:for-each select="//row/translation[not(.=preceding::*)]">
|
|
|
- <a>
|
|
|
- <xsl:attribute name="href">/license/<xsl:value-of select="."/>.txt</xsl:attribute>
|
|
|
- <xsl:value-of select="."/>
|
|
|
- </a>,
|
|
|
- </xsl:for-each>
|
|
|
- for the license and copyright information of each respective work.
|
|
|
+ Copyright (c) Daniel Sheffield 2022. All right reserved.
|
|
|
+ <br/>
|
|
|
+ Powered by <a href="https://www.crosswire.org/jsword/">JSword</a> an implementation of <a href="https://www.crosswire.org/sword/index.jsp">The SWORD Project</a>'s SWORD API brought to you by the <a href="https://crosswire.org">The CrossWire Bible Society</a>.
|
|
|
+ <br/>
|
|
|
+ Quotes are taken from various translations as indicated. See
|
|
|
+ <xsl:for-each select="//row/translation[not(.=preceding::*)]">
|
|
|
+ <a>
|
|
|
+ <xsl:attribute name="href">/license/<xsl:value-of select="."/>.txt</xsl:attribute>
|
|
|
+ <xsl:value-of select="."/>
|
|
|
+ </a>,
|
|
|
+ </xsl:for-each>
|
|
|
+ for the license and copyright information of each respective work.
|
|
|
</td>
|
|
|
</tr>
|
|
|
- </tfoot>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- </body>
|
|
|
- </html>
|
|
|
+ </tfoot>
|
|
|
+ </table>
|
|
|
</xsl:template>
|
|
|
-
|
|
|
-</xsl:stylesheet>
|
|
|
+</xsl:stylesheet>
|