metanorma-ogc 2.6.4 → 2.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ogc/base_convert.rb +2 -2
- data/lib/isodoc/ogc/html_convert.rb +1 -2
- data/lib/isodoc/ogc/init.rb +0 -9
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +249 -53
- data/lib/isodoc/ogc/ogc.best-practice.xsl +249 -53
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +249 -53
- data/lib/isodoc/ogc/ogc.community-practice.xsl +249 -53
- data/lib/isodoc/ogc/ogc.community-standard.xsl +249 -53
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +249 -53
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +249 -53
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +249 -53
- data/lib/isodoc/ogc/ogc.other.xsl +249 -53
- data/lib/isodoc/ogc/ogc.policy.xsl +249 -53
- data/lib/isodoc/ogc/ogc.reference-model.xsl +249 -53
- data/lib/isodoc/ogc/ogc.release-notes.xsl +249 -53
- data/lib/isodoc/ogc/ogc.standard.xsl +249 -53
- data/lib/isodoc/ogc/ogc.test-suite.xsl +249 -53
- data/lib/isodoc/ogc/ogc.user-guide.xsl +249 -53
- data/lib/isodoc/ogc/ogc.white-paper.xsl +249 -53
- data/lib/isodoc/ogc/presentation_xml_convert.rb +19 -1
- data/lib/isodoc/ogc/xref.rb +0 -7
- data/lib/metanorma/ogc/biblio.rng +13 -1
- data/lib/metanorma/ogc/front.rb +0 -7
- data/lib/metanorma/ogc/isodoc.rng +6 -6
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +4 -5
- data/lib/isodoc/ogc/html/preprocess.xslt +0 -13
@@ -512,6 +512,7 @@
|
|
512
512
|
|
513
513
|
<fo:block>
|
514
514
|
<xsl:call-template name="setId"/>
|
515
|
+
<xsl:call-template name="addReviewHelper"/>
|
515
516
|
<xsl:apply-templates/>
|
516
517
|
</fo:block>
|
517
518
|
</xsl:template>
|
@@ -4203,10 +4204,14 @@
|
|
4203
4204
|
<xsl:variable name="fn_styles">
|
4204
4205
|
<xsl:choose>
|
4205
4206
|
<xsl:when test="ancestor::*[local-name() = 'bibitem']">
|
4206
|
-
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"
|
4207
|
+
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
4208
|
+
|
4209
|
+
</fn_styles>
|
4207
4210
|
</xsl:when>
|
4208
4211
|
<xsl:otherwise>
|
4209
|
-
<fn_styles xsl:use-attribute-sets="fn-num-style"
|
4212
|
+
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
4213
|
+
|
4214
|
+
</fn_styles>
|
4210
4215
|
</xsl:otherwise>
|
4211
4216
|
</xsl:choose>
|
4212
4217
|
</xsl:variable>
|
@@ -4345,6 +4350,11 @@
|
|
4345
4350
|
|
4346
4351
|
<xsl:value-of select="@reference"/>
|
4347
4352
|
|
4353
|
+
<!-- commented https://github.com/metanorma/isodoc/issues/614 -->
|
4354
|
+
<!-- <xsl:if test="$namespace = 'itu'">
|
4355
|
+
<xsl:text>)</xsl:text>
|
4356
|
+
</xsl:if> -->
|
4357
|
+
|
4348
4358
|
</fo:inline>
|
4349
4359
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
4350
4360
|
<xsl:copy-of select="./node()"/>
|
@@ -4354,7 +4364,7 @@
|
|
4354
4364
|
|
4355
4365
|
</xsl:if>
|
4356
4366
|
</xsl:for-each>
|
4357
|
-
</xsl:template>
|
4367
|
+
</xsl:template> <!-- table_fn_display -->
|
4358
4368
|
|
4359
4369
|
<xsl:template name="create_fn">
|
4360
4370
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
@@ -4388,8 +4398,10 @@
|
|
4388
4398
|
<!-- EMD table's footnotes rendering -->
|
4389
4399
|
<!-- ============================ -->
|
4390
4400
|
|
4401
|
+
<!-- ============================ -->
|
4391
4402
|
<!-- figure's footnotes rendering -->
|
4392
|
-
|
4403
|
+
<!-- ============================ -->
|
4404
|
+
<xsl:template name="fn_display_figure"> <!-- figure_fn_display -->
|
4393
4405
|
|
4394
4406
|
<!-- current figure id -->
|
4395
4407
|
<xsl:variable name="figure_id_">
|
@@ -4502,9 +4514,28 @@
|
|
4502
4514
|
|
4503
4515
|
</fo:block>
|
4504
4516
|
</xsl:if>
|
4505
|
-
|
4506
4517
|
</xsl:template> <!-- fn_display_figure -->
|
4507
4518
|
|
4519
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
4520
|
+
<!-- figure's footnote label -->
|
4521
|
+
<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">
|
4522
|
+
<xsl:variable name="key_iso">
|
4523
|
+
|
4524
|
+
</xsl:variable>
|
4525
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
4526
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
4527
|
+
|
4528
|
+
</xsl:if>
|
4529
|
+
<fo:inline xsl:use-attribute-sets="figure-fn-number-style"> <!-- id="{@id}" -->
|
4530
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
4531
|
+
<xsl:apply-templates/>
|
4532
|
+
</fo:inline>
|
4533
|
+
</xsl:template>
|
4534
|
+
|
4535
|
+
<!-- ============================ -->
|
4536
|
+
<!-- END: figure's footnotes rendering -->
|
4537
|
+
<!-- ============================ -->
|
4538
|
+
|
4508
4539
|
<!-- fn reference in the text rendering (for instance, 'some text 1) some text' ) -->
|
4509
4540
|
<xsl:template match="*[local-name()='fn']">
|
4510
4541
|
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
@@ -4525,6 +4556,10 @@
|
|
4525
4556
|
|
4526
4557
|
<xsl:value-of select="@reference"/>
|
4527
4558
|
|
4559
|
+
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
4560
|
+
<!-- <xsl:if test="$namespace = 'jis'">
|
4561
|
+
<fo:inline font-weight="normal">)</fo:inline>
|
4562
|
+
</xsl:if> -->
|
4528
4563
|
</fo:basic-link>
|
4529
4564
|
</fo:inline>
|
4530
4565
|
</xsl:template>
|
@@ -4651,17 +4686,22 @@
|
|
4651
4686
|
</fo:block>
|
4652
4687
|
</xsl:when> <!-- END: a few components -->
|
4653
4688
|
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
|
4654
|
-
|
4689
|
+
<!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
|
4690
|
+
<xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
|
4655
4691
|
|
4656
|
-
|
4692
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
4657
4693
|
|
4658
|
-
|
4659
|
-
|
4660
|
-
|
4661
|
-
|
4662
|
-
|
4663
|
-
|
4664
|
-
|
4694
|
+
<xsl:call-template name="refine_figure_key_style"/>
|
4695
|
+
|
4696
|
+
<xsl:variable name="title-key">
|
4697
|
+
<xsl:call-template name="getLocalizedString">
|
4698
|
+
<xsl:with-param name="key">key</xsl:with-param>
|
4699
|
+
</xsl:call-template>
|
4700
|
+
</xsl:variable>
|
4701
|
+
<xsl:value-of select="$title-key"/>
|
4702
|
+
</fo:block>
|
4703
|
+
|
4704
|
+
</xsl:if>
|
4665
4705
|
</xsl:when> <!-- END: definition list in a figure -->
|
4666
4706
|
</xsl:choose>
|
4667
4707
|
|
@@ -4847,6 +4887,14 @@
|
|
4847
4887
|
|
4848
4888
|
</xsl:template> <!-- END: dl -->
|
4849
4889
|
|
4890
|
+
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
4891
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
4892
|
+
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
4893
|
+
<xsl:call-template name="refine_figure_key_style"/>
|
4894
|
+
<xsl:apply-templates/>
|
4895
|
+
</fo:block>
|
4896
|
+
</xsl:template>
|
4897
|
+
|
4850
4898
|
<xsl:template name="refine_dl_formula_where_style">
|
4851
4899
|
|
4852
4900
|
</xsl:template> <!-- refine_dl_formula_where_style -->
|
@@ -6882,6 +6930,39 @@
|
|
6882
6930
|
</xsl:copy>
|
6883
6931
|
</xsl:template>
|
6884
6932
|
|
6933
|
+
<xsl:template match="@*|node()" mode="mathml_linebreak">
|
6934
|
+
<xsl:copy>
|
6935
|
+
<xsl:apply-templates select="@*|node()" mode="mathml_linebreak"/>
|
6936
|
+
</xsl:copy>
|
6937
|
+
</xsl:template>
|
6938
|
+
|
6939
|
+
<!-- split math into two math -->
|
6940
|
+
<xsl:template match="mathml:mo[@linebreak] | mathml:mspace[@linebreak]" mode="mathml_linebreak">
|
6941
|
+
<xsl:variable name="math_elements_tree_">
|
6942
|
+
<xsl:for-each select="ancestor::*[ancestor-or-self::mathml:math]">
|
6943
|
+
<element pos="{position()}">
|
6944
|
+
<xsl:copy-of select="@*[local-name() != 'id']"/>
|
6945
|
+
<xsl:value-of select="name()"/>
|
6946
|
+
</element>
|
6947
|
+
</xsl:for-each>
|
6948
|
+
</xsl:variable>
|
6949
|
+
|
6950
|
+
<xsl:variable name="math_elements_tree" select="xalan:nodeset($math_elements_tree_)"/>
|
6951
|
+
|
6952
|
+
<xsl:call-template name="insertClosingElements">
|
6953
|
+
<xsl:with-param name="tree" select="$math_elements_tree"/>
|
6954
|
+
</xsl:call-template>
|
6955
|
+
|
6956
|
+
<xsl:element name="br" namespace="{$namespace_full}"/>
|
6957
|
+
|
6958
|
+
<xsl:call-template name="insertOpeningElements">
|
6959
|
+
<xsl:with-param name="tree" select="$math_elements_tree"/>
|
6960
|
+
<xsl:with-param name="xmlns">http://www.w3.org/1998/Math/MathML</xsl:with-param>
|
6961
|
+
<xsl:with-param name="add_continue">false</xsl:with-param>
|
6962
|
+
</xsl:call-template>
|
6963
|
+
|
6964
|
+
</xsl:template>
|
6965
|
+
|
6885
6966
|
<!-- Examples:
|
6886
6967
|
<stem type="AsciiMath">x = 1</stem>
|
6887
6968
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
@@ -7083,6 +7164,7 @@
|
|
7083
7164
|
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
|
7084
7165
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
7085
7166
|
</xsl:if>
|
7167
|
+
|
7086
7168
|
<xsl:if test="parent::*[local-name() = 'add']">
|
7087
7169
|
<xsl:call-template name="append_add-style"/>
|
7088
7170
|
</xsl:if>
|
@@ -7132,9 +7214,11 @@
|
|
7132
7214
|
</xsl:template>
|
7133
7215
|
|
7134
7216
|
<xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"> <!-- show in 'stem' template -->
|
7217
|
+
<!-- https://github.com/metanorma/isodoc/issues/607
|
7135
7218
|
<xsl:if test="normalize-space() != ''">
|
7136
|
-
<xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
|
7137
|
-
</xsl:if>
|
7219
|
+
<xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
|
7220
|
+
</xsl:if> -->
|
7221
|
+
<xsl:apply-templates/>
|
7138
7222
|
</xsl:template>
|
7139
7223
|
|
7140
7224
|
<!-- stem inside formula with name (with formula's number) -->
|
@@ -7191,44 +7275,44 @@
|
|
7191
7275
|
|
7192
7276
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
7193
7277
|
|
7194
|
-
|
7278
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
7195
7279
|
|
7196
|
-
|
7280
|
+
<xsl:call-template name="setBlockSpanAll"/>
|
7197
7281
|
|
7198
|
-
|
7282
|
+
<xsl:call-template name="refine_note-style"/>
|
7199
7283
|
|
7200
|
-
|
7284
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
7201
7285
|
|
7202
|
-
|
7286
|
+
<fo:block>
|
7203
7287
|
|
7204
|
-
|
7288
|
+
<xsl:call-template name="refine_note_block_style"/>
|
7205
7289
|
|
7206
|
-
|
7290
|
+
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
7207
7291
|
|
7208
|
-
|
7292
|
+
<xsl:call-template name="refine_note-name-style"/>
|
7209
7293
|
|
7210
|
-
|
7211
|
-
|
7212
|
-
|
7213
|
-
|
7214
|
-
|
7294
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
7295
|
+
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
7296
|
+
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
7297
|
+
<xsl:call-template name="append_add-style"/>
|
7298
|
+
</xsl:if>
|
7215
7299
|
|
7216
|
-
|
7217
|
-
|
7218
|
-
|
7219
|
-
|
7220
|
-
|
7221
|
-
|
7300
|
+
<!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
|
7301
|
+
<xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
7302
|
+
<xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
7303
|
+
<xsl:with-param name="skip">false</xsl:with-param>
|
7304
|
+
</xsl:apply-templates>
|
7305
|
+
</xsl:if>
|
7222
7306
|
|
7223
|
-
|
7307
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
7224
7308
|
|
7225
|
-
|
7309
|
+
</fo:inline>
|
7226
7310
|
|
7227
|
-
|
7228
|
-
|
7311
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
7312
|
+
</fo:block>
|
7229
7313
|
|
7230
|
-
|
7231
|
-
|
7314
|
+
</fo:block-container>
|
7315
|
+
</fo:block-container>
|
7232
7316
|
|
7233
7317
|
</xsl:template>
|
7234
7318
|
|
@@ -7290,6 +7374,17 @@
|
|
7290
7374
|
</xsl:when>
|
7291
7375
|
<xsl:otherwise>
|
7292
7376
|
|
7377
|
+
<!-- https://github.com/metanorma/isodoc/issues/607 -->
|
7378
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
7379
|
+
<xsl:text>—</xsl:text> em dash —
|
7380
|
+
</xsl:if> -->
|
7381
|
+
<!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
|
7382
|
+
<xsl:text>:</xsl:text>
|
7383
|
+
</xsl:if> -->
|
7384
|
+
|
7385
|
+
<!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
7386
|
+
<xsl:text> – </xsl:text> en dash –
|
7387
|
+
</xsl:if> -->
|
7293
7388
|
</xsl:otherwise>
|
7294
7389
|
</xsl:choose>
|
7295
7390
|
</xsl:variable>
|
@@ -7308,8 +7403,16 @@
|
|
7308
7403
|
</xsl:when>
|
7309
7404
|
<xsl:otherwise>
|
7310
7405
|
|
7406
|
+
<!-- https://github.com/metanorma/isodoc/issues/607 -->
|
7407
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
7408
|
+
<xsl:text>—</xsl:text> em dash —
|
7409
|
+
</xsl:if> -->
|
7410
|
+
<!-- <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'">
|
7311
7411
|
<xsl:text>:</xsl:text>
|
7312
|
-
|
7412
|
+
</xsl:if> -->
|
7413
|
+
<!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'unece-rec' or $namespace = 'unece'">
|
7414
|
+
<xsl:text> – </xsl:text> en dash –
|
7415
|
+
</xsl:if> -->
|
7313
7416
|
</xsl:otherwise>
|
7314
7417
|
</xsl:choose>
|
7315
7418
|
</xsl:variable>
|
@@ -9497,7 +9600,7 @@
|
|
9497
9600
|
<xsl:if test="normalize-space() != ''">
|
9498
9601
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
9499
9602
|
<xsl:call-template name="refine_termexample-name-style"/>
|
9500
|
-
<xsl:apply-templates/>
|
9603
|
+
<xsl:apply-templates/> <!-- commented $namespace = 'ieee', https://github.com/metanorma/isodoc/issues/614-->
|
9501
9604
|
</fo:inline>
|
9502
9605
|
</xsl:if>
|
9503
9606
|
</xsl:template>
|
@@ -9652,13 +9755,14 @@
|
|
9652
9755
|
</xsl:when>
|
9653
9756
|
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
9654
9757
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
9758
|
+
|
9655
9759
|
<xsl:apply-templates/>
|
9656
9760
|
</fo:block>
|
9657
9761
|
</xsl:when>
|
9658
9762
|
<xsl:otherwise>
|
9659
9763
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
9660
9764
|
<xsl:call-template name="refine_example-name-style"/>
|
9661
|
-
<xsl:apply-templates/>
|
9765
|
+
<xsl:apply-templates/> <!-- $namespace = 'ieee', see https://github.com/metanorma/isodoc/issues/614 -->
|
9662
9766
|
</fo:inline>
|
9663
9767
|
</xsl:otherwise>
|
9664
9768
|
</xsl:choose>
|
@@ -9667,6 +9771,7 @@
|
|
9667
9771
|
|
9668
9772
|
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
9669
9773
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
9774
|
+
|
9670
9775
|
<xsl:apply-templates/>
|
9671
9776
|
</fo:inline>
|
9672
9777
|
</xsl:template>
|
@@ -9839,15 +9944,17 @@
|
|
9839
9944
|
|
9840
9945
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
9841
9946
|
<fo:block role="BlockQuote">
|
9842
|
-
<xsl:apply-templates select="./node()[not(local-name() = 'author') and
|
9947
|
+
<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 -->
|
9843
9948
|
</fo:block>
|
9844
9949
|
</fo:block-container>
|
9845
9950
|
</fo:block-container>
|
9846
|
-
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
9951
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source'] or *[local-name() = 'attribution']">
|
9847
9952
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
9848
9953
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
9849
9954
|
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
9850
9955
|
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
9956
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
9957
|
+
<xsl:apply-templates select="*[local-name() = 'attribution']/*[local-name() = 'p']/node()"/>
|
9851
9958
|
</fo:block>
|
9852
9959
|
</xsl:if>
|
9853
9960
|
|
@@ -9869,9 +9976,13 @@
|
|
9869
9976
|
</xsl:template>
|
9870
9977
|
|
9871
9978
|
<xsl:template match="*[local-name() = 'author']">
|
9872
|
-
<xsl:
|
9979
|
+
<xsl:if test="local-name(..) = 'quote'"> <!-- for old Presentation XML, https://github.com/metanorma/isodoc/issues/607 -->
|
9980
|
+
<xsl:text>— </xsl:text>
|
9981
|
+
</xsl:if>
|
9873
9982
|
<xsl:apply-templates/>
|
9874
9983
|
</xsl:template>
|
9984
|
+
|
9985
|
+
<xsl:template match="*[local-name() = 'quote']//*[local-name() = 'referenceFrom']"/>
|
9875
9986
|
<!-- ====== -->
|
9876
9987
|
<!-- ====== -->
|
9877
9988
|
|
@@ -10048,20 +10159,26 @@
|
|
10048
10159
|
|
10049
10160
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
10050
10161
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
10162
|
+
|
10051
10163
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
10052
10164
|
</fo:block>
|
10053
10165
|
</xsl:if>
|
10054
10166
|
|
10055
10167
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
10056
10168
|
<xsl:call-template name="setStyle_preferred"/>
|
10169
|
+
|
10057
10170
|
<xsl:apply-templates/>
|
10058
10171
|
</fo:block>
|
10059
10172
|
</fo:block>
|
10060
10173
|
</xsl:template>
|
10061
10174
|
|
10062
10175
|
<xsl:template match="*[local-name() = 'domain']">
|
10176
|
+
<!-- https://github.com/metanorma/isodoc/issues/607
|
10063
10177
|
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
10064
|
-
<xsl:text> </xsl:text>
|
10178
|
+
<xsl:text> </xsl:text> -->
|
10179
|
+
<xsl:if test="not(@hidden = 'true')">
|
10180
|
+
<xsl:apply-templates/>
|
10181
|
+
</xsl:if>
|
10065
10182
|
</xsl:template>
|
10066
10183
|
|
10067
10184
|
<xsl:template match="*[local-name() = 'admitted']">
|
@@ -10109,6 +10226,29 @@
|
|
10109
10226
|
<!-- END definition -->
|
10110
10227
|
<!-- ========== -->
|
10111
10228
|
|
10229
|
+
<xsl:variable name="reviews_">
|
10230
|
+
<xsl:for-each select="//*[local-name() = 'review'][@from]">
|
10231
|
+
<xsl:copy>
|
10232
|
+
<xsl:copy-of select="@from"/>
|
10233
|
+
<xsl:copy-of select="@id"/>
|
10234
|
+
</xsl:copy>
|
10235
|
+
</xsl:for-each>
|
10236
|
+
</xsl:variable>
|
10237
|
+
<xsl:variable name="reviews" select="xalan:nodeset($reviews_)"/>
|
10238
|
+
|
10239
|
+
<xsl:template name="addReviewHelper">
|
10240
|
+
<!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
|
10241
|
+
<xsl:variable name="curr_id" select="@id"/>
|
10242
|
+
<xsl:variable name="review_id" select="normalize-space($reviews//*[local-name() = 'review'][@from = $curr_id]/@id)"/>
|
10243
|
+
<xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
|
10244
|
+
<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>
|
10245
|
+
</xsl:if>
|
10246
|
+
<!-- <fo:block>
|
10247
|
+
<curr_id><xsl:value-of select="$curr_id"/></curr_id>
|
10248
|
+
<xsl:copy-of select="$reviews"/>
|
10249
|
+
</fo:block> -->
|
10250
|
+
</xsl:template>
|
10251
|
+
|
10112
10252
|
<!-- main sections -->
|
10113
10253
|
<xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
10114
10254
|
|
@@ -10117,6 +10257,8 @@
|
|
10117
10257
|
|
10118
10258
|
<xsl:call-template name="sections_element_style"/>
|
10119
10259
|
|
10260
|
+
<xsl:call-template name="addReviewHelper"/>
|
10261
|
+
|
10120
10262
|
<xsl:apply-templates/>
|
10121
10263
|
</fo:block>
|
10122
10264
|
|
@@ -10157,6 +10299,7 @@
|
|
10157
10299
|
|
10158
10300
|
<fo:block>
|
10159
10301
|
<xsl:call-template name="setId"/>
|
10302
|
+
<xsl:call-template name="addReviewHelper"/>
|
10160
10303
|
<xsl:apply-templates/>
|
10161
10304
|
</fo:block>
|
10162
10305
|
</xsl:template>
|
@@ -10193,6 +10336,8 @@
|
|
10193
10336
|
|
10194
10337
|
<xsl:call-template name="refine_clause_style"/>
|
10195
10338
|
|
10339
|
+
<xsl:call-template name="addReviewHelper"/>
|
10340
|
+
|
10196
10341
|
<xsl:apply-templates/>
|
10197
10342
|
</fo:block>
|
10198
10343
|
</xsl:template>
|
@@ -10245,6 +10390,23 @@
|
|
10245
10390
|
|
10246
10391
|
<xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
|
10247
10392
|
|
10393
|
+
<xsl:if test="1 = 1">
|
10394
|
+
<xsl:choose>
|
10395
|
+
<!-- if there isn't the attribute '@from', then -->
|
10396
|
+
<xsl:when test="$id_from = ''">
|
10397
|
+
<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>
|
10398
|
+
</xsl:when>
|
10399
|
+
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
10400
|
+
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
10401
|
+
<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>
|
10402
|
+
</xsl:when>
|
10403
|
+
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
10404
|
+
<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>
|
10405
|
+
</xsl:when>
|
10406
|
+
</xsl:choose>
|
10407
|
+
</xsl:if>
|
10408
|
+
|
10409
|
+
<xsl:if test="1 = 2">
|
10248
10410
|
<xsl:choose>
|
10249
10411
|
<!-- if there isn't the attribute '@from', then -->
|
10250
10412
|
<xsl:when test="$id_from = ''">
|
@@ -10258,6 +10420,7 @@
|
|
10258
10420
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
10259
10421
|
</xsl:when>
|
10260
10422
|
</xsl:choose>
|
10423
|
+
</xsl:if>
|
10261
10424
|
|
10262
10425
|
</xsl:template>
|
10263
10426
|
|
@@ -11623,7 +11786,7 @@
|
|
11623
11786
|
<!-- remove preprocess-xslt -->
|
11624
11787
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
|
11625
11788
|
|
11626
|
-
<xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image'] | *[local-name() = 'sourcecode'] | *[local-name() = 'bibdata'] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
|
11789
|
+
<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">
|
11627
11790
|
<xsl:copy-of select="."/>
|
11628
11791
|
</xsl:template>
|
11629
11792
|
|
@@ -11689,6 +11852,22 @@
|
|
11689
11852
|
</xsl:choose>
|
11690
11853
|
</xsl:template>
|
11691
11854
|
|
11855
|
+
<xsl:variable name="regex_passthrough">.*\bpdf\b.*</xsl:variable>
|
11856
|
+
<xsl:template match="*[local-name() = 'passthrough']" mode="update_xml_step1">
|
11857
|
+
<!-- <xsl:if test="contains(@formats, ' pdf ')"> -->
|
11858
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new(@formats), $regex_passthrough)) = 'true'">
|
11859
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
11860
|
+
</xsl:if>
|
11861
|
+
</xsl:template>
|
11862
|
+
|
11863
|
+
<!-- split math by element with @linebreak into maths -->
|
11864
|
+
<xsl:template match="mathml:math[.//mathml:mo[@linebreak] or .//mathml:mspace[@linebreak]]" mode="update_xml_step1">
|
11865
|
+
<xsl:variable name="maths">
|
11866
|
+
<xsl:apply-templates select="." mode="mathml_linebreak"/>
|
11867
|
+
</xsl:variable>
|
11868
|
+
<xsl:copy-of select="$maths"/>
|
11869
|
+
</xsl:template>
|
11870
|
+
|
11692
11871
|
<!-- =========================================================================== -->
|
11693
11872
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
11694
11873
|
<!-- =========================================================================== -->
|
@@ -11792,6 +11971,8 @@
|
|
11792
11971
|
|
11793
11972
|
<xsl:template name="insertOpeningElements">
|
11794
11973
|
<xsl:param name="tree"/>
|
11974
|
+
<xsl:param name="xmlns"/>
|
11975
|
+
<xsl:param name="add_continue">true</xsl:param>
|
11795
11976
|
<xsl:for-each select="$tree//element">
|
11796
11977
|
<xsl:text disable-output-escaping="yes"><</xsl:text>
|
11797
11978
|
<xsl:value-of select="."/>
|
@@ -11802,7 +11983,8 @@
|
|
11802
11983
|
<xsl:value-of select="."/>
|
11803
11984
|
<xsl:text>"</xsl:text>
|
11804
11985
|
</xsl:for-each>
|
11805
|
-
<xsl:if test="position() = 1"> continue="true"</xsl:if>
|
11986
|
+
<xsl:if test="position() = 1 and $add_continue = 'true'"> continue="true"</xsl:if>
|
11987
|
+
<xsl:if test="position() = 1 and $xmlns != ''"> xmlns="<xsl:value-of select="$xmlns"/>"</xsl:if>
|
11806
11988
|
<xsl:text disable-output-escaping="yes">></xsl:text>
|
11807
11989
|
<xsl:if test="$debug = 'true'">
|
11808
11990
|
<xsl:message><<xsl:value-of select="."/>></xsl:message>
|
@@ -13012,9 +13194,10 @@
|
|
13012
13194
|
<xsl:template name="insertBackgroundPageImage">
|
13013
13195
|
<xsl:param name="number">1</xsl:param>
|
13014
13196
|
<xsl:param name="name">coverpage-image</xsl:param>
|
13197
|
+
<xsl:param name="suffix"/>
|
13015
13198
|
<xsl:variable name="num" select="number($number)"/>
|
13016
13199
|
<!-- background image -->
|
13017
|
-
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="
|
13200
|
+
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
13018
13201
|
<fo:block>
|
13019
13202
|
<xsl:for-each select="/*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = $name][1]/*[local-name() = 'value']/*[local-name() = 'image'][$num]">
|
13020
13203
|
<xsl:choose>
|
@@ -13080,16 +13263,29 @@
|
|
13080
13263
|
|
13081
13264
|
<!-- END: insert cover page image -->
|
13082
13265
|
|
13266
|
+
<xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
|
13083
13267
|
<xsl:template name="insertVerticalChar">
|
13084
13268
|
<xsl:param name="str"/>
|
13269
|
+
<xsl:param name="writing-mode">lr-tb</xsl:param>
|
13270
|
+
<xsl:param name="reference-orientation">90</xsl:param>
|
13085
13271
|
<xsl:if test="string-length($str) > 0">
|
13086
|
-
<fo:inline-container
|
13272
|
+
<fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
|
13273
|
+
<xsl:if test="normalize-space($writing-mode) != ''">
|
13274
|
+
<xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
|
13275
|
+
<xsl:attribute name="reference-orientation">90</xsl:attribute>
|
13276
|
+
</xsl:if>
|
13277
|
+
<xsl:variable name="char" select="substring($str,1,1)"/>
|
13278
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
|
13279
|
+
<xsl:attribute name="reference-orientation">0</xsl:attribute>
|
13280
|
+
</xsl:if>
|
13087
13281
|
<fo:block-container width="1em">
|
13088
|
-
<fo:block line-height="1em"><xsl:value-of select="
|
13282
|
+
<fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
|
13089
13283
|
</fo:block-container>
|
13090
13284
|
</fo:inline-container>
|
13091
13285
|
<xsl:call-template name="insertVerticalChar">
|
13092
13286
|
<xsl:with-param name="str" select="substring($str, 2)"/>
|
13287
|
+
<xsl:with-param name="writing-mode" select="$writing-mode"/>
|
13288
|
+
<xsl:with-param name="reference-orientation" select="$reference-orientation"/>
|
13093
13289
|
</xsl:call-template>
|
13094
13290
|
</xsl:if>
|
13095
13291
|
</xsl:template>
|
@@ -153,7 +153,7 @@ module IsoDoc
|
|
153
153
|
end
|
154
154
|
|
155
155
|
def bibliography_bibitem_number_skip(bibitem)
|
156
|
-
|
156
|
+
implicit_reference(bibitem) ||
|
157
157
|
bibitem.at(ns(".//docidentifier[@type = 'metanorma-ordinal']")) ||
|
158
158
|
bibitem["hidden"] == "true" || bibitem.parent["hidden"] == "true"
|
159
159
|
end
|
@@ -207,6 +207,24 @@ module IsoDoc
|
|
207
207
|
b["unnumbered"] = true
|
208
208
|
end
|
209
209
|
|
210
|
+
def note_delim(_elem)
|
211
|
+
":<tab/>"
|
212
|
+
end
|
213
|
+
|
214
|
+
def reference_name(ref)
|
215
|
+
super
|
216
|
+
ogc_draft_ref?(ref) or return
|
217
|
+
@xrefs.get[ref["id"]] =
|
218
|
+
{ xref: "#{@xrefs.get[ref['id']][:xref]} (draft)" }
|
219
|
+
end
|
220
|
+
|
221
|
+
def ogc_draft_ref?(ref)
|
222
|
+
ref.at(ns("./docidentifier[@type = 'OGC']")) or return
|
223
|
+
status = ref.at(ns("./status/stage"))&.text or return
|
224
|
+
%w(approved published deprecated retired).include? status and return
|
225
|
+
true
|
226
|
+
end
|
227
|
+
|
210
228
|
include Init
|
211
229
|
end
|
212
230
|
end
|
data/lib/isodoc/ogc/xref.rb
CHANGED
@@ -91,13 +91,6 @@ module IsoDoc
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
-
def reference_names(ref)
|
95
|
-
super
|
96
|
-
return unless @klass.ogc_draft_ref?(ref)
|
97
|
-
|
98
|
-
@anchors[ref["id"]] = { xref: "#{@anchors[ref['id']][:xref]} (draft)" }
|
99
|
-
end
|
100
|
-
|
101
94
|
def sequential_permission_body(id, block, label, klass, model,
|
102
95
|
container: false)
|
103
96
|
@anchors[block["id"]] = model.postprocess_anchor_struct(
|
@@ -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">
|