Skip to content
Snippets Groups Projects
Commit 99233dad authored by Frank Steinberg's avatar Frank Steinberg
Browse files

Various improvements. Added fix/ directory to adjust the original data.

parent c8cbefbb
No related branches found
No related tags found
No related merge requests found
......@@ -32,4 +32,6 @@ clean:
rm -rf cache orig
rm -f bjcp-2015-styleguide-orig.xml
rm -f bjcp-2015-styleguide-de.xml
rm -f bjcp-2015-styleguide-orig.html
rm -f bjcp-2015-styleguide-de.html
......@@ -47,11 +47,10 @@ Contact:
## TODO
- Add clear words to honor the original BJCP word.
- Add clear words to honor the original BJCP work.
- Care about copyright questions. Add LICENSE file.
- Add Acknowledgements to all contributors.
- Minor: Pay special attention to:
- specs: Saison (standard, pale, dark, ...)
- specs: Lambic (varies w/ fruit)
- specs: Tropical Stout (missing some numbers)
- specs: Specialty IPA (Strength classification)
- specs variants: 25B Saison (standard, pale, dark)
--> fix/* !!!
<?xml version="1.0" encoding="UTF-8"?>
<styleguide>
<category id="25">
<subcategory id="25B">
<!-- This subcategory is the only one that sub-groups the style in the vital statistics section. For a consistent machine readbale specs section, we would like to have pure numbers here. Therefore we move the "sub-specs" to the entry instructions section, where we think it really belongs. -->
<entry-instructions>The entrant <span class="bold">must</span> specify the <span class="italic">strength</span> (table: 3.5-5.0%, standard: 5.0-7.0%, super: 7.0-9.5%) and the <span class="italic">color</span> (pale: SRM 5-14, dark: SRM 15-22).</entry-instructions>
<specs>
<ibu min="20" max="35"/>
<srm min="5" max="22" ebc-min="10" ebc-max="43"/>
<og min="1.048" max="1.065" plato-min="11.9" plato-max="15.9"/>
<fg min="1.002" max="1.008" plato-min="0.5" plato-max="2.1"/>
<abv min="3.5" max="9.5"/>
</specs>
</subcategory>
</category>
</styleguide>
This diff is collapsed.
......@@ -98,6 +98,9 @@ styleguide commercial-examples:before {
styleguide tags:before {
content: "Tags: ";
}
styleguide strength-classifications:before {
content: "Strength Classifications: ";
}
styleguide overall-impression,
styleguide aroma,
......@@ -111,7 +114,8 @@ styleguide style-comparison,
styleguide specs,
styleguide entry-instructions,
styleguide commercial-examples,
styleguide tags {
styleguide tags,
styleguide strength-classifications {
position: relative;
margin-left: 1em;
display: block;
......@@ -129,7 +133,8 @@ styleguide style-comparison:before,
styleguide specs:before,
styleguide entry-instructions:before,
styleguide commercial-examples:before,
styleguide tags:before {
styleguide tags:before,
styleguide strength-classifications:before {
font-weight: bold;
}
......@@ -170,38 +175,66 @@ styleguide specs div * {
<xsl:template match="specs" mode="copy">
<xsl:element name="specs">
<xsl:element name="div">
<xsl:element name="div">
<xsl:attribute name="class">ibu</xsl:attribute>
<xsl:value-of select="ibu/@min"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="ibu/@max"/>
</xsl:element>
<xsl:element name="div">
<xsl:attribute name="class">srm</xsl:attribute>
<xsl:value-of select="srm/@min"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="srm/@max"/>
</xsl:element>
<xsl:element name="div">
<xsl:attribute name="class">og</xsl:attribute>
<xsl:value-of select="og/@min"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="og/@max"/>
</xsl:element>
<xsl:element name="div">
<xsl:attribute name="class">fg</xsl:attribute>
<xsl:value-of select="fg/@min"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="fg/@max"/>
</xsl:element>
<xsl:element name="div">
<xsl:attribute name="class">abv</xsl:attribute>
<xsl:value-of select="abv/@min"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="abv/@max"/>
</xsl:element>
</xsl:element>
<xsl:value-of select="./text()"/>
<xsl:if test="ibu or srm or og or fg or abv">
<xsl:element name="div">
<xsl:if test="ibu">
<xsl:element name="div">
<xsl:attribute name="class">ibu</xsl:attribute>
<xsl:if test="ibu/@min">
<xsl:value-of select="ibu/@min"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="ibu/@max"/>
</xsl:if>
<xsl:value-of select="normalize-space(ibu/text())"/>
</xsl:element>
</xsl:if>
<xsl:if test="srm">
<xsl:element name="div">
<xsl:attribute name="class">srm</xsl:attribute>
<xsl:if test="srm/@min">
<xsl:value-of select="srm/@min"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="srm/@max"/>
</xsl:if>
<xsl:value-of select="normalize-space(srm/text())"/>
</xsl:element>
</xsl:if>
<xsl:if test="og">
<xsl:element name="div">
<xsl:attribute name="class">og</xsl:attribute>
<xsl:if test="og/@min">
<xsl:value-of select="og/@min"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="og/@max"/>
</xsl:if>
<xsl:value-of select="normalize-space(og/text())"/>
</xsl:element>
</xsl:if>
<xsl:if test="fg">
<xsl:element name="div">
<xsl:attribute name="class">fg</xsl:attribute>
<xsl:if test="fg/@min">
<xsl:value-of select="fg/@min"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="fg/@max"/>
</xsl:if>
<xsl:value-of select="normalize-space(fg/text())"/>
</xsl:element>
</xsl:if>
<xsl:if test="abv">
<xsl:element name="div">
<xsl:attribute name="class">abv</xsl:attribute>
<xsl:if test="abv/@min">
<xsl:value-of select="abv/@min"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="abv/@max"/>
</xsl:if>
<xsl:value-of select="normalize-space(abv/text())"/>
</xsl:element>
</xsl:if>
</xsl:element>
</xsl:if>
</xsl:element>
</xsl:template>
......@@ -216,6 +249,21 @@ styleguide specs div * {
<xsl:template match="@id" mode="copy">
<xsl:attribute name="id">
<xsl:choose>
<xsl:when test="contains(.,'-')">
<xsl:value-of select="substring-before(.,'-')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:template>
<xsl:template match="@* | text()" mode="copy">
<xsl:copy>
<xsl:apply-templates select="@*" mode="copy"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment