Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Dec 14, 2020
1 parent 0dc93d0 commit 381a4f8
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 28 deletions.
32 changes: 32 additions & 0 deletions lib/asciidoctor/m3aawg/basicdoc.rng
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@
<ref name="bookmark"/>
<ref name="image"/>
<ref name="index"/>
<ref name="index-xref"/>
</choice>
</define>
<define name="PureTextElement">
Expand Down Expand Up @@ -737,6 +738,37 @@
</optional>
</element>
</define>
<define name="index-xref">
<element name="index-xref">
<attribute name="also">
<data type="boolean"/>
</attribute>
<element name="primary">
<oneOrMore>
<ref name="PureTextElement"/>
</oneOrMore>
</element>
<optional>
<element name="secondary">
<oneOrMore>
<ref name="PureTextElement"/>
</oneOrMore>
</element>
</optional>
<optional>
<element name="tertiary">
<oneOrMore>
<ref name="PureTextElement"/>
</oneOrMore>
</element>
</optional>
<element name="target">
<oneOrMore>
<ref name="PureTextElement"/>
</oneOrMore>
</element>
</element>
</define>
<!-- bare ID element, used for referencing arbitrary spans of text -->
<define name="bookmark">
<element name="bookmark">
Expand Down
15 changes: 15 additions & 0 deletions lib/asciidoctor/m3aawg/isodoc.rng
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@
<data type="boolean"/>
</attribute>
</optional>
<optional>
<ref name="colgroup"/>
</optional>
<optional>
<ref name="tname"/>
</optional>
Expand Down Expand Up @@ -764,6 +767,18 @@
</define>
</include>
<!-- end overrides -->
<define name="colgroup">
<element name="colgroup">
<oneOrMore>
<ref name="col"/>
</oneOrMore>
</element>
</define>
<define name="col">
<element name="col">
<attribute name="width"/>
</element>
</define>
<define name="TextElement" combine="choice">
<ref name="concept"/>
</define>
Expand Down
91 changes: 64 additions & 27 deletions lib/isodoc/m3aawg/m3d.report.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@
<xsl:otherwise> <!-- for ordered lists -->
<xsl:choose>
<xsl:when test="../@type = 'arabic'">
<xsl:number format="a)"/>
<xsl:number format="a)" lang="en"/>
</xsl:when>
<xsl:when test="../@type = 'alphabet'">
<xsl:number format="1)"/>
Expand Down Expand Up @@ -1426,10 +1426,12 @@


<xsl:variable name="colwidths">
<xsl:call-template name="calculate-column-widths">
<xsl:with-param name="cols-count" select="$cols-count"/>
<xsl:with-param name="table" select="$simple-table"/>
</xsl:call-template>
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
<xsl:call-template name="calculate-column-widths">
<xsl:with-param name="cols-count" select="$cols-count"/>
<xsl:with-param name="table" select="$simple-table"/>
</xsl:call-template>
</xsl:if>
</xsl:variable>
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->

Expand Down Expand Up @@ -1497,16 +1499,25 @@
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
</xsl:if>

<xsl:for-each select="xalan:nodeset($colwidths)//column">
<xsl:choose>
<xsl:when test=". = 1 or . = 0">
<fo:table-column column-width="proportional-column-width(2)"/>
</xsl:when>
<xsl:otherwise>
<fo:table-column column-width="proportional-column-width({.})"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:choose>
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
<fo:table-column column-width="{@width}"/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="xalan:nodeset($colwidths)//column">
<xsl:choose>
<xsl:when test=". = 1 or . = 0">
<fo:table-column column-width="proportional-column-width(2)"/>
</xsl:when>
<xsl:otherwise>
<fo:table-column column-width="proportional-column-width({.})"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
Expand All @@ -1519,10 +1530,12 @@

</fo:table>

<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
<xsl:call-template name="insertTableFooterInSeparateTable">
<xsl:with-param name="table_attributes" select="$table_attributes"/>
<xsl:with-param name="colwidths" select="$colwidths"/>
<xsl:with-param name="colgroup" select="$colgroup"/>
</xsl:call-template>
</xsl:for-each>

Expand Down Expand Up @@ -1776,12 +1789,22 @@
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
<xsl:param name="table_attributes"/>
<xsl:param name="colwidths"/>
<xsl:param name="colgroup"/>

<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>

<xsl:if test="$isNoteOrFnExist = 'true'">

<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
<xsl:variable name="cols-count">
<xsl:choose>
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
<xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<fo:table keep-with-previous="always">
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
Expand All @@ -1799,16 +1822,25 @@
</xsl:choose>
</xsl:for-each>

<xsl:for-each select="xalan:nodeset($colwidths)//column">
<xsl:choose>
<xsl:when test=". = 1 or . = 0">
<fo:table-column column-width="proportional-column-width(2)"/>
</xsl:when>
<xsl:otherwise>
<fo:table-column column-width="proportional-column-width({.})"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:choose>
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
<fo:table-column column-width="{@width}"/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="xalan:nodeset($colwidths)//column">
<xsl:choose>
<xsl:when test=". = 1 or . = 0">
<fo:table-column column-width="proportional-column-width(2)"/>
</xsl:when>
<xsl:otherwise>
<fo:table-column column-width="proportional-column-width({.})"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>

<fo:table-body>
<fo:table-row>
Expand Down Expand Up @@ -3992,7 +4024,8 @@
<fo:table-column column-width="107mm"/>
<fo:table-column column-width="15mm"/>
<fo:table-body>
<fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
<fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">

<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
Expand All @@ -4010,6 +4043,10 @@
<fo:block><xsl:apply-templates/></fo:block>
</fo:table-cell>
</xsl:template><xsl:template name="processBibitem">


<!-- end BIPM bibitem processing-->




Expand Down
2 changes: 1 addition & 1 deletion lib/metanorma/m3aawg/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Metanorma
module M3AAWG
VERSION = "1.6.1"
VERSION = "1.6.2"
end
end

0 comments on commit 381a4f8

Please sign in to comment.