|
@@ -25,72 +25,90 @@ All rights reserved.
|
|
|
</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>
|
|
|
-
|
|
|
- <xsl:for-each select="row">
|
|
|
- <tr>
|
|
|
- <xsl:for-each select="*">
|
|
|
+ <div xmlns="http://www.w3.org/1999/xhtml"
|
|
|
+ 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>
|
|
|
+ <table xmlns="http://www.w3.org/1999/xhtml"
|
|
|
+ class="pure-table pure-table-bordered pure-table-striped">
|
|
|
+ <thead>
|
|
|
+ <tr style="text-transform: capitalize">
|
|
|
+ <xsl:for-each select="$schema/xsd:complexType[@name=$rowtypename]/xsd:sequence/xsd:element/@name">
|
|
|
<xsl:variable name="elementtype"
|
|
|
- select="name(current())"/>
|
|
|
+ select="."/>
|
|
|
<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>
|
|
|
+ <th class="opt-all">Text</th>
|
|
|
</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>
|
|
|
+ <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>
|
|
|
- <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>
|
|
|
+ </xsl:for-each>
|
|
|
</tr>
|
|
|
- </xsl:for-each>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <xsl:for-each select="xhtml: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: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>
|
|
|
+ </tr>
|
|
|
+ </xsl:for-each>
|
|
|
+ </tbody>
|
|
|
+
|
|
|
<tfoot style="line-height: 1.4">
|
|
|
<tr>
|
|
|
<td colspan="3">
|