metanorma-iho 1.0.6 → 1.0.7
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/iho/iho.specification.xsl +195 -22
- data/lib/isodoc/iho/iho.standard.xsl +195 -22
- data/lib/isodoc/iho/init.rb +0 -6
- data/lib/isodoc/iho/pdf_convert.rb +1 -1
- data/lib/isodoc/iho/presentation_xml_convert.rb +18 -0
- data/lib/isodoc/iho/word_convert.rb +2 -2
- data/lib/metanorma/iho/biblio.rng +13 -1
- data/lib/metanorma/iho/boilerplate.adoc +3 -3
- data/lib/metanorma/iho/isodoc.rng +6 -6
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e9434c5b72be17bea8d126b781127753400780ee789b368a20e1ac85482659b
|
4
|
+
data.tar.gz: 1f8f15718e02827d3c1e57277043ff513bd9a02c6e76ae7eee1767c3b3c1588c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd3f99c6486a562182115a411518931e1fa9dcb5fb5e950f13de78c40f73af2c92beb245c66549eccc3a7268952dcdc42051090fc53ce1b7637bf5bebfb49b70
|
7
|
+
data.tar.gz: e89bb9d6c6bf30b3a76a0e0bba82fdca8969ad34ae784bf0a8aca9c6eb517c3ef24fb81793096c69c072336ad41af48357139788504816aed70c3eb573328df4
|
@@ -607,6 +607,7 @@
|
|
607
607
|
<xsl:otherwise>
|
608
608
|
<fo:block>
|
609
609
|
<xsl:call-template name="setId"/>
|
610
|
+
<xsl:call-template name="addReviewHelper"/>
|
610
611
|
<xsl:apply-templates/>
|
611
612
|
</fo:block>
|
612
613
|
</xsl:otherwise>
|
@@ -4383,6 +4384,11 @@
|
|
4383
4384
|
|
4384
4385
|
<xsl:value-of select="@reference"/>
|
4385
4386
|
|
4387
|
+
<!-- commented https://github.com/metanorma/isodoc/issues/614 -->
|
4388
|
+
<!-- <xsl:if test="$namespace = 'itu'">
|
4389
|
+
<xsl:text>)</xsl:text>
|
4390
|
+
</xsl:if> -->
|
4391
|
+
|
4386
4392
|
</fo:inline>
|
4387
4393
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
4388
4394
|
<xsl:copy-of select="./node()"/>
|
@@ -4392,7 +4398,7 @@
|
|
4392
4398
|
|
4393
4399
|
</xsl:if>
|
4394
4400
|
</xsl:for-each>
|
4395
|
-
</xsl:template>
|
4401
|
+
</xsl:template> <!-- table_fn_display -->
|
4396
4402
|
|
4397
4403
|
<xsl:template name="create_fn">
|
4398
4404
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
@@ -4420,8 +4426,10 @@
|
|
4420
4426
|
<!-- EMD table's footnotes rendering -->
|
4421
4427
|
<!-- ============================ -->
|
4422
4428
|
|
4429
|
+
<!-- ============================ -->
|
4423
4430
|
<!-- figure's footnotes rendering -->
|
4424
|
-
|
4431
|
+
<!-- ============================ -->
|
4432
|
+
<xsl:template name="fn_display_figure"> <!-- figure_fn_display -->
|
4425
4433
|
|
4426
4434
|
<!-- current figure id -->
|
4427
4435
|
<xsl:variable name="figure_id_">
|
@@ -4534,9 +4542,28 @@
|
|
4534
4542
|
|
4535
4543
|
</fo:block>
|
4536
4544
|
</xsl:if>
|
4537
|
-
|
4538
4545
|
</xsl:template> <!-- fn_display_figure -->
|
4539
4546
|
|
4547
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
4548
|
+
<!-- figure's footnote label -->
|
4549
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'dl'][@key = 'true']/*[local-name() = 'dt']/ *[local-name() = 'p'][count(node()[normalize-space() != '']) = 1]/*[local-name() = 'sup']" priority="3">
|
4550
|
+
<xsl:variable name="key_iso">
|
4551
|
+
|
4552
|
+
</xsl:variable>
|
4553
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
4554
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
4555
|
+
|
4556
|
+
</xsl:if>
|
4557
|
+
<fo:inline xsl:use-attribute-sets="figure-fn-number-style"> <!-- id="{@id}" -->
|
4558
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
4559
|
+
<xsl:apply-templates/>
|
4560
|
+
</fo:inline>
|
4561
|
+
</xsl:template>
|
4562
|
+
|
4563
|
+
<!-- ============================ -->
|
4564
|
+
<!-- END: figure's footnotes rendering -->
|
4565
|
+
<!-- ============================ -->
|
4566
|
+
|
4540
4567
|
<!-- fn reference in the text rendering (for instance, 'some text 1) some text' ) -->
|
4541
4568
|
<xsl:template match="*[local-name()='fn']">
|
4542
4569
|
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
@@ -4552,6 +4579,10 @@
|
|
4552
4579
|
|
4553
4580
|
<xsl:value-of select="@reference"/>
|
4554
4581
|
|
4582
|
+
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
4583
|
+
<!-- <xsl:if test="$namespace = 'jis'">
|
4584
|
+
<fo:inline font-weight="normal">)</fo:inline>
|
4585
|
+
</xsl:if> -->
|
4555
4586
|
</fo:basic-link>
|
4556
4587
|
</fo:inline>
|
4557
4588
|
</xsl:template>
|
@@ -4678,17 +4709,22 @@
|
|
4678
4709
|
</fo:block>
|
4679
4710
|
</xsl:when> <!-- END: a few components -->
|
4680
4711
|
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
|
4681
|
-
|
4712
|
+
<!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
|
4713
|
+
<xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
|
4682
4714
|
|
4683
|
-
|
4715
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
4684
4716
|
|
4685
|
-
|
4686
|
-
|
4687
|
-
|
4688
|
-
|
4689
|
-
|
4690
|
-
|
4691
|
-
|
4717
|
+
<xsl:call-template name="refine_figure_key_style"/>
|
4718
|
+
|
4719
|
+
<xsl:variable name="title-key">
|
4720
|
+
<xsl:call-template name="getLocalizedString">
|
4721
|
+
<xsl:with-param name="key">key</xsl:with-param>
|
4722
|
+
</xsl:call-template>
|
4723
|
+
</xsl:variable>
|
4724
|
+
<xsl:value-of select="$title-key"/>
|
4725
|
+
</fo:block>
|
4726
|
+
|
4727
|
+
</xsl:if>
|
4692
4728
|
</xsl:when> <!-- END: definition list in a figure -->
|
4693
4729
|
</xsl:choose>
|
4694
4730
|
|
@@ -4876,6 +4912,14 @@
|
|
4876
4912
|
|
4877
4913
|
</xsl:template> <!-- END: dl -->
|
4878
4914
|
|
4915
|
+
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
4916
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
4917
|
+
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
4918
|
+
<xsl:call-template name="refine_figure_key_style"/>
|
4919
|
+
<xsl:apply-templates/>
|
4920
|
+
</fo:block>
|
4921
|
+
</xsl:template>
|
4922
|
+
|
4879
4923
|
<xsl:template name="refine_dl_formula_where_style">
|
4880
4924
|
|
4881
4925
|
</xsl:template> <!-- refine_dl_formula_where_style -->
|
@@ -6982,6 +7026,39 @@
|
|
6982
7026
|
</xsl:copy>
|
6983
7027
|
</xsl:template>
|
6984
7028
|
|
7029
|
+
<xsl:template match="@*|node()" mode="mathml_linebreak">
|
7030
|
+
<xsl:copy>
|
7031
|
+
<xsl:apply-templates select="@*|node()" mode="mathml_linebreak"/>
|
7032
|
+
</xsl:copy>
|
7033
|
+
</xsl:template>
|
7034
|
+
|
7035
|
+
<!-- split math into two math -->
|
7036
|
+
<xsl:template match="mathml:mo[@linebreak] | mathml:mspace[@linebreak]" mode="mathml_linebreak">
|
7037
|
+
<xsl:variable name="math_elements_tree_">
|
7038
|
+
<xsl:for-each select="ancestor::*[ancestor-or-self::mathml:math]">
|
7039
|
+
<element pos="{position()}">
|
7040
|
+
<xsl:copy-of select="@*[local-name() != 'id']"/>
|
7041
|
+
<xsl:value-of select="name()"/>
|
7042
|
+
</element>
|
7043
|
+
</xsl:for-each>
|
7044
|
+
</xsl:variable>
|
7045
|
+
|
7046
|
+
<xsl:variable name="math_elements_tree" select="xalan:nodeset($math_elements_tree_)"/>
|
7047
|
+
|
7048
|
+
<xsl:call-template name="insertClosingElements">
|
7049
|
+
<xsl:with-param name="tree" select="$math_elements_tree"/>
|
7050
|
+
</xsl:call-template>
|
7051
|
+
|
7052
|
+
<xsl:element name="br" namespace="{$namespace_full}"/>
|
7053
|
+
|
7054
|
+
<xsl:call-template name="insertOpeningElements">
|
7055
|
+
<xsl:with-param name="tree" select="$math_elements_tree"/>
|
7056
|
+
<xsl:with-param name="xmlns">http://www.w3.org/1998/Math/MathML</xsl:with-param>
|
7057
|
+
<xsl:with-param name="add_continue">false</xsl:with-param>
|
7058
|
+
</xsl:call-template>
|
7059
|
+
|
7060
|
+
</xsl:template>
|
7061
|
+
|
6985
7062
|
<!-- Examples:
|
6986
7063
|
<stem type="AsciiMath">x = 1</stem>
|
6987
7064
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
@@ -7233,9 +7310,11 @@
|
|
7233
7310
|
</xsl:template>
|
7234
7311
|
|
7235
7312
|
<xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"> <!-- show in 'stem' template -->
|
7313
|
+
<!-- https://github.com/metanorma/isodoc/issues/607
|
7236
7314
|
<xsl:if test="normalize-space() != ''">
|
7237
|
-
<xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
|
7238
|
-
</xsl:if>
|
7315
|
+
<xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
|
7316
|
+
</xsl:if> -->
|
7317
|
+
<xsl:apply-templates/>
|
7239
7318
|
</xsl:template>
|
7240
7319
|
|
7241
7320
|
<!-- stem inside formula with name (with formula's number) -->
|
@@ -7391,8 +7470,17 @@
|
|
7391
7470
|
</xsl:when>
|
7392
7471
|
<xsl:otherwise>
|
7393
7472
|
|
7473
|
+
<!-- https://github.com/metanorma/isodoc/issues/607 -->
|
7474
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
7475
|
+
<xsl:text>—</xsl:text> em dash —
|
7476
|
+
</xsl:if> -->
|
7477
|
+
<!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
|
7394
7478
|
<xsl:text>:</xsl:text>
|
7479
|
+
</xsl:if> -->
|
7395
7480
|
|
7481
|
+
<!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
7482
|
+
<xsl:text> – </xsl:text> en dash –
|
7483
|
+
</xsl:if> -->
|
7396
7484
|
</xsl:otherwise>
|
7397
7485
|
</xsl:choose>
|
7398
7486
|
</xsl:variable>
|
@@ -7411,6 +7499,16 @@
|
|
7411
7499
|
</xsl:when>
|
7412
7500
|
<xsl:otherwise>
|
7413
7501
|
|
7502
|
+
<!-- https://github.com/metanorma/isodoc/issues/607 -->
|
7503
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
7504
|
+
<xsl:text>—</xsl:text> em dash —
|
7505
|
+
</xsl:if> -->
|
7506
|
+
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' or $namespace = 'rsd' or $namespace = 'jcgm'">
|
7507
|
+
<xsl:text>:</xsl:text>
|
7508
|
+
</xsl:if> -->
|
7509
|
+
<!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'unece-rec' or $namespace = 'unece'">
|
7510
|
+
<xsl:text> – </xsl:text> en dash –
|
7511
|
+
</xsl:if> -->
|
7414
7512
|
</xsl:otherwise>
|
7415
7513
|
</xsl:choose>
|
7416
7514
|
</xsl:variable>
|
@@ -9577,7 +9675,7 @@
|
|
9577
9675
|
<xsl:if test="normalize-space() != ''">
|
9578
9676
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
9579
9677
|
<xsl:call-template name="refine_termexample-name-style"/>
|
9580
|
-
<xsl:apply-templates/>
|
9678
|
+
<xsl:apply-templates/> <!-- commented $namespace = 'ieee', https://github.com/metanorma/isodoc/issues/614-->
|
9581
9679
|
</fo:inline>
|
9582
9680
|
</xsl:if>
|
9583
9681
|
</xsl:template>
|
@@ -9739,7 +9837,7 @@
|
|
9739
9837
|
<xsl:otherwise>
|
9740
9838
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
9741
9839
|
<xsl:call-template name="refine_example-name-style"/>
|
9742
|
-
<xsl:apply-templates/>:
|
9840
|
+
<xsl:apply-templates/>: <!-- $namespace = 'ieee', see https://github.com/metanorma/isodoc/issues/614 -->
|
9743
9841
|
</fo:inline>
|
9744
9842
|
</xsl:otherwise>
|
9745
9843
|
</xsl:choose>
|
@@ -9921,15 +10019,17 @@
|
|
9921
10019
|
|
9922
10020
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
9923
10021
|
<fo:block role="BlockQuote">
|
9924
|
-
<xsl:apply-templates select="./node()[not(local-name() = 'author') and
|
10022
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source') and not(local-name() = 'attribution')]"/> <!-- process all nested nodes, except author and source -->
|
9925
10023
|
</fo:block>
|
9926
10024
|
</fo:block-container>
|
9927
10025
|
</fo:block-container>
|
9928
|
-
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
10026
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source'] or *[local-name() = 'attribution']">
|
9929
10027
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
9930
10028
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
9931
10029
|
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
9932
10030
|
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
10031
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
10032
|
+
<xsl:apply-templates select="*[local-name() = 'attribution']/*[local-name() = 'p']/node()"/>
|
9933
10033
|
</fo:block>
|
9934
10034
|
</xsl:if>
|
9935
10035
|
|
@@ -9951,9 +10051,13 @@
|
|
9951
10051
|
</xsl:template>
|
9952
10052
|
|
9953
10053
|
<xsl:template match="*[local-name() = 'author']">
|
9954
|
-
<xsl:
|
10054
|
+
<xsl:if test="local-name(..) = 'quote'"> <!-- for old Presentation XML, https://github.com/metanorma/isodoc/issues/607 -->
|
10055
|
+
<xsl:text>— </xsl:text>
|
10056
|
+
</xsl:if>
|
9955
10057
|
<xsl:apply-templates/>
|
9956
10058
|
</xsl:template>
|
10059
|
+
|
10060
|
+
<xsl:template match="*[local-name() = 'quote']//*[local-name() = 'referenceFrom']"/>
|
9957
10061
|
<!-- ====== -->
|
9958
10062
|
<!-- ====== -->
|
9959
10063
|
|
@@ -10135,8 +10239,12 @@
|
|
10135
10239
|
</xsl:template>
|
10136
10240
|
|
10137
10241
|
<xsl:template match="*[local-name() = 'domain']">
|
10242
|
+
<!-- https://github.com/metanorma/isodoc/issues/607
|
10138
10243
|
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
10139
|
-
<xsl:text> </xsl:text>
|
10244
|
+
<xsl:text> </xsl:text> -->
|
10245
|
+
<xsl:if test="not(@hidden = 'true')">
|
10246
|
+
<xsl:apply-templates/>
|
10247
|
+
</xsl:if>
|
10140
10248
|
</xsl:template>
|
10141
10249
|
|
10142
10250
|
<xsl:template match="*[local-name() = 'admitted']">
|
@@ -10184,6 +10292,29 @@
|
|
10184
10292
|
<!-- END definition -->
|
10185
10293
|
<!-- ========== -->
|
10186
10294
|
|
10295
|
+
<xsl:variable name="reviews_">
|
10296
|
+
<xsl:for-each select="//*[local-name() = 'review'][@from]">
|
10297
|
+
<xsl:copy>
|
10298
|
+
<xsl:copy-of select="@from"/>
|
10299
|
+
<xsl:copy-of select="@id"/>
|
10300
|
+
</xsl:copy>
|
10301
|
+
</xsl:for-each>
|
10302
|
+
</xsl:variable>
|
10303
|
+
<xsl:variable name="reviews" select="xalan:nodeset($reviews_)"/>
|
10304
|
+
|
10305
|
+
<xsl:template name="addReviewHelper">
|
10306
|
+
<!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
|
10307
|
+
<xsl:variable name="curr_id" select="@id"/>
|
10308
|
+
<xsl:variable name="review_id" select="normalize-space($reviews//*[local-name() = 'review'][@from = $curr_id]/@id)"/>
|
10309
|
+
<xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
|
10310
|
+
<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>
|
10311
|
+
</xsl:if>
|
10312
|
+
<!-- <fo:block>
|
10313
|
+
<curr_id><xsl:value-of select="$curr_id"/></curr_id>
|
10314
|
+
<xsl:copy-of select="$reviews"/>
|
10315
|
+
</fo:block> -->
|
10316
|
+
</xsl:template>
|
10317
|
+
|
10187
10318
|
<!-- main sections -->
|
10188
10319
|
<xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
10189
10320
|
|
@@ -10192,6 +10323,8 @@
|
|
10192
10323
|
|
10193
10324
|
<xsl:call-template name="sections_element_style"/>
|
10194
10325
|
|
10326
|
+
<xsl:call-template name="addReviewHelper"/>
|
10327
|
+
|
10195
10328
|
<xsl:apply-templates/>
|
10196
10329
|
</fo:block>
|
10197
10330
|
|
@@ -10227,6 +10360,7 @@
|
|
10227
10360
|
|
10228
10361
|
<fo:block>
|
10229
10362
|
<xsl:call-template name="setId"/>
|
10363
|
+
<xsl:call-template name="addReviewHelper"/>
|
10230
10364
|
<xsl:apply-templates/>
|
10231
10365
|
</fo:block>
|
10232
10366
|
</xsl:template>
|
@@ -10263,6 +10397,8 @@
|
|
10263
10397
|
|
10264
10398
|
<xsl:call-template name="refine_clause_style"/>
|
10265
10399
|
|
10400
|
+
<xsl:call-template name="addReviewHelper"/>
|
10401
|
+
|
10266
10402
|
<xsl:apply-templates/>
|
10267
10403
|
</fo:block>
|
10268
10404
|
</xsl:template>
|
@@ -10315,6 +10451,23 @@
|
|
10315
10451
|
|
10316
10452
|
<xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
|
10317
10453
|
|
10454
|
+
<xsl:if test="1 = 1">
|
10455
|
+
<xsl:choose>
|
10456
|
+
<!-- if there isn't the attribute '@from', then -->
|
10457
|
+
<xsl:when test="$id_from = ''">
|
10458
|
+
<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>
|
10459
|
+
</xsl:when>
|
10460
|
+
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
10461
|
+
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
10462
|
+
<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>
|
10463
|
+
</xsl:when>
|
10464
|
+
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
10465
|
+
<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>
|
10466
|
+
</xsl:when>
|
10467
|
+
</xsl:choose>
|
10468
|
+
</xsl:if>
|
10469
|
+
|
10470
|
+
<xsl:if test="1 = 2">
|
10318
10471
|
<xsl:choose>
|
10319
10472
|
<!-- if there isn't the attribute '@from', then -->
|
10320
10473
|
<xsl:when test="$id_from = ''">
|
@@ -10328,6 +10481,7 @@
|
|
10328
10481
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
10329
10482
|
</xsl:when>
|
10330
10483
|
</xsl:choose>
|
10484
|
+
</xsl:if>
|
10331
10485
|
|
10332
10486
|
</xsl:template>
|
10333
10487
|
|
@@ -11692,7 +11846,7 @@
|
|
11692
11846
|
<!-- remove preprocess-xslt -->
|
11693
11847
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
|
11694
11848
|
|
11695
|
-
<xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image'] | *[local-name() = 'sourcecode'] | *[local-name() = 'bibdata'] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
|
11849
|
+
<xsl:template match="*[local-name() = 'stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])] | *[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
|
11696
11850
|
<xsl:copy-of select="."/>
|
11697
11851
|
</xsl:template>
|
11698
11852
|
|
@@ -11758,6 +11912,22 @@
|
|
11758
11912
|
</xsl:choose>
|
11759
11913
|
</xsl:template>
|
11760
11914
|
|
11915
|
+
<xsl:variable name="regex_passthrough">.*\bpdf\b.*</xsl:variable>
|
11916
|
+
<xsl:template match="*[local-name() = 'passthrough']" mode="update_xml_step1">
|
11917
|
+
<!-- <xsl:if test="contains(@formats, ' pdf ')"> -->
|
11918
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new(@formats), $regex_passthrough)) = 'true'">
|
11919
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
11920
|
+
</xsl:if>
|
11921
|
+
</xsl:template>
|
11922
|
+
|
11923
|
+
<!-- split math by element with @linebreak into maths -->
|
11924
|
+
<xsl:template match="mathml:math[.//mathml:mo[@linebreak] or .//mathml:mspace[@linebreak]]" mode="update_xml_step1">
|
11925
|
+
<xsl:variable name="maths">
|
11926
|
+
<xsl:apply-templates select="." mode="mathml_linebreak"/>
|
11927
|
+
</xsl:variable>
|
11928
|
+
<xsl:copy-of select="$maths"/>
|
11929
|
+
</xsl:template>
|
11930
|
+
|
11761
11931
|
<!-- =========================================================================== -->
|
11762
11932
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
11763
11933
|
<!-- =========================================================================== -->
|
@@ -11861,6 +12031,8 @@
|
|
11861
12031
|
|
11862
12032
|
<xsl:template name="insertOpeningElements">
|
11863
12033
|
<xsl:param name="tree"/>
|
12034
|
+
<xsl:param name="xmlns"/>
|
12035
|
+
<xsl:param name="add_continue">true</xsl:param>
|
11864
12036
|
<xsl:for-each select="$tree//element">
|
11865
12037
|
<xsl:text disable-output-escaping="yes"><</xsl:text>
|
11866
12038
|
<xsl:value-of select="."/>
|
@@ -11871,7 +12043,8 @@
|
|
11871
12043
|
<xsl:value-of select="."/>
|
11872
12044
|
<xsl:text>"</xsl:text>
|
11873
12045
|
</xsl:for-each>
|
11874
|
-
<xsl:if test="position() = 1"> continue="true"</xsl:if>
|
12046
|
+
<xsl:if test="position() = 1 and $add_continue = 'true'"> continue="true"</xsl:if>
|
12047
|
+
<xsl:if test="position() = 1 and $xmlns != ''"> xmlns="<xsl:value-of select="$xmlns"/>"</xsl:if>
|
11875
12048
|
<xsl:text disable-output-escaping="yes">></xsl:text>
|
11876
12049
|
<xsl:if test="$debug = 'true'">
|
11877
12050
|
<xsl:message><<xsl:value-of select="."/>></xsl:message>
|
@@ -607,6 +607,7 @@
|
|
607
607
|
<xsl:otherwise>
|
608
608
|
<fo:block>
|
609
609
|
<xsl:call-template name="setId"/>
|
610
|
+
<xsl:call-template name="addReviewHelper"/>
|
610
611
|
<xsl:apply-templates/>
|
611
612
|
</fo:block>
|
612
613
|
</xsl:otherwise>
|
@@ -4383,6 +4384,11 @@
|
|
4383
4384
|
|
4384
4385
|
<xsl:value-of select="@reference"/>
|
4385
4386
|
|
4387
|
+
<!-- commented https://github.com/metanorma/isodoc/issues/614 -->
|
4388
|
+
<!-- <xsl:if test="$namespace = 'itu'">
|
4389
|
+
<xsl:text>)</xsl:text>
|
4390
|
+
</xsl:if> -->
|
4391
|
+
|
4386
4392
|
</fo:inline>
|
4387
4393
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
4388
4394
|
<xsl:copy-of select="./node()"/>
|
@@ -4392,7 +4398,7 @@
|
|
4392
4398
|
|
4393
4399
|
</xsl:if>
|
4394
4400
|
</xsl:for-each>
|
4395
|
-
</xsl:template>
|
4401
|
+
</xsl:template> <!-- table_fn_display -->
|
4396
4402
|
|
4397
4403
|
<xsl:template name="create_fn">
|
4398
4404
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
@@ -4420,8 +4426,10 @@
|
|
4420
4426
|
<!-- EMD table's footnotes rendering -->
|
4421
4427
|
<!-- ============================ -->
|
4422
4428
|
|
4429
|
+
<!-- ============================ -->
|
4423
4430
|
<!-- figure's footnotes rendering -->
|
4424
|
-
|
4431
|
+
<!-- ============================ -->
|
4432
|
+
<xsl:template name="fn_display_figure"> <!-- figure_fn_display -->
|
4425
4433
|
|
4426
4434
|
<!-- current figure id -->
|
4427
4435
|
<xsl:variable name="figure_id_">
|
@@ -4534,9 +4542,28 @@
|
|
4534
4542
|
|
4535
4543
|
</fo:block>
|
4536
4544
|
</xsl:if>
|
4537
|
-
|
4538
4545
|
</xsl:template> <!-- fn_display_figure -->
|
4539
4546
|
|
4547
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
4548
|
+
<!-- figure's footnote label -->
|
4549
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'dl'][@key = 'true']/*[local-name() = 'dt']/ *[local-name() = 'p'][count(node()[normalize-space() != '']) = 1]/*[local-name() = 'sup']" priority="3">
|
4550
|
+
<xsl:variable name="key_iso">
|
4551
|
+
|
4552
|
+
</xsl:variable>
|
4553
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
4554
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
4555
|
+
|
4556
|
+
</xsl:if>
|
4557
|
+
<fo:inline xsl:use-attribute-sets="figure-fn-number-style"> <!-- id="{@id}" -->
|
4558
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
4559
|
+
<xsl:apply-templates/>
|
4560
|
+
</fo:inline>
|
4561
|
+
</xsl:template>
|
4562
|
+
|
4563
|
+
<!-- ============================ -->
|
4564
|
+
<!-- END: figure's footnotes rendering -->
|
4565
|
+
<!-- ============================ -->
|
4566
|
+
|
4540
4567
|
<!-- fn reference in the text rendering (for instance, 'some text 1) some text' ) -->
|
4541
4568
|
<xsl:template match="*[local-name()='fn']">
|
4542
4569
|
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
@@ -4552,6 +4579,10 @@
|
|
4552
4579
|
|
4553
4580
|
<xsl:value-of select="@reference"/>
|
4554
4581
|
|
4582
|
+
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
4583
|
+
<!-- <xsl:if test="$namespace = 'jis'">
|
4584
|
+
<fo:inline font-weight="normal">)</fo:inline>
|
4585
|
+
</xsl:if> -->
|
4555
4586
|
</fo:basic-link>
|
4556
4587
|
</fo:inline>
|
4557
4588
|
</xsl:template>
|
@@ -4678,17 +4709,22 @@
|
|
4678
4709
|
</fo:block>
|
4679
4710
|
</xsl:when> <!-- END: a few components -->
|
4680
4711
|
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
|
4681
|
-
|
4712
|
+
<!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
|
4713
|
+
<xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
|
4682
4714
|
|
4683
|
-
|
4715
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
4684
4716
|
|
4685
|
-
|
4686
|
-
|
4687
|
-
|
4688
|
-
|
4689
|
-
|
4690
|
-
|
4691
|
-
|
4717
|
+
<xsl:call-template name="refine_figure_key_style"/>
|
4718
|
+
|
4719
|
+
<xsl:variable name="title-key">
|
4720
|
+
<xsl:call-template name="getLocalizedString">
|
4721
|
+
<xsl:with-param name="key">key</xsl:with-param>
|
4722
|
+
</xsl:call-template>
|
4723
|
+
</xsl:variable>
|
4724
|
+
<xsl:value-of select="$title-key"/>
|
4725
|
+
</fo:block>
|
4726
|
+
|
4727
|
+
</xsl:if>
|
4692
4728
|
</xsl:when> <!-- END: definition list in a figure -->
|
4693
4729
|
</xsl:choose>
|
4694
4730
|
|
@@ -4876,6 +4912,14 @@
|
|
4876
4912
|
|
4877
4913
|
</xsl:template> <!-- END: dl -->
|
4878
4914
|
|
4915
|
+
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
4916
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
4917
|
+
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
4918
|
+
<xsl:call-template name="refine_figure_key_style"/>
|
4919
|
+
<xsl:apply-templates/>
|
4920
|
+
</fo:block>
|
4921
|
+
</xsl:template>
|
4922
|
+
|
4879
4923
|
<xsl:template name="refine_dl_formula_where_style">
|
4880
4924
|
|
4881
4925
|
</xsl:template> <!-- refine_dl_formula_where_style -->
|
@@ -6982,6 +7026,39 @@
|
|
6982
7026
|
</xsl:copy>
|
6983
7027
|
</xsl:template>
|
6984
7028
|
|
7029
|
+
<xsl:template match="@*|node()" mode="mathml_linebreak">
|
7030
|
+
<xsl:copy>
|
7031
|
+
<xsl:apply-templates select="@*|node()" mode="mathml_linebreak"/>
|
7032
|
+
</xsl:copy>
|
7033
|
+
</xsl:template>
|
7034
|
+
|
7035
|
+
<!-- split math into two math -->
|
7036
|
+
<xsl:template match="mathml:mo[@linebreak] | mathml:mspace[@linebreak]" mode="mathml_linebreak">
|
7037
|
+
<xsl:variable name="math_elements_tree_">
|
7038
|
+
<xsl:for-each select="ancestor::*[ancestor-or-self::mathml:math]">
|
7039
|
+
<element pos="{position()}">
|
7040
|
+
<xsl:copy-of select="@*[local-name() != 'id']"/>
|
7041
|
+
<xsl:value-of select="name()"/>
|
7042
|
+
</element>
|
7043
|
+
</xsl:for-each>
|
7044
|
+
</xsl:variable>
|
7045
|
+
|
7046
|
+
<xsl:variable name="math_elements_tree" select="xalan:nodeset($math_elements_tree_)"/>
|
7047
|
+
|
7048
|
+
<xsl:call-template name="insertClosingElements">
|
7049
|
+
<xsl:with-param name="tree" select="$math_elements_tree"/>
|
7050
|
+
</xsl:call-template>
|
7051
|
+
|
7052
|
+
<xsl:element name="br" namespace="{$namespace_full}"/>
|
7053
|
+
|
7054
|
+
<xsl:call-template name="insertOpeningElements">
|
7055
|
+
<xsl:with-param name="tree" select="$math_elements_tree"/>
|
7056
|
+
<xsl:with-param name="xmlns">http://www.w3.org/1998/Math/MathML</xsl:with-param>
|
7057
|
+
<xsl:with-param name="add_continue">false</xsl:with-param>
|
7058
|
+
</xsl:call-template>
|
7059
|
+
|
7060
|
+
</xsl:template>
|
7061
|
+
|
6985
7062
|
<!-- Examples:
|
6986
7063
|
<stem type="AsciiMath">x = 1</stem>
|
6987
7064
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
@@ -7233,9 +7310,11 @@
|
|
7233
7310
|
</xsl:template>
|
7234
7311
|
|
7235
7312
|
<xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"> <!-- show in 'stem' template -->
|
7313
|
+
<!-- https://github.com/metanorma/isodoc/issues/607
|
7236
7314
|
<xsl:if test="normalize-space() != ''">
|
7237
|
-
<xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
|
7238
|
-
</xsl:if>
|
7315
|
+
<xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
|
7316
|
+
</xsl:if> -->
|
7317
|
+
<xsl:apply-templates/>
|
7239
7318
|
</xsl:template>
|
7240
7319
|
|
7241
7320
|
<!-- stem inside formula with name (with formula's number) -->
|
@@ -7391,8 +7470,17 @@
|
|
7391
7470
|
</xsl:when>
|
7392
7471
|
<xsl:otherwise>
|
7393
7472
|
|
7473
|
+
<!-- https://github.com/metanorma/isodoc/issues/607 -->
|
7474
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
7475
|
+
<xsl:text>—</xsl:text> em dash —
|
7476
|
+
</xsl:if> -->
|
7477
|
+
<!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
|
7394
7478
|
<xsl:text>:</xsl:text>
|
7479
|
+
</xsl:if> -->
|
7395
7480
|
|
7481
|
+
<!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
7482
|
+
<xsl:text> – </xsl:text> en dash –
|
7483
|
+
</xsl:if> -->
|
7396
7484
|
</xsl:otherwise>
|
7397
7485
|
</xsl:choose>
|
7398
7486
|
</xsl:variable>
|
@@ -7411,6 +7499,16 @@
|
|
7411
7499
|
</xsl:when>
|
7412
7500
|
<xsl:otherwise>
|
7413
7501
|
|
7502
|
+
<!-- https://github.com/metanorma/isodoc/issues/607 -->
|
7503
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
7504
|
+
<xsl:text>—</xsl:text> em dash —
|
7505
|
+
</xsl:if> -->
|
7506
|
+
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' or $namespace = 'rsd' or $namespace = 'jcgm'">
|
7507
|
+
<xsl:text>:</xsl:text>
|
7508
|
+
</xsl:if> -->
|
7509
|
+
<!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'unece-rec' or $namespace = 'unece'">
|
7510
|
+
<xsl:text> – </xsl:text> en dash –
|
7511
|
+
</xsl:if> -->
|
7414
7512
|
</xsl:otherwise>
|
7415
7513
|
</xsl:choose>
|
7416
7514
|
</xsl:variable>
|
@@ -9577,7 +9675,7 @@
|
|
9577
9675
|
<xsl:if test="normalize-space() != ''">
|
9578
9676
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
9579
9677
|
<xsl:call-template name="refine_termexample-name-style"/>
|
9580
|
-
<xsl:apply-templates/>
|
9678
|
+
<xsl:apply-templates/> <!-- commented $namespace = 'ieee', https://github.com/metanorma/isodoc/issues/614-->
|
9581
9679
|
</fo:inline>
|
9582
9680
|
</xsl:if>
|
9583
9681
|
</xsl:template>
|
@@ -9739,7 +9837,7 @@
|
|
9739
9837
|
<xsl:otherwise>
|
9740
9838
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
9741
9839
|
<xsl:call-template name="refine_example-name-style"/>
|
9742
|
-
<xsl:apply-templates/>:
|
9840
|
+
<xsl:apply-templates/>: <!-- $namespace = 'ieee', see https://github.com/metanorma/isodoc/issues/614 -->
|
9743
9841
|
</fo:inline>
|
9744
9842
|
</xsl:otherwise>
|
9745
9843
|
</xsl:choose>
|
@@ -9921,15 +10019,17 @@
|
|
9921
10019
|
|
9922
10020
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
9923
10021
|
<fo:block role="BlockQuote">
|
9924
|
-
<xsl:apply-templates select="./node()[not(local-name() = 'author') and
|
10022
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source') and not(local-name() = 'attribution')]"/> <!-- process all nested nodes, except author and source -->
|
9925
10023
|
</fo:block>
|
9926
10024
|
</fo:block-container>
|
9927
10025
|
</fo:block-container>
|
9928
|
-
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
10026
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source'] or *[local-name() = 'attribution']">
|
9929
10027
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
9930
10028
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
9931
10029
|
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
9932
10030
|
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
10031
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
10032
|
+
<xsl:apply-templates select="*[local-name() = 'attribution']/*[local-name() = 'p']/node()"/>
|
9933
10033
|
</fo:block>
|
9934
10034
|
</xsl:if>
|
9935
10035
|
|
@@ -9951,9 +10051,13 @@
|
|
9951
10051
|
</xsl:template>
|
9952
10052
|
|
9953
10053
|
<xsl:template match="*[local-name() = 'author']">
|
9954
|
-
<xsl:
|
10054
|
+
<xsl:if test="local-name(..) = 'quote'"> <!-- for old Presentation XML, https://github.com/metanorma/isodoc/issues/607 -->
|
10055
|
+
<xsl:text>— </xsl:text>
|
10056
|
+
</xsl:if>
|
9955
10057
|
<xsl:apply-templates/>
|
9956
10058
|
</xsl:template>
|
10059
|
+
|
10060
|
+
<xsl:template match="*[local-name() = 'quote']//*[local-name() = 'referenceFrom']"/>
|
9957
10061
|
<!-- ====== -->
|
9958
10062
|
<!-- ====== -->
|
9959
10063
|
|
@@ -10135,8 +10239,12 @@
|
|
10135
10239
|
</xsl:template>
|
10136
10240
|
|
10137
10241
|
<xsl:template match="*[local-name() = 'domain']">
|
10242
|
+
<!-- https://github.com/metanorma/isodoc/issues/607
|
10138
10243
|
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
10139
|
-
<xsl:text> </xsl:text>
|
10244
|
+
<xsl:text> </xsl:text> -->
|
10245
|
+
<xsl:if test="not(@hidden = 'true')">
|
10246
|
+
<xsl:apply-templates/>
|
10247
|
+
</xsl:if>
|
10140
10248
|
</xsl:template>
|
10141
10249
|
|
10142
10250
|
<xsl:template match="*[local-name() = 'admitted']">
|
@@ -10184,6 +10292,29 @@
|
|
10184
10292
|
<!-- END definition -->
|
10185
10293
|
<!-- ========== -->
|
10186
10294
|
|
10295
|
+
<xsl:variable name="reviews_">
|
10296
|
+
<xsl:for-each select="//*[local-name() = 'review'][@from]">
|
10297
|
+
<xsl:copy>
|
10298
|
+
<xsl:copy-of select="@from"/>
|
10299
|
+
<xsl:copy-of select="@id"/>
|
10300
|
+
</xsl:copy>
|
10301
|
+
</xsl:for-each>
|
10302
|
+
</xsl:variable>
|
10303
|
+
<xsl:variable name="reviews" select="xalan:nodeset($reviews_)"/>
|
10304
|
+
|
10305
|
+
<xsl:template name="addReviewHelper">
|
10306
|
+
<!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
|
10307
|
+
<xsl:variable name="curr_id" select="@id"/>
|
10308
|
+
<xsl:variable name="review_id" select="normalize-space($reviews//*[local-name() = 'review'][@from = $curr_id]/@id)"/>
|
10309
|
+
<xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
|
10310
|
+
<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>
|
10311
|
+
</xsl:if>
|
10312
|
+
<!-- <fo:block>
|
10313
|
+
<curr_id><xsl:value-of select="$curr_id"/></curr_id>
|
10314
|
+
<xsl:copy-of select="$reviews"/>
|
10315
|
+
</fo:block> -->
|
10316
|
+
</xsl:template>
|
10317
|
+
|
10187
10318
|
<!-- main sections -->
|
10188
10319
|
<xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
10189
10320
|
|
@@ -10192,6 +10323,8 @@
|
|
10192
10323
|
|
10193
10324
|
<xsl:call-template name="sections_element_style"/>
|
10194
10325
|
|
10326
|
+
<xsl:call-template name="addReviewHelper"/>
|
10327
|
+
|
10195
10328
|
<xsl:apply-templates/>
|
10196
10329
|
</fo:block>
|
10197
10330
|
|
@@ -10227,6 +10360,7 @@
|
|
10227
10360
|
|
10228
10361
|
<fo:block>
|
10229
10362
|
<xsl:call-template name="setId"/>
|
10363
|
+
<xsl:call-template name="addReviewHelper"/>
|
10230
10364
|
<xsl:apply-templates/>
|
10231
10365
|
</fo:block>
|
10232
10366
|
</xsl:template>
|
@@ -10263,6 +10397,8 @@
|
|
10263
10397
|
|
10264
10398
|
<xsl:call-template name="refine_clause_style"/>
|
10265
10399
|
|
10400
|
+
<xsl:call-template name="addReviewHelper"/>
|
10401
|
+
|
10266
10402
|
<xsl:apply-templates/>
|
10267
10403
|
</fo:block>
|
10268
10404
|
</xsl:template>
|
@@ -10315,6 +10451,23 @@
|
|
10315
10451
|
|
10316
10452
|
<xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
|
10317
10453
|
|
10454
|
+
<xsl:if test="1 = 1">
|
10455
|
+
<xsl:choose>
|
10456
|
+
<!-- if there isn't the attribute '@from', then -->
|
10457
|
+
<xsl:when test="$id_from = ''">
|
10458
|
+
<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>
|
10459
|
+
</xsl:when>
|
10460
|
+
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
10461
|
+
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
10462
|
+
<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>
|
10463
|
+
</xsl:when>
|
10464
|
+
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
10465
|
+
<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>
|
10466
|
+
</xsl:when>
|
10467
|
+
</xsl:choose>
|
10468
|
+
</xsl:if>
|
10469
|
+
|
10470
|
+
<xsl:if test="1 = 2">
|
10318
10471
|
<xsl:choose>
|
10319
10472
|
<!-- if there isn't the attribute '@from', then -->
|
10320
10473
|
<xsl:when test="$id_from = ''">
|
@@ -10328,6 +10481,7 @@
|
|
10328
10481
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
10329
10482
|
</xsl:when>
|
10330
10483
|
</xsl:choose>
|
10484
|
+
</xsl:if>
|
10331
10485
|
|
10332
10486
|
</xsl:template>
|
10333
10487
|
|
@@ -11692,7 +11846,7 @@
|
|
11692
11846
|
<!-- remove preprocess-xslt -->
|
11693
11847
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
|
11694
11848
|
|
11695
|
-
<xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image'] | *[local-name() = 'sourcecode'] | *[local-name() = 'bibdata'] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
|
11849
|
+
<xsl:template match="*[local-name() = 'stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])] | *[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
|
11696
11850
|
<xsl:copy-of select="."/>
|
11697
11851
|
</xsl:template>
|
11698
11852
|
|
@@ -11758,6 +11912,22 @@
|
|
11758
11912
|
</xsl:choose>
|
11759
11913
|
</xsl:template>
|
11760
11914
|
|
11915
|
+
<xsl:variable name="regex_passthrough">.*\bpdf\b.*</xsl:variable>
|
11916
|
+
<xsl:template match="*[local-name() = 'passthrough']" mode="update_xml_step1">
|
11917
|
+
<!-- <xsl:if test="contains(@formats, ' pdf ')"> -->
|
11918
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new(@formats), $regex_passthrough)) = 'true'">
|
11919
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
11920
|
+
</xsl:if>
|
11921
|
+
</xsl:template>
|
11922
|
+
|
11923
|
+
<!-- split math by element with @linebreak into maths -->
|
11924
|
+
<xsl:template match="mathml:math[.//mathml:mo[@linebreak] or .//mathml:mspace[@linebreak]]" mode="update_xml_step1">
|
11925
|
+
<xsl:variable name="maths">
|
11926
|
+
<xsl:apply-templates select="." mode="mathml_linebreak"/>
|
11927
|
+
</xsl:variable>
|
11928
|
+
<xsl:copy-of select="$maths"/>
|
11929
|
+
</xsl:template>
|
11930
|
+
|
11761
11931
|
<!-- =========================================================================== -->
|
11762
11932
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
11763
11933
|
<!-- =========================================================================== -->
|
@@ -11861,6 +12031,8 @@
|
|
11861
12031
|
|
11862
12032
|
<xsl:template name="insertOpeningElements">
|
11863
12033
|
<xsl:param name="tree"/>
|
12034
|
+
<xsl:param name="xmlns"/>
|
12035
|
+
<xsl:param name="add_continue">true</xsl:param>
|
11864
12036
|
<xsl:for-each select="$tree//element">
|
11865
12037
|
<xsl:text disable-output-escaping="yes"><</xsl:text>
|
11866
12038
|
<xsl:value-of select="."/>
|
@@ -11871,7 +12043,8 @@
|
|
11871
12043
|
<xsl:value-of select="."/>
|
11872
12044
|
<xsl:text>"</xsl:text>
|
11873
12045
|
</xsl:for-each>
|
11874
|
-
<xsl:if test="position() = 1"> continue="true"</xsl:if>
|
12046
|
+
<xsl:if test="position() = 1 and $add_continue = 'true'"> continue="true"</xsl:if>
|
12047
|
+
<xsl:if test="position() = 1 and $xmlns != ''"> xmlns="<xsl:value-of select="$xmlns"/>"</xsl:if>
|
11875
12048
|
<xsl:text disable-output-escaping="yes">></xsl:text>
|
11876
12049
|
<xsl:if test="$debug = 'true'">
|
11877
12050
|
<xsl:message><<xsl:value-of select="."/>></xsl:message>
|
data/lib/isodoc/iho/init.rb
CHANGED
@@ -121,6 +121,24 @@ _bib)
|
|
121
121
|
""
|
122
122
|
end
|
123
123
|
|
124
|
+
def omit_docid_prefix(prefix)
|
125
|
+
prefix == "IHO" and return true
|
126
|
+
super
|
127
|
+
end
|
128
|
+
|
129
|
+
def term1(elem); end
|
130
|
+
|
131
|
+
def termsource1(elem)
|
132
|
+
elem.parent.nil? and return
|
133
|
+
while elem&.next_element&.name == "termsource"
|
134
|
+
elem << "; #{to_xml(elem.next_element.remove.children)}"
|
135
|
+
end
|
136
|
+
t = elem.at("./ancestor::xmlns:term")
|
137
|
+
s = l10n(" [#{to_xml(elem.remove.children).strip}]")
|
138
|
+
defn = t.at(ns(".//definition[last()]")) or return
|
139
|
+
defn.elements.last << s
|
140
|
+
end
|
141
|
+
|
124
142
|
include Init
|
125
143
|
end
|
126
144
|
end
|
@@ -1783,9 +1783,21 @@ that the `number` given for the series applies to the second iteration of number
|
|
1783
1783
|
May be used to differentiate rendering of notes in bibliographies</a:documentation>
|
1784
1784
|
</attribute>
|
1785
1785
|
</optional>
|
1786
|
-
<ref name="
|
1786
|
+
<ref name="LocalizedStringAttributes">
|
1787
1787
|
<a:documentation>The content of the note</a:documentation>
|
1788
1788
|
</ref>
|
1789
|
+
<choice>
|
1790
|
+
<oneOrMore>
|
1791
|
+
<ref name="BasicBlockNoId">
|
1792
|
+
<a:documentation>Multiple blocks of content</a:documentation>
|
1793
|
+
</ref>
|
1794
|
+
</oneOrMore>
|
1795
|
+
<oneOrMore>
|
1796
|
+
<ref name="TextElement">
|
1797
|
+
<a:documentation>Single block of content</a:documentation>
|
1798
|
+
</ref>
|
1799
|
+
</oneOrMore>
|
1800
|
+
</choice>
|
1789
1801
|
</element>
|
1790
1802
|
</define>
|
1791
1803
|
<define name="bibabstract">
|
@@ -8,17 +8,17 @@ This work is copyright. Apart from any use permitted in accordance with the Bern
|
|
8
8
|
|
9
9
|
== license-statement
|
10
10
|
=== {blank}
|
11
|
-
This document or partial material from this document may be translated, reproduced or distributed for general information, on no more than a cost recovery basis. Copies may not be sold or distributed for profit or gain without prior written agreement of the IHO and any other copyright holders.
|
11
|
+
This document or partial material from this document may be translated, reproduced or distributed for general information, on no more than a cost recovery basis. Copies may not be sold or distributed for profit or gain without prior written agreement of the IHO Secretariat and any other copyright holders.
|
12
12
|
|
13
13
|
In the event that this document or partial material from this document is reproduced, translated or distributed under the terms described above, the following statements are to be included:
|
14
14
|
|
15
15
|
____
|
16
|
-
"Material from IHO publication [reference to extract: Title, Edition] is reproduced with the permission of the
|
16
|
+
"Material from IHO publication [reference to extract: Title, Edition] is reproduced with the permission of the IHO Secretariat (Permission No ……./…) acting for the International Hydrographic Organization (IHO), which does not accept responsibility for the correctness of the material as reproduced: in case of doubt, the IHO’s authentic text shall prevail. The incorporation of material sourced from IHO shall not be construed as constituting an endorsement by IHO of this product."
|
17
17
|
|
18
18
|
"This [document/publication] is a translation of IHO [document/publication] [name]. The IHO has not checked this translation and therefore takes no responsibility for its accuracy. In case of doubt the source version of [name] in [language] should be consulted."
|
19
19
|
____
|
20
20
|
|
21
|
-
The IHO Logo or other identifiers shall not be used in any derived product without prior written permission from the IHO.
|
21
|
+
The IHO Logo or other identifiers shall not be used in any derived product without prior written permission from the IHO Secretariat.
|
22
22
|
|
23
23
|
== feedback-statement
|
24
24
|
Published by the +
|
@@ -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 v1.
|
20
|
+
<!-- VERSION v1.4.0 -->
|
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">
|
@@ -326,7 +326,7 @@ normative or informative references, some split references into sections organiz
|
|
326
326
|
<a:documentation>Content of note</a:documentation>
|
327
327
|
<oneOrMore>
|
328
328
|
<choice>
|
329
|
-
<ref name="paragraph"/>
|
329
|
+
<ref name="paragraph-with-footnote"/>
|
330
330
|
<ref name="ul"/>
|
331
331
|
<ref name="ol"/>
|
332
332
|
<ref name="dl"/>
|
@@ -412,7 +412,7 @@ normative or informative references, some split references into sections organiz
|
|
412
412
|
<element name="note">
|
413
413
|
<ref name="OptionalId"/>
|
414
414
|
<oneOrMore>
|
415
|
-
<ref name="paragraph"/>
|
415
|
+
<ref name="paragraph-with-footnote"/>
|
416
416
|
</oneOrMore>
|
417
417
|
</element>
|
418
418
|
</define>
|
@@ -1977,7 +1977,7 @@ used in document amendments</a:documentation>
|
|
1977
1977
|
<oneOrMore>
|
1978
1978
|
<choice>
|
1979
1979
|
<a:documentation>Content of the verbal representation of the term</a:documentation>
|
1980
|
-
<ref name="paragraph"/>
|
1980
|
+
<ref name="paragraph-with-footnote"/>
|
1981
1981
|
<ref name="dl"/>
|
1982
1982
|
<ref name="ol"/>
|
1983
1983
|
<ref name="ul"/>
|
@@ -2015,7 +2015,7 @@ used in document amendments</a:documentation>
|
|
2015
2015
|
<oneOrMore>
|
2016
2016
|
<choice>
|
2017
2017
|
<a:documentation>Content of the term note</a:documentation>
|
2018
|
-
<ref name="paragraph"/>
|
2018
|
+
<ref name="paragraph-with-footnote"/>
|
2019
2019
|
<ref name="ul"/>
|
2020
2020
|
<ref name="ol"/>
|
2021
2021
|
<ref name="dl"/>
|
@@ -2037,7 +2037,7 @@ used in document amendments</a:documentation>
|
|
2037
2037
|
<ref name="dl"/>
|
2038
2038
|
<ref name="quote"/>
|
2039
2039
|
<ref name="sourcecode"/>
|
2040
|
-
<ref name="paragraph"/>
|
2040
|
+
<ref name="paragraph-with-footnote"/>
|
2041
2041
|
<ref name="figure"/>
|
2042
2042
|
</choice>
|
2043
2043
|
</oneOrMore>
|
data/metanorma-iho.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
29
29
|
|
30
|
-
spec.add_dependency "metanorma-generic", "~> 2.7.
|
30
|
+
spec.add_dependency "metanorma-generic", "~> 2.7.2"
|
31
31
|
|
32
32
|
spec.add_development_dependency "debug"
|
33
33
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.7.
|
19
|
+
version: 2.7.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.7.
|
26
|
+
version: 2.7.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|