metanorma-bipm 2.6.2 → 2.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/bipm/base_convert.rb +4 -0
- data/lib/isodoc/bipm/bipm.brochure.xsl +158 -89
- data/lib/isodoc/bipm/bipm.guide.xsl +158 -89
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +158 -89
- data/lib/isodoc/bipm/bipm.rapport.xsl +158 -89
- data/lib/isodoc/bipm/html/htmlstyle.css +7 -0
- data/lib/isodoc/bipm/jcgm.standard.xsl +144 -34
- data/lib/isodoc/bipm/presentation_xml_convert.rb +66 -20
- data/lib/metanorma/bipm/basicdoc.rng +34 -27
- data/lib/metanorma/bipm/isodoc.rng +28 -1
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +2 -2
@@ -5263,6 +5263,8 @@
|
|
5263
5263
|
|
5264
5264
|
<xsl:template name="setTableRowAttributes">
|
5265
5265
|
|
5266
|
+
<xsl:call-template name="setColors"/>
|
5267
|
+
|
5266
5268
|
</xsl:template> <!-- setTableRowAttributes -->
|
5267
5269
|
<!-- ===================== -->
|
5268
5270
|
<!-- END Table's row processing -->
|
@@ -5314,6 +5316,7 @@
|
|
5314
5316
|
</xsl:attribute>
|
5315
5317
|
</xsl:if>
|
5316
5318
|
<xsl:call-template name="display-align"/>
|
5319
|
+
<xsl:call-template name="setColors"/>
|
5317
5320
|
</xsl:template>
|
5318
5321
|
|
5319
5322
|
<xsl:template name="display-align">
|
@@ -5329,6 +5332,29 @@
|
|
5329
5332
|
</xsl:if>
|
5330
5333
|
</xsl:template>
|
5331
5334
|
|
5335
|
+
<xsl:template name="setColors">
|
5336
|
+
<xsl:variable name="styles__">
|
5337
|
+
<xsl:call-template name="split">
|
5338
|
+
<xsl:with-param name="pText" select="concat(@style,';')"/>
|
5339
|
+
<xsl:with-param name="sep" select="';'"/>
|
5340
|
+
</xsl:call-template>
|
5341
|
+
</xsl:variable>
|
5342
|
+
<xsl:variable name="quot">"</xsl:variable>
|
5343
|
+
<xsl:variable name="styles_">
|
5344
|
+
<xsl:for-each select="xalan:nodeset($styles__)/item">
|
5345
|
+
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
5346
|
+
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
5347
|
+
<xsl:if test="$key = 'color' or $key = 'background-color'">
|
5348
|
+
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
5349
|
+
</xsl:if>
|
5350
|
+
</xsl:for-each>
|
5351
|
+
</xsl:variable>
|
5352
|
+
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
5353
|
+
<xsl:for-each select="$styles/style">
|
5354
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
5355
|
+
</xsl:for-each>
|
5356
|
+
</xsl:template>
|
5357
|
+
|
5332
5358
|
<!-- cell in table body, footer -->
|
5333
5359
|
<xsl:template match="*[local-name()='td']" name="td">
|
5334
5360
|
<fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
|
@@ -5340,12 +5366,12 @@
|
|
5340
5366
|
|
5341
5367
|
<xsl:call-template name="refine_table-cell-style"/>
|
5342
5368
|
|
5369
|
+
<xsl:call-template name="setTableCellAttributes"/>
|
5370
|
+
|
5343
5371
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
5344
5372
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
5345
5373
|
</xsl:if>
|
5346
5374
|
|
5347
|
-
<xsl:call-template name="setTableCellAttributes"/>
|
5348
|
-
|
5349
5375
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
5350
5376
|
<xsl:attribute name="border">1pt solid black</xsl:attribute> <!-- border is mandatory, to determine page width -->
|
5351
5377
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
@@ -7144,7 +7170,7 @@
|
|
7144
7170
|
<xsl:choose>
|
7145
7171
|
<xsl:when test="ancestor::*[local-name() = 'table']"><xsl:apply-templates/></xsl:when>
|
7146
7172
|
<xsl:when test="following-sibling::*[2][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']">
|
7147
|
-
<fo:inline keep-with-next.within-line="always"><xsl:apply-templates/></fo:inline>
|
7173
|
+
<fo:inline keep-with-next.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
|
7148
7174
|
</xsl:when>
|
7149
7175
|
<xsl:otherwise>
|
7150
7176
|
<xsl:apply-templates/>
|
@@ -7152,7 +7178,7 @@
|
|
7152
7178
|
</xsl:choose>
|
7153
7179
|
</xsl:template>
|
7154
7180
|
<xsl:template match="text()[not(ancestor::*[local-name() = 'table']) and preceding-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear'] and following-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']]" priority="2">
|
7155
|
-
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
7181
|
+
<fo:inline keep-with-next.within-line="always" role="SKIP"><xsl:value-of select="."/></fo:inline>
|
7156
7182
|
</xsl:template>
|
7157
7183
|
|
7158
7184
|
<xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
|
@@ -8192,24 +8218,26 @@
|
|
8192
8218
|
<xsl:apply-templates select="." mode="mathml"/>
|
8193
8219
|
</xsl:variable>
|
8194
8220
|
|
8195
|
-
<fo:instream-foreign-object fox:alt-text="Math">
|
8221
|
+
<fo:instream-foreign-object fox:alt-text="Math" fox:actual-text="Math">
|
8196
8222
|
|
8197
8223
|
<xsl:call-template name="refine_mathml_insteam_object_style"/>
|
8198
8224
|
|
8199
|
-
|
8200
|
-
|
8201
|
-
|
8202
|
-
<xsl:
|
8203
|
-
|
8204
|
-
|
8205
|
-
<!-- <xsl:if test="$add_math_as_text = 'true'"> -->
|
8206
|
-
<xsl:if test="normalize-space($asciimath_text_) != ''">
|
8207
|
-
<!-- put Mathin Alternate Text -->
|
8208
|
-
<xsl:attribute name="fox:alt-text">
|
8209
|
-
<xsl:value-of select="$asciimath_text_"/>
|
8225
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
8226
|
+
<!-- put MathML in Actual Text -->
|
8227
|
+
<!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
|
8228
|
+
<xsl:attribute name="fox:actual-text">
|
8229
|
+
<xsl:value-of select="$mathml_content"/>
|
8210
8230
|
</xsl:attribute>
|
8231
|
+
|
8232
|
+
<!-- <xsl:if test="$add_math_as_text = 'true'"> -->
|
8233
|
+
<xsl:if test="normalize-space($asciimath_text_) != ''">
|
8234
|
+
<!-- put Mathin Alternate Text -->
|
8235
|
+
<xsl:attribute name="fox:alt-text">
|
8236
|
+
<xsl:value-of select="$asciimath_text_"/>
|
8237
|
+
</xsl:attribute>
|
8238
|
+
</xsl:if>
|
8239
|
+
<!-- </xsl:if> -->
|
8211
8240
|
</xsl:if>
|
8212
|
-
<!-- </xsl:if> -->
|
8213
8241
|
|
8214
8242
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
8215
8243
|
|
@@ -9972,6 +10000,8 @@
|
|
9972
10000
|
<xsl:template match="*[local-name() = 'origin']" mode="contents"/>
|
9973
10001
|
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents"/>
|
9974
10002
|
|
10003
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="contents" priority="3"/>
|
10004
|
+
|
9975
10005
|
<xsl:template match="*[local-name() = 'stem']" mode="bookmarks"/>
|
9976
10006
|
<xsl:template match="*[local-name() = 'fmt-stem']" mode="bookmarks">
|
9977
10007
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -9993,6 +10023,8 @@
|
|
9993
10023
|
<xsl:template match="*[local-name() = 'origin']" mode="bookmarks"/>
|
9994
10024
|
<xsl:template match="*[local-name() = 'erefstack ']" mode="bookmarks"/>
|
9995
10025
|
|
10026
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="bookmarks" priority="3"/>
|
10027
|
+
|
9996
10028
|
<!-- Bookmarks -->
|
9997
10029
|
<xsl:template name="addBookmarks">
|
9998
10030
|
<xsl:param name="contents"/>
|
@@ -11876,21 +11908,32 @@
|
|
11876
11908
|
<!-- ========== -->
|
11877
11909
|
|
11878
11910
|
<xsl:variable name="reviews_">
|
11879
|
-
<xsl:for-each select="//*[local-name() = 'review'][@from]">
|
11911
|
+
<xsl:for-each select="//*[local-name() = 'review'][not(parent::*[local-name() = 'review-container'])][@from]">
|
11880
11912
|
<xsl:copy>
|
11881
11913
|
<xsl:copy-of select="@from"/>
|
11882
11914
|
<xsl:copy-of select="@id"/>
|
11883
11915
|
</xsl:copy>
|
11884
11916
|
</xsl:for-each>
|
11917
|
+
<xsl:for-each select="//*[local-name() = 'fmt-review-start'][@source]">
|
11918
|
+
<xsl:copy>
|
11919
|
+
<xsl:copy-of select="@source"/>
|
11920
|
+
<xsl:copy-of select="@id"/>
|
11921
|
+
</xsl:copy>
|
11922
|
+
</xsl:for-each>
|
11885
11923
|
</xsl:variable>
|
11886
11924
|
<xsl:variable name="reviews" select="xalan:nodeset($reviews_)"/>
|
11887
11925
|
|
11888
11926
|
<xsl:template name="addReviewHelper">
|
11889
|
-
|
11890
|
-
|
11891
|
-
|
11892
|
-
|
11893
|
-
<
|
11927
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
11928
|
+
<!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
|
11929
|
+
<xsl:variable name="curr_id" select="@id"/>
|
11930
|
+
<!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
|
11931
|
+
<xsl:for-each select="$reviews//*[local-name() = 'review'][@from = $curr_id]"> <!-- $reviews//*[local-name() = 'fmt-review-start'][@source = $curr_id] -->
|
11932
|
+
<xsl:variable name="review_id" select="normalize-space(@id)"/>
|
11933
|
+
<xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
|
11934
|
+
<fo:block keep-with-next="always" line-height="0.1" id="{$review_id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$review_id}" fox:alt-text="Annot___{$review_id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
11935
|
+
</xsl:if>
|
11936
|
+
</xsl:for-each>
|
11894
11937
|
</xsl:if>
|
11895
11938
|
<!-- <fo:block>
|
11896
11939
|
<curr_id><xsl:value-of select="$curr_id"/></curr_id>
|
@@ -12034,14 +12077,61 @@
|
|
12034
12077
|
|
12035
12078
|
</xsl:template>
|
12036
12079
|
|
12037
|
-
|
12080
|
+
<!-- document text (not figures, or tables) footnotes -->
|
12081
|
+
<xsl:variable name="reviews_container_">
|
12082
|
+
<xsl:for-each select="//*[local-name() = 'review-container']/*[local-name() = 'fmt-review-body']">
|
12083
|
+
<xsl:variable name="update_xml_step1">
|
12084
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
12085
|
+
</xsl:variable>
|
12086
|
+
<xsl:apply-templates select="xalan:nodeset($update_xml_step1)" mode="update_xml_enclose_keep-together_within-line"/>
|
12087
|
+
</xsl:for-each>
|
12088
|
+
</xsl:variable>
|
12089
|
+
<xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
|
12090
|
+
|
12091
|
+
<xsl:template match="*[local-name() = 'review-container']"/>
|
12092
|
+
|
12093
|
+
<!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
|
12094
|
+
<xsl:template match="*[local-name() = 'review'][not(parent::*[local-name() = 'review-container'])]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
12095
|
+
<xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
|
12096
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
12097
|
+
<xsl:choose>
|
12098
|
+
<!-- if there isn't the attribute '@from', then -->
|
12099
|
+
<xsl:when test="$id_from = ''">
|
12100
|
+
<fo:block id="{@id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
12101
|
+
</xsl:when>
|
12102
|
+
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
12103
|
+
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
12104
|
+
<fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
12105
|
+
</xsl:when>
|
12106
|
+
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
12107
|
+
<fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
12108
|
+
</xsl:when>
|
12109
|
+
</xsl:choose>
|
12110
|
+
</xsl:if>
|
12111
|
+
</xsl:template>
|
12112
|
+
|
12113
|
+
<!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
|
12114
|
+
<xsl:template match="*[local-name() = 'fmt-review-start']" name="fmt-review-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
12038
12115
|
<!-- comment 2019-11-29 -->
|
12039
12116
|
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
12040
12117
|
<xsl:apply-templates /> -->
|
12041
12118
|
|
12042
|
-
<xsl:variable name="id_from" select="normalize-space(current()/@
|
12119
|
+
<xsl:variable name="id_from" select="normalize-space(current()/@source)"/>
|
12043
12120
|
|
12044
|
-
<xsl:
|
12121
|
+
<xsl:variable name="source" select="normalize-space(@source)"/>
|
12122
|
+
|
12123
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
12124
|
+
<!-- <xsl:variable name="id_from" select="normalize-space(current()/@from)"/> -->
|
12125
|
+
|
12126
|
+
<!-- <xsl:if test="@source = @end"> -->
|
12127
|
+
<!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
|
12128
|
+
following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
|
12129
|
+
<!-- <fo:block id="{$source}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$source}" fox:alt-text="Annot___{$source}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block> -->
|
12130
|
+
<fo:block id="{@id}" font-size="1pt" role="SKIP" keep-with-next="always" line-height="0.1"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
12131
|
+
<!-- </xsl:if> -->
|
12132
|
+
</xsl:if>
|
12133
|
+
|
12134
|
+
<xsl:if test="1 = 2">
|
12045
12135
|
<xsl:choose>
|
12046
12136
|
<!-- if there isn't the attribute '@from', then -->
|
12047
12137
|
<xsl:when test="$id_from = ''">
|
@@ -12049,10 +12139,10 @@
|
|
12049
12139
|
</xsl:when>
|
12050
12140
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
12051
12141
|
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
12052
|
-
<fo:block id="{
|
12142
|
+
<fo:block id="{$id_from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$id_from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
12053
12143
|
</xsl:when>
|
12054
12144
|
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
12055
|
-
<fo:block id="{
|
12145
|
+
<fo:block id="{$id_from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$id_from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
12056
12146
|
</xsl:when>
|
12057
12147
|
</xsl:choose>
|
12058
12148
|
</xsl:if>
|
@@ -12103,16 +12193,21 @@
|
|
12103
12193
|
<xsl:variable name="list_level">
|
12104
12194
|
<xsl:choose>
|
12105
12195
|
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
|
12106
|
-
<xsl:
|
12196
|
+
<xsl:when test="$ul_labels/label[@level = 3]"><xsl:value-of select="$list_level_ mod 3"/></xsl:when>
|
12197
|
+
<xsl:when test="$list_level_ mod 2 = 0">2</xsl:when>
|
12198
|
+
<xsl:otherwise><xsl:value-of select="$list_level_ mod 2"/></xsl:otherwise>
|
12107
12199
|
</xsl:choose>
|
12108
12200
|
</xsl:variable>
|
12109
12201
|
<xsl:choose>
|
12110
12202
|
<xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
|
12111
12203
|
<xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
|
12112
12204
|
</xsl:when>
|
12113
|
-
<xsl:when test="$list_level mod 3 = 0">
|
12205
|
+
<xsl:when test="$list_level mod 3 = 0 and $ul_labels/label[@level = 3]">
|
12114
12206
|
<xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
|
12115
12207
|
</xsl:when>
|
12208
|
+
<xsl:when test="$list_level mod 3 = 0">
|
12209
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
|
12210
|
+
</xsl:when>
|
12116
12211
|
<xsl:when test="$list_level mod 2 = 0">
|
12117
12212
|
<xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
|
12118
12213
|
</xsl:when>
|
@@ -12655,10 +12750,22 @@
|
|
12655
12750
|
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'bookmark']" priority="2"/>
|
12656
12751
|
|
12657
12752
|
<xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
12658
|
-
|
12659
|
-
<
|
12660
|
-
|
12661
|
-
|
12753
|
+
<xsl:variable name="bookmark_id" select="@id"/>
|
12754
|
+
<xsl:choose>
|
12755
|
+
<!-- Example:
|
12756
|
+
<fmt-review-start id="_7ef81cf7-3f6c-4ed4-9c1f-1ba092052bbd" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" end="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/>
|
12757
|
+
<bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
|
12758
|
+
<fmt-review-end id="_f336a8d0-08a8-4b7f-a1aa-b04688ed40c1" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" start="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/> -->
|
12759
|
+
<xsl:when test="1 = 2 and preceding-sibling::node()[local-name() = 'fmt-review-start'][@source = $bookmark_id] and following-sibling::node()[local-name() = 'fmt-review-end'][@source = $bookmark_id]">
|
12760
|
+
<!-- skip here, see the template 'fmt-review-start' -->
|
12761
|
+
</xsl:when>
|
12762
|
+
<xsl:otherwise>
|
12763
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
12764
|
+
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[local-name() = 'fmt-review-start'][@source = $bookmark_id] and following-sibling::node()[local-name() = 'fmt-review-end'][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
|
12765
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
12766
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
12767
|
+
</xsl:otherwise>
|
12768
|
+
</xsl:choose>
|
12662
12769
|
</xsl:template>
|
12663
12770
|
<!-- =================== -->
|
12664
12771
|
<!-- End of Index processing -->
|
@@ -14015,6 +14122,9 @@
|
|
14015
14122
|
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_step1"/>
|
14016
14123
|
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_pres"/>
|
14017
14124
|
|
14125
|
+
<xsl:template match="*[local-name() = 'review-container']" mode="update_xml_step1"/>
|
14126
|
+
<xsl:template match="*[local-name() = 'review-container']" mode="update_xml_pres"/>
|
14127
|
+
|
14018
14128
|
<!-- END: update new Presentation XML -->
|
14019
14129
|
|
14020
14130
|
<!-- =========================================================================== -->
|
@@ -107,12 +107,6 @@ module IsoDoc
|
|
107
107
|
jcgm_eref(docxml, "//fmt-origin[not(.//termref)]")
|
108
108
|
end
|
109
109
|
|
110
|
-
# KILL
|
111
|
-
def quotesourcex(docxml)
|
112
|
-
super
|
113
|
-
jcgm_eref(docxml, "//quote//source")
|
114
|
-
end
|
115
|
-
|
116
110
|
def jcgm_eref(docxml, xpath)
|
117
111
|
@jcgm or return
|
118
112
|
docxml.xpath(ns(xpath)).each { |x| extract_brackets(x) }
|
@@ -145,16 +139,6 @@ module IsoDoc
|
|
145
139
|
end
|
146
140
|
end
|
147
141
|
|
148
|
-
# KILL
|
149
|
-
def termsource1_xx(elem)
|
150
|
-
# elem["status"] == "modified" and return super
|
151
|
-
while elem&.next_element&.name == "termsource"
|
152
|
-
elem << "; #{to_xml(elem.next_element.remove.children)}"
|
153
|
-
end
|
154
|
-
elem.children = l10n("[#{termsource_adapt(elem['status'])}" \
|
155
|
-
"#{to_xml(elem.children).strip}]")
|
156
|
-
end
|
157
|
-
|
158
142
|
def termsource_label(elem, sources)
|
159
143
|
elem.replace(l10n("[#{termsource_adapt(elem['status'])} #{sources}]"))
|
160
144
|
end
|
@@ -180,10 +164,6 @@ module IsoDoc
|
|
180
164
|
end
|
181
165
|
|
182
166
|
def termsource_modification(elem)
|
183
|
-
# if elem["status"] == "modified"
|
184
|
-
# origin = elem.at(ns("./origin"))
|
185
|
-
# s = termsource_status(elem["status"]) and origin.next = l10n(", #{s}")
|
186
|
-
# end
|
187
167
|
termsource_add_modification_text(elem.at(ns("./modification")))
|
188
168
|
end
|
189
169
|
|
@@ -234,6 +214,72 @@ module IsoDoc
|
|
234
214
|
end
|
235
215
|
end
|
236
216
|
|
217
|
+
# explode out all the subclauses into separate entries
|
218
|
+
# assume no hanging clauses
|
219
|
+
def sort_footnote_sections(docxml)
|
220
|
+
ret = super
|
221
|
+
ret.flat_map do |x|
|
222
|
+
clauses = x.xpath(ns(".//clause[not(./clause)]"))
|
223
|
+
clauses.empty? ? [x] : clauses.to_a
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
# quote/table/fn references are not unique within quote
|
228
|
+
# if there are multiple tables
|
229
|
+
def renumber_document_footnote_key(fnote)
|
230
|
+
key = fnote["reference"]
|
231
|
+
!@jcgm && (t = fnote.at("./ancestor::xmlns:table")) and
|
232
|
+
key = "#{t['id']} #{key}"
|
233
|
+
key
|
234
|
+
end
|
235
|
+
|
236
|
+
def renumber_document_footnote(fnote, idx, seen)
|
237
|
+
fnote["original-reference"] = fnote["reference"]
|
238
|
+
key = renumber_document_footnote_key(fnote)
|
239
|
+
if seen[key]
|
240
|
+
fnote["reference"] = seen[fnote["reference"]]
|
241
|
+
else
|
242
|
+
seen[key] = idx
|
243
|
+
fnote["reference"] = idx
|
244
|
+
idx += 1
|
245
|
+
end
|
246
|
+
idx
|
247
|
+
end
|
248
|
+
|
249
|
+
def document_footnotes(docxml)
|
250
|
+
@jcgm and return super
|
251
|
+
sects = sort_footnote_sections(docxml)
|
252
|
+
excl = non_document_footnotes(docxml)
|
253
|
+
fns = filter_document_footnotes(sects, excl)
|
254
|
+
#sects.select { |s| s.at(ns(".//fn")) }.each_with_index do |s, i|
|
255
|
+
sects.each_with_index do |s, i|
|
256
|
+
ret = footnote_collect(renumber_document_footnotes(fns[i], 1))
|
257
|
+
f = footnote_container(fns[i], ret) and s << f
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
def renumber_document_footnotes(fns, idx)
|
262
|
+
@jcgm and return super
|
263
|
+
fns.each_with_object({}) do |f, seen|
|
264
|
+
idx = renumber_document_footnote(f, idx, seen)
|
265
|
+
end
|
266
|
+
fns
|
267
|
+
end
|
268
|
+
|
269
|
+
def table_fn(elem)
|
270
|
+
!@jcgm && !elem.ancestors("quote").empty? and return
|
271
|
+
super
|
272
|
+
end
|
273
|
+
|
274
|
+
def non_document_footnotes(docxml)
|
275
|
+
table_fns = docxml.xpath(ns("//table//fn")) -
|
276
|
+
docxml.xpath(ns("//table/name//fn"))
|
277
|
+
@jcgm or table_fns -= docxml.xpath(ns("//quote//table//fn"))
|
278
|
+
fig_fns = docxml.xpath(ns("//figure//fn")) -
|
279
|
+
docxml.xpath(ns("//figure/name//fn"))
|
280
|
+
table_fns + fig_fns
|
281
|
+
end
|
282
|
+
|
237
283
|
include Init
|
238
284
|
end
|
239
285
|
end
|
@@ -382,33 +382,7 @@ in a document (e.g. sourcecode annotations)</a:documentation>
|
|
382
382
|
<a:documentation>Block intended to capture reviewer comments about some text in the document</a:documentation>
|
383
383
|
<element name="review">
|
384
384
|
<ref name="RequiredId"/>
|
385
|
-
<
|
386
|
-
<a:documentation>The party who has offered the comment</a:documentation>
|
387
|
-
</attribute>
|
388
|
-
<optional>
|
389
|
-
<attribute name="type">
|
390
|
-
<a:documentation>The type of reviewer comment</a:documentation>
|
391
|
-
</attribute>
|
392
|
-
</optional>
|
393
|
-
<optional>
|
394
|
-
<attribute name="date">
|
395
|
-
<a:documentation>The date when the comment was made</a:documentation>
|
396
|
-
<data type="dateTime"/>
|
397
|
-
</attribute>
|
398
|
-
</optional>
|
399
|
-
<optional>
|
400
|
-
<attribute name="from">
|
401
|
-
<a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
|
402
|
-
If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
|
403
|
-
<data type="IDREF"/>
|
404
|
-
</attribute>
|
405
|
-
</optional>
|
406
|
-
<optional>
|
407
|
-
<attribute name="to">
|
408
|
-
<a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
|
409
|
-
<data type="IDREF"/>
|
410
|
-
</attribute>
|
411
|
-
</optional>
|
385
|
+
<ref name="ReviewAttributes"/>
|
412
386
|
<oneOrMore>
|
413
387
|
<ref name="paragraph">
|
414
388
|
<a:documentation>Reviewer comments content</a:documentation>
|
@@ -416,6 +390,35 @@ If not provided, the comment applies in the vicinity of the place it has been in
|
|
416
390
|
</oneOrMore>
|
417
391
|
</element>
|
418
392
|
</define>
|
393
|
+
<define name="ReviewAttributes">
|
394
|
+
<attribute name="reviewer">
|
395
|
+
<a:documentation>The party who has offered the comment</a:documentation>
|
396
|
+
</attribute>
|
397
|
+
<optional>
|
398
|
+
<attribute name="type">
|
399
|
+
<a:documentation>The type of reviewer comment</a:documentation>
|
400
|
+
</attribute>
|
401
|
+
</optional>
|
402
|
+
<optional>
|
403
|
+
<attribute name="date">
|
404
|
+
<a:documentation>The date when the comment was made</a:documentation>
|
405
|
+
<data type="dateTime"/>
|
406
|
+
</attribute>
|
407
|
+
</optional>
|
408
|
+
<optional>
|
409
|
+
<attribute name="from">
|
410
|
+
<a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
|
411
|
+
If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
|
412
|
+
<data type="IDREF"/>
|
413
|
+
</attribute>
|
414
|
+
</optional>
|
415
|
+
<optional>
|
416
|
+
<attribute name="to">
|
417
|
+
<a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
|
418
|
+
<data type="IDREF"/>
|
419
|
+
</attribute>
|
420
|
+
</optional>
|
421
|
+
</define>
|
419
422
|
<define name="NumberingAttributes">
|
420
423
|
<optional>
|
421
424
|
<attribute name="unnumbered">
|
@@ -857,6 +860,7 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
|
|
857
860
|
<define name="tr">
|
858
861
|
<a:documentation>Sequence of cells to be displayed as a row in a table</a:documentation>
|
859
862
|
<element name="tr">
|
863
|
+
<ref name="TrAttributes"/>
|
860
864
|
<oneOrMore>
|
861
865
|
<choice>
|
862
866
|
<ref name="td">
|
@@ -869,6 +873,9 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
|
|
869
873
|
</oneOrMore>
|
870
874
|
</element>
|
871
875
|
</define>
|
876
|
+
<define name="TrAttributes">
|
877
|
+
<empty/>
|
878
|
+
</define>
|
872
879
|
<define name="tr-no-id">
|
873
880
|
<a:documentation>Sequence of cells to be displayed as a row in a table: optional ID attributes recursively (for use in Relaton, metadata)</a:documentation>
|
874
881
|
<element name="tr">
|
@@ -17,7 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION v2.0.
|
20
|
+
<!-- VERSION v2.0.2 -->
|
21
21
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
@@ -423,6 +423,21 @@ normative or informative references, some split references into sections organiz
|
|
423
423
|
</oneOrMore>
|
424
424
|
</choice>
|
425
425
|
</define>
|
426
|
+
<define name="TdAttributes" combine="interleave">
|
427
|
+
<attribute name="style">
|
428
|
+
<a:documentation>CSS style: only background-color supported</a:documentation>
|
429
|
+
</attribute>
|
430
|
+
</define>
|
431
|
+
<define name="ThAttributes" combine="interleave">
|
432
|
+
<attribute name="style">
|
433
|
+
<a:documentation>CSS style: only background-color supported</a:documentation>
|
434
|
+
</attribute>
|
435
|
+
</define>
|
436
|
+
<define name="TrAttributes">
|
437
|
+
<attribute name="style">
|
438
|
+
<a:documentation>CSS style: only background-color supported</a:documentation>
|
439
|
+
</attribute>
|
440
|
+
</define>
|
426
441
|
<define name="table-note">
|
427
442
|
<element name="note">
|
428
443
|
<ref name="OptionalId"/>
|
@@ -1272,6 +1287,11 @@ numbers</a:documentation>
|
|
1272
1287
|
<a:documentation>Colophon or postface material</a:documentation>
|
1273
1288
|
</ref>
|
1274
1289
|
</optional>
|
1290
|
+
<optional>
|
1291
|
+
<ref name="review-container">
|
1292
|
+
<a:documentation>Annotations to the document</a:documentation>
|
1293
|
+
</ref>
|
1294
|
+
</optional>
|
1275
1295
|
</element>
|
1276
1296
|
</define>
|
1277
1297
|
<define name="misccontainer">
|
@@ -1282,6 +1302,13 @@ numbers</a:documentation>
|
|
1282
1302
|
</oneOrMore>
|
1283
1303
|
</element>
|
1284
1304
|
</define>
|
1305
|
+
<define name="review-container">
|
1306
|
+
<element name="review-container">
|
1307
|
+
<oneOrMore>
|
1308
|
+
<ref name="review"/>
|
1309
|
+
</oneOrMore>
|
1310
|
+
</element>
|
1311
|
+
</define>
|
1285
1312
|
<define name="preface">
|
1286
1313
|
<element name="preface">
|
1287
1314
|
<oneOrMore>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-bipm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|