metanorma-bipm 2.6.2 → 2.6.4
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 +177 -103
- data/lib/isodoc/bipm/bipm.guide.xsl +177 -103
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +177 -103
- data/lib/isodoc/bipm/bipm.rapport.xsl +177 -103
- data/lib/isodoc/bipm/html/htmlstyle.css +7 -0
- data/lib/isodoc/bipm/jcgm.standard.xsl +144 -34
- data/lib/isodoc/bipm/presentation_blocks.rb +28 -9
- data/lib/isodoc/bipm/presentation_footnotes.rb +112 -0
- data/lib/isodoc/bipm/presentation_xml_convert.rb +1 -77
- 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 +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77b04f5ff90d804819c75403f23f4b4dbf79d00ea133f514898fca0dac906f47
|
4
|
+
data.tar.gz: 77ed2c800f016c230684d7a339cb13f3583c9c2a97c9435c98ddaab3a004ce31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5143b13be29637770284c6c423dd03e0ecbae17a98c6b88a8c23e4d1a36e356978bb5fd0311ba7248c809e2a00d3e3736d23a1f45a4b919b89e8dbabee3ab34a
|
7
|
+
data.tar.gz: a34427e2b643fc0bec34425ba29575375db54d111662186238a75e0c4a8c8c85b9c2926bec334e85f439495a13d74c6373ef4bddc4adac6a12f9454c2a4565fe
|
@@ -617,6 +617,8 @@
|
|
617
617
|
</xsl:element>
|
618
618
|
</xsl:template>
|
619
619
|
|
620
|
+
<xsl:template match="*[local-name() = 'clause']/*[local-name() = 'fmt-footnote-container']" priority="3" mode="update_xml_pres"/>
|
621
|
+
|
620
622
|
<!-- ================================= -->
|
621
623
|
<!-- Flattening xml for fit notes at page sides (margins) -->
|
622
624
|
<!-- ================================= -->
|
@@ -714,6 +716,8 @@
|
|
714
716
|
<xsl:if test="local-name() = 'title' and @depth = 3 and ../bipm:clause/bipm:title/@depth = 4 and count(following-sibling::*[1][local-name() = 'note']) > 0">
|
715
717
|
<!-- then move here footnotes from clause level 4 -->
|
716
718
|
<xsl:for-each select="../bipm:clause//bipm:fn[ancestor::bipm:quote or not(ancestor::bipm:table)]">
|
719
|
+
<!-- <debug><xsl:for-each select="ancestor::*"><xsl:value-of select="local-name()"/>@<xsl:value-of select="@id"/><xsl:text>/</xsl:text></xsl:for-each>
|
720
|
+
</debug> -->
|
717
721
|
<xsl:call-template name="fn_to_note_side"/>
|
718
722
|
</xsl:for-each>
|
719
723
|
</xsl:if>
|
@@ -772,7 +776,6 @@
|
|
772
776
|
<xsl:otherwise>
|
773
777
|
<xsl:apply-templates select="." mode="fn_to_xref"/> <!-- displays asterisks with link to side note -->
|
774
778
|
<xsl:call-template name="fn_to_note_side"/> <!-- convert footnote to side note with asterisk at start -->
|
775
|
-
|
776
779
|
</xsl:otherwise>
|
777
780
|
</xsl:choose>
|
778
781
|
</xsl:template>
|
@@ -798,51 +801,17 @@
|
|
798
801
|
<xsl:template match="bipm:fn" mode="fn_to_xref">
|
799
802
|
<xsl:element name="xref" namespace="https://www.metanorma.org/ns/standoc">
|
800
803
|
|
801
|
-
<xsl:
|
802
|
-
<xsl:call-template name="fn_reference_to_xref_target"/>
|
803
|
-
</xsl:attribute>
|
804
|
-
<!-- <xsl:copy-of select="@target"/> -->
|
805
|
-
|
806
|
-
<xsl:variable name="curr_clause_id" select="normalize-space(ancestor::bipm:clause[1]/@id)"/>
|
807
|
-
<xsl:variable name="curr_annex_id" select="normalize-space(ancestor::bipm:annex[1]/@id)"/>
|
808
|
-
|
809
|
-
<xsl:variable name="number">
|
810
|
-
<xsl:choose>
|
811
|
-
<xsl:when test="$curr_clause_id != ''">
|
812
|
-
<xsl:number count="bipm:fn[ancestor::bipm:clause[1]/@id = $curr_clause_id][ancestor::bipm:quote or not(ancestor::bipm:table)]" level="any"/>
|
813
|
-
</xsl:when>
|
814
|
-
<xsl:otherwise>
|
815
|
-
<xsl:number count="bipm:fn[ancestor::bipm:annex[1]/@id = $curr_annex_id]"/>
|
816
|
-
</xsl:otherwise>
|
817
|
-
</xsl:choose>
|
818
|
-
</xsl:variable>
|
804
|
+
<xsl:copy-of select="@target"/>
|
819
805
|
|
820
806
|
<xsl:element name="sup_fn" namespace="https://www.metanorma.org/ns/standoc">
|
821
|
-
<xsl:value-of select="concat('(',$number,')')"/>
|
822
|
-
<!-- <xsl:value-of select="concat('(',normalize-space(./*[local-name() = 'fmt-fn-label']),')')"/> -->
|
807
|
+
<!-- <xsl:value-of select="concat('(',$number,')')"/> -->
|
823
808
|
<!-- https://github.com/metanorma/isodoc/issues/658#issuecomment-2726450824 -->
|
824
|
-
|
809
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-fn-label']/node()" mode="flatxml"/>
|
825
810
|
</xsl:element>
|
826
811
|
|
827
812
|
</xsl:element>
|
828
813
|
</xsl:template>
|
829
814
|
|
830
|
-
<!-- <xsl:template match="*[local-name() = 'fmt-fn-label']//*[local-name() = 'sup']" mode="flatxml">
|
831
|
-
<xsl:element name="sup_fn" namespace="https://www.metanorma.org/ns/standoc">
|
832
|
-
<xsl:apply-templates mode="flatxml"/>
|
833
|
-
</xsl:element>
|
834
|
-
</xsl:template> -->
|
835
|
-
|
836
|
-
<xsl:template name="fn_reference_to_xref_target">
|
837
|
-
<xsl:variable name="lang" select="ancestor::bipm:metanorma/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
838
|
-
<xsl:variable name="gen_id" select="generate-id()"/>
|
839
|
-
<xsl:variable name="curr_clause_id" select="ancestor::bipm:clause[1]/@id"/>
|
840
|
-
<xsl:variable name="number">
|
841
|
-
<xsl:number count="bipm:fn[ancestor::bipm:clause[1]/@id = $curr_clause_id][ancestor::bipm:quote or not(ancestor::bipm:table)]" level="any"/>
|
842
|
-
</xsl:variable>
|
843
|
-
<xsl:value-of select="concat($lang, '_footnote_', @reference, '_', $number, '_', $gen_id)"/>
|
844
|
-
</xsl:template>
|
845
|
-
|
846
815
|
<xsl:template match="bipm:preface/bipm:clause[not(@type = 'toc')][position() > 1]" mode="flatxml">
|
847
816
|
<xsl:copy-of select="."/>
|
848
817
|
</xsl:template>
|
@@ -917,9 +886,7 @@
|
|
917
886
|
<!-- move all footnotes in the current list (not only current list item) into first 'li' -->
|
918
887
|
<xsl:variable name="curr_list_id" select="../@id"/>
|
919
888
|
<xsl:for-each select="..//bipm:fn[ancestor::bipm:ol[1]/@id = $curr_list_id or ancestor::bipm:ul[1]/@id = $curr_list_id]">
|
920
|
-
|
921
889
|
<xsl:call-template name="fn_to_note_side"/>
|
922
|
-
|
923
890
|
</xsl:for-each>
|
924
891
|
|
925
892
|
</xsl:otherwise>
|
@@ -940,39 +907,32 @@
|
|
940
907
|
</xsl:template>
|
941
908
|
|
942
909
|
<xsl:template name="fn_to_note_side">
|
943
|
-
<xsl:
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
910
|
+
<xsl:variable name="target" select="@target"/>
|
911
|
+
<xsl:choose>
|
912
|
+
<!-- skip side note, see the comment https://github.com/metanorma/isodoc/issues/658#issuecomment-2768874528: -->
|
913
|
+
<!-- every repeated footnote is only rendered at the first instance -->
|
914
|
+
<xsl:when test="preceding::*[@target = $target]"/>
|
915
|
+
<xsl:otherwise>
|
916
|
+
<xsl:element name="note_side" namespace="https://www.metanorma.org/ns/standoc">
|
949
917
|
|
950
|
-
|
918
|
+
<xsl:attribute name="id">
|
919
|
+
<xsl:value-of select="@target"/>
|
920
|
+
</xsl:attribute>
|
951
921
|
|
952
|
-
|
953
|
-
<xsl:variable name="curr_annex_id" select="normalize-space(ancestor::bipm:annex[1]/@id)"/>
|
922
|
+
<xsl:variable name="curr_id" select="@target"/>
|
954
923
|
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
<xsl:
|
959
|
-
</xsl:
|
960
|
-
<xsl:
|
961
|
-
<xsl:number count="bipm:fn[ancestor::bipm:annex[1]/@id = $curr_annex_id]"/>
|
962
|
-
</xsl:otherwise>
|
963
|
-
</xsl:choose>
|
964
|
-
</xsl:variable>
|
965
|
-
|
966
|
-
<xsl:element name="sup_fn" namespace="https://www.metanorma.org/ns/standoc">
|
967
|
-
<xsl:value-of select="concat('(',$number,')')"/>
|
968
|
-
<!-- https://github.com/metanorma/isodoc/issues/658#issuecomment-2726450824 -->
|
969
|
-
<!-- <xsl:apply-templates select="*[local-name() = 'fmt-fn-label']/node()" mode="flatxml"/> -->
|
970
|
-
</xsl:element>
|
971
|
-
<xsl:text> </xsl:text>
|
924
|
+
<xsl:element name="sup_fn" namespace="https://www.metanorma.org/ns/standoc">
|
925
|
+
<!-- <xsl:value-of select="concat('(',$number,')')"/> -->
|
926
|
+
<!-- https://github.com/metanorma/isodoc/issues/658#issuecomment-2726450824 -->
|
927
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-fn-label']/node()" mode="flatxml"/>
|
928
|
+
</xsl:element>
|
929
|
+
<xsl:text> </xsl:text>
|
972
930
|
|
973
|
-
|
974
|
-
|
975
|
-
|
931
|
+
<!-- <xsl:apply-templates mode="flatxml"/> -->
|
932
|
+
<xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $curr_id]/node()" mode="flatxml"/>
|
933
|
+
</xsl:element>
|
934
|
+
</xsl:otherwise>
|
935
|
+
</xsl:choose>
|
976
936
|
</xsl:template>
|
977
937
|
|
978
938
|
<!-- remove latest elements (after li), because they moved into latest 'li' -->
|
@@ -1000,6 +960,10 @@
|
|
1000
960
|
</xsl:if>
|
1001
961
|
</xsl:template>
|
1002
962
|
|
963
|
+
<xsl:template match="*[local-name() = 'fn']/*[local-name() = 'fmt-fn-label']/*[local-name() = 'sup']" priority="5" mode="flatxml">
|
964
|
+
<xsl:apply-templates mode="flatxml"/>
|
965
|
+
</xsl:template>
|
966
|
+
|
1003
967
|
<!-- ================================= -->
|
1004
968
|
<!-- END: Flattening xml for fit notes at page sides (margins) -->
|
1005
969
|
<!-- ================================= -->
|
@@ -7342,6 +7306,8 @@
|
|
7342
7306
|
<xsl:attribute name="min-height">5mm</xsl:attribute>
|
7343
7307
|
</xsl:if>
|
7344
7308
|
|
7309
|
+
<xsl:call-template name="setColors"/>
|
7310
|
+
|
7345
7311
|
</xsl:template> <!-- setTableRowAttributes -->
|
7346
7312
|
<!-- ===================== -->
|
7347
7313
|
<!-- END Table's row processing -->
|
@@ -7393,6 +7359,7 @@
|
|
7393
7359
|
</xsl:attribute>
|
7394
7360
|
</xsl:if>
|
7395
7361
|
<xsl:call-template name="display-align"/>
|
7362
|
+
<xsl:call-template name="setColors"/>
|
7396
7363
|
</xsl:template>
|
7397
7364
|
|
7398
7365
|
<xsl:template name="display-align">
|
@@ -7408,6 +7375,29 @@
|
|
7408
7375
|
</xsl:if>
|
7409
7376
|
</xsl:template>
|
7410
7377
|
|
7378
|
+
<xsl:template name="setColors">
|
7379
|
+
<xsl:variable name="styles__">
|
7380
|
+
<xsl:call-template name="split">
|
7381
|
+
<xsl:with-param name="pText" select="concat(@style,';')"/>
|
7382
|
+
<xsl:with-param name="sep" select="';'"/>
|
7383
|
+
</xsl:call-template>
|
7384
|
+
</xsl:variable>
|
7385
|
+
<xsl:variable name="quot">"</xsl:variable>
|
7386
|
+
<xsl:variable name="styles_">
|
7387
|
+
<xsl:for-each select="xalan:nodeset($styles__)/item">
|
7388
|
+
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
7389
|
+
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
7390
|
+
<xsl:if test="$key = 'color' or $key = 'background-color'">
|
7391
|
+
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
7392
|
+
</xsl:if>
|
7393
|
+
</xsl:for-each>
|
7394
|
+
</xsl:variable>
|
7395
|
+
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
7396
|
+
<xsl:for-each select="$styles/style">
|
7397
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
7398
|
+
</xsl:for-each>
|
7399
|
+
</xsl:template>
|
7400
|
+
|
7411
7401
|
<!-- cell in table body, footer -->
|
7412
7402
|
<xsl:template match="*[local-name()='td']" name="td">
|
7413
7403
|
<fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
|
@@ -7419,12 +7409,12 @@
|
|
7419
7409
|
|
7420
7410
|
<xsl:call-template name="refine_table-cell-style"/>
|
7421
7411
|
|
7412
|
+
<xsl:call-template name="setTableCellAttributes"/>
|
7413
|
+
|
7422
7414
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
7423
7415
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
7424
7416
|
</xsl:if>
|
7425
7417
|
|
7426
|
-
<xsl:call-template name="setTableCellAttributes"/>
|
7427
|
-
|
7428
7418
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
7429
7419
|
<xsl:attribute name="border">1pt solid black</xsl:attribute> <!-- border is mandatory, to determine page width -->
|
7430
7420
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
@@ -9225,7 +9215,7 @@
|
|
9225
9215
|
<xsl:choose>
|
9226
9216
|
<xsl:when test="ancestor::*[local-name() = 'table']"><xsl:apply-templates/></xsl:when>
|
9227
9217
|
<xsl:when test="following-sibling::*[2][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']">
|
9228
|
-
<fo:inline keep-with-next.within-line="always"><xsl:apply-templates/></fo:inline>
|
9218
|
+
<fo:inline keep-with-next.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
|
9229
9219
|
</xsl:when>
|
9230
9220
|
<xsl:otherwise>
|
9231
9221
|
<xsl:apply-templates/>
|
@@ -9233,7 +9223,7 @@
|
|
9233
9223
|
</xsl:choose>
|
9234
9224
|
</xsl:template>
|
9235
9225
|
<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">
|
9236
|
-
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
9226
|
+
<fo:inline keep-with-next.within-line="always" role="SKIP"><xsl:value-of select="."/></fo:inline>
|
9237
9227
|
</xsl:template>
|
9238
9228
|
|
9239
9229
|
<xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
|
@@ -10298,24 +10288,26 @@
|
|
10298
10288
|
<xsl:apply-templates select="." mode="mathml"/>
|
10299
10289
|
</xsl:variable>
|
10300
10290
|
|
10301
|
-
<fo:instream-foreign-object fox:alt-text="Math">
|
10291
|
+
<fo:instream-foreign-object fox:alt-text="Math" fox:actual-text="Math">
|
10302
10292
|
|
10303
10293
|
<xsl:call-template name="refine_mathml_insteam_object_style"/>
|
10304
10294
|
|
10305
|
-
|
10306
|
-
|
10307
|
-
|
10308
|
-
<xsl:
|
10309
|
-
|
10310
|
-
|
10311
|
-
<!-- <xsl:if test="$add_math_as_text = 'true'"> -->
|
10312
|
-
<xsl:if test="normalize-space($asciimath_text_) != ''">
|
10313
|
-
<!-- put Mathin Alternate Text -->
|
10314
|
-
<xsl:attribute name="fox:alt-text">
|
10315
|
-
<xsl:value-of select="$asciimath_text_"/>
|
10295
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
10296
|
+
<!-- put MathML in Actual Text -->
|
10297
|
+
<!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
|
10298
|
+
<xsl:attribute name="fox:actual-text">
|
10299
|
+
<xsl:value-of select="$mathml_content"/>
|
10316
10300
|
</xsl:attribute>
|
10301
|
+
|
10302
|
+
<!-- <xsl:if test="$add_math_as_text = 'true'"> -->
|
10303
|
+
<xsl:if test="normalize-space($asciimath_text_) != ''">
|
10304
|
+
<!-- put Mathin Alternate Text -->
|
10305
|
+
<xsl:attribute name="fox:alt-text">
|
10306
|
+
<xsl:value-of select="$asciimath_text_"/>
|
10307
|
+
</xsl:attribute>
|
10308
|
+
</xsl:if>
|
10309
|
+
<!-- </xsl:if> -->
|
10317
10310
|
</xsl:if>
|
10318
|
-
<!-- </xsl:if> -->
|
10319
10311
|
|
10320
10312
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
10321
10313
|
|
@@ -12099,6 +12091,8 @@
|
|
12099
12091
|
<xsl:template match="*[local-name() = 'origin']" mode="contents"/>
|
12100
12092
|
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents"/>
|
12101
12093
|
|
12094
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="contents" priority="3"/>
|
12095
|
+
|
12102
12096
|
<xsl:template match="*[local-name() = 'stem']" mode="bookmarks"/>
|
12103
12097
|
<xsl:template match="*[local-name() = 'fmt-stem']" mode="bookmarks">
|
12104
12098
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -12120,6 +12114,8 @@
|
|
12120
12114
|
<xsl:template match="*[local-name() = 'origin']" mode="bookmarks"/>
|
12121
12115
|
<xsl:template match="*[local-name() = 'erefstack ']" mode="bookmarks"/>
|
12122
12116
|
|
12117
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="bookmarks" priority="3"/>
|
12118
|
+
|
12123
12119
|
<!-- Bookmarks -->
|
12124
12120
|
<xsl:template name="addBookmarks">
|
12125
12121
|
<xsl:param name="contents"/>
|
@@ -14014,21 +14010,32 @@
|
|
14014
14010
|
<!-- ========== -->
|
14015
14011
|
|
14016
14012
|
<xsl:variable name="reviews_">
|
14017
|
-
<xsl:for-each select="//*[local-name() = 'review'][@from]">
|
14013
|
+
<xsl:for-each select="//*[local-name() = 'review'][not(parent::*[local-name() = 'review-container'])][@from]">
|
14018
14014
|
<xsl:copy>
|
14019
14015
|
<xsl:copy-of select="@from"/>
|
14020
14016
|
<xsl:copy-of select="@id"/>
|
14021
14017
|
</xsl:copy>
|
14022
14018
|
</xsl:for-each>
|
14019
|
+
<xsl:for-each select="//*[local-name() = 'fmt-review-start'][@source]">
|
14020
|
+
<xsl:copy>
|
14021
|
+
<xsl:copy-of select="@source"/>
|
14022
|
+
<xsl:copy-of select="@id"/>
|
14023
|
+
</xsl:copy>
|
14024
|
+
</xsl:for-each>
|
14023
14025
|
</xsl:variable>
|
14024
14026
|
<xsl:variable name="reviews" select="xalan:nodeset($reviews_)"/>
|
14025
14027
|
|
14026
14028
|
<xsl:template name="addReviewHelper">
|
14027
|
-
|
14028
|
-
|
14029
|
-
|
14030
|
-
|
14031
|
-
<
|
14029
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
14030
|
+
<!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
|
14031
|
+
<xsl:variable name="curr_id" select="@id"/>
|
14032
|
+
<!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
|
14033
|
+
<xsl:for-each select="$reviews//*[local-name() = 'review'][@from = $curr_id]"> <!-- $reviews//*[local-name() = 'fmt-review-start'][@source = $curr_id] -->
|
14034
|
+
<xsl:variable name="review_id" select="normalize-space(@id)"/>
|
14035
|
+
<xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
|
14036
|
+
<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>
|
14037
|
+
</xsl:if>
|
14038
|
+
</xsl:for-each>
|
14032
14039
|
</xsl:if>
|
14033
14040
|
<!-- <fo:block>
|
14034
14041
|
<curr_id><xsl:value-of select="$curr_id"/></curr_id>
|
@@ -14167,14 +14174,61 @@
|
|
14167
14174
|
|
14168
14175
|
</xsl:template>
|
14169
14176
|
|
14170
|
-
|
14177
|
+
<!-- document text (not figures, or tables) footnotes -->
|
14178
|
+
<xsl:variable name="reviews_container_">
|
14179
|
+
<xsl:for-each select="//*[local-name() = 'review-container']/*[local-name() = 'fmt-review-body']">
|
14180
|
+
<xsl:variable name="update_xml_step1">
|
14181
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
14182
|
+
</xsl:variable>
|
14183
|
+
<xsl:apply-templates select="xalan:nodeset($update_xml_step1)" mode="update_xml_enclose_keep-together_within-line"/>
|
14184
|
+
</xsl:for-each>
|
14185
|
+
</xsl:variable>
|
14186
|
+
<xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
|
14187
|
+
|
14188
|
+
<xsl:template match="*[local-name() = 'review-container']"/>
|
14189
|
+
|
14190
|
+
<!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
|
14191
|
+
<xsl:template match="*[local-name() = 'review'][not(parent::*[local-name() = 'review-container'])]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
14192
|
+
<xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
|
14193
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
14194
|
+
<xsl:choose>
|
14195
|
+
<!-- if there isn't the attribute '@from', then -->
|
14196
|
+
<xsl:when test="$id_from = ''">
|
14197
|
+
<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>
|
14198
|
+
</xsl:when>
|
14199
|
+
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
14200
|
+
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
14201
|
+
<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>
|
14202
|
+
</xsl:when>
|
14203
|
+
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
14204
|
+
<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>
|
14205
|
+
</xsl:when>
|
14206
|
+
</xsl:choose>
|
14207
|
+
</xsl:if>
|
14208
|
+
</xsl:template>
|
14209
|
+
|
14210
|
+
<!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
|
14211
|
+
<xsl:template match="*[local-name() = 'fmt-review-start']" name="fmt-review-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
14171
14212
|
<!-- comment 2019-11-29 -->
|
14172
14213
|
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
14173
14214
|
<xsl:apply-templates /> -->
|
14174
14215
|
|
14175
|
-
<xsl:variable name="id_from" select="normalize-space(current()/@
|
14216
|
+
<xsl:variable name="id_from" select="normalize-space(current()/@source)"/>
|
14176
14217
|
|
14177
|
-
<xsl:
|
14218
|
+
<xsl:variable name="source" select="normalize-space(@source)"/>
|
14219
|
+
|
14220
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
14221
|
+
<!-- <xsl:variable name="id_from" select="normalize-space(current()/@from)"/> -->
|
14222
|
+
|
14223
|
+
<!-- <xsl:if test="@source = @end"> -->
|
14224
|
+
<!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
|
14225
|
+
following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
|
14226
|
+
<!-- <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> -->
|
14227
|
+
<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>
|
14228
|
+
<!-- </xsl:if> -->
|
14229
|
+
</xsl:if>
|
14230
|
+
|
14231
|
+
<xsl:if test="1 = 2">
|
14178
14232
|
<xsl:choose>
|
14179
14233
|
<!-- if there isn't the attribute '@from', then -->
|
14180
14234
|
<xsl:when test="$id_from = ''">
|
@@ -14182,10 +14236,10 @@
|
|
14182
14236
|
</xsl:when>
|
14183
14237
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
14184
14238
|
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
14185
|
-
<fo:block id="{
|
14239
|
+
<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>
|
14186
14240
|
</xsl:when>
|
14187
14241
|
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
14188
|
-
<fo:block id="{
|
14242
|
+
<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>
|
14189
14243
|
</xsl:when>
|
14190
14244
|
</xsl:choose>
|
14191
14245
|
</xsl:if>
|
@@ -14236,16 +14290,21 @@
|
|
14236
14290
|
<xsl:variable name="list_level">
|
14237
14291
|
<xsl:choose>
|
14238
14292
|
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
|
14239
|
-
<xsl:
|
14293
|
+
<xsl:when test="$ul_labels/label[@level = 3]"><xsl:value-of select="$list_level_ mod 3"/></xsl:when>
|
14294
|
+
<xsl:when test="$list_level_ mod 2 = 0">2</xsl:when>
|
14295
|
+
<xsl:otherwise><xsl:value-of select="$list_level_ mod 2"/></xsl:otherwise>
|
14240
14296
|
</xsl:choose>
|
14241
14297
|
</xsl:variable>
|
14242
14298
|
<xsl:choose>
|
14243
14299
|
<xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
|
14244
14300
|
<xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
|
14245
14301
|
</xsl:when>
|
14246
|
-
<xsl:when test="$list_level mod 3 = 0">
|
14302
|
+
<xsl:when test="$list_level mod 3 = 0 and $ul_labels/label[@level = 3]">
|
14247
14303
|
<xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
|
14248
14304
|
</xsl:when>
|
14305
|
+
<xsl:when test="$list_level mod 3 = 0">
|
14306
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
|
14307
|
+
</xsl:when>
|
14249
14308
|
<xsl:when test="$list_level mod 2 = 0">
|
14250
14309
|
<xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
|
14251
14310
|
</xsl:when>
|
@@ -14790,10 +14849,22 @@
|
|
14790
14849
|
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'bookmark']" priority="2"/>
|
14791
14850
|
|
14792
14851
|
<xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
14793
|
-
|
14794
|
-
<
|
14795
|
-
|
14796
|
-
|
14852
|
+
<xsl:variable name="bookmark_id" select="@id"/>
|
14853
|
+
<xsl:choose>
|
14854
|
+
<!-- Example:
|
14855
|
+
<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"/>
|
14856
|
+
<bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
|
14857
|
+
<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"/> -->
|
14858
|
+
<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]">
|
14859
|
+
<!-- skip here, see the template 'fmt-review-start' -->
|
14860
|
+
</xsl:when>
|
14861
|
+
<xsl:otherwise>
|
14862
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
14863
|
+
<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>
|
14864
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
14865
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
14866
|
+
</xsl:otherwise>
|
14867
|
+
</xsl:choose>
|
14797
14868
|
</xsl:template>
|
14798
14869
|
<!-- =================== -->
|
14799
14870
|
<!-- End of Index processing -->
|
@@ -16139,6 +16210,9 @@
|
|
16139
16210
|
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_step1"/>
|
16140
16211
|
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_pres"/>
|
16141
16212
|
|
16213
|
+
<xsl:template match="*[local-name() = 'review-container']" mode="update_xml_step1"/>
|
16214
|
+
<xsl:template match="*[local-name() = 'review-container']" mode="update_xml_pres"/>
|
16215
|
+
|
16142
16216
|
<!-- END: update new Presentation XML -->
|
16143
16217
|
|
16144
16218
|
<!-- =========================================================================== -->
|