metanorma-jis 0.5.4 → 0.5.6
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/jis/base_convert.rb +1 -1
- data/lib/isodoc/jis/figure.rb +1 -1
- data/lib/isodoc/jis/init.rb +2 -2
- data/lib/isodoc/jis/jis.international-standard.xsl +196 -28
- data/lib/isodoc/jis/presentation_xml_convert.rb +16 -6
- data/lib/metanorma/jis/basicdoc.rng +9 -5
- data/lib/metanorma/jis/isodoc.rng +147 -5
- data/lib/metanorma/jis/isostandard.rng +0 -5
- data/lib/metanorma/jis/processor.rb +8 -4
- data/lib/metanorma/jis/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2833cfea879bbff295e70822cc24e1308ded02dbd16620d3c6930b31dc837bc7
|
4
|
+
data.tar.gz: fc51853fd4f00549260aadda1864302d67693b4214d7aa6703a07abbac6410cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e7b79f6893aecb4d7409000d4693d99f48a371d64696c2e7fd1efc9e618f7b4a6ce944edc432eb6e1ac411f974837943f5ecb35773d645ecc05acd011c721c9
|
7
|
+
data.tar.gz: d5526253052e1840c5d90676d72ca2d1d5d064f60e1576d299eddb3d480d9c61778c74af0f31ca2d4aa5b1dddcbde9d78a45db6e113a34aba26199e476d44ef3
|
@@ -44,7 +44,7 @@ module IsoDoc
|
|
44
44
|
def table_parse_tail(node, out)
|
45
45
|
node.xpath(ns("./p[@class = 'ListTitle' or @class = 'dl']"))
|
46
46
|
.each { |p| parse(p, out) }
|
47
|
-
node.xpath(ns("./source")).each { |n| parse(n, out) }
|
47
|
+
node.xpath(ns("./fmt-source")).each { |n| parse(n, out) }
|
48
48
|
node.xpath(ns("./note")).each { |n| parse(n, out) }
|
49
49
|
node.xpath(ns("./fmt-footnote-container/fmt-fn-body"))
|
50
50
|
.each { |n| parse(n, out) }
|
data/lib/isodoc/jis/figure.rb
CHANGED
@@ -18,7 +18,7 @@ module IsoDoc
|
|
18
18
|
key: node.xpath(ns("./p[@class = 'ListTitle' or @class = 'dl']")),
|
19
19
|
img: node.at(ns("./image")),
|
20
20
|
aside: node.at(ns("./aside")),
|
21
|
-
source: node.at(ns("./source")),
|
21
|
+
source: node.at(ns("./fmt-source")),
|
22
22
|
subfigs: node.xpath(ns("./figure")).map { |n| figure_components(n) } }
|
23
23
|
end
|
24
24
|
|
data/lib/isodoc/jis/init.rb
CHANGED
@@ -29,9 +29,9 @@ module IsoDoc
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def convert_i18n_init1(docxml)
|
32
|
-
|
32
|
+
docxml.at("//xmlns:bibdata") or return
|
33
33
|
lang = docxml.at("//xmlns:bibdata/xmlns:language") ||
|
34
|
-
|
34
|
+
(docxml << "<language/>")
|
35
35
|
%w(en ja).include?(lang&.text) or lang.content = "ja"
|
36
36
|
super
|
37
37
|
end
|
@@ -8006,8 +8006,14 @@
|
|
8006
8006
|
</xsl:choose>
|
8007
8007
|
</xsl:variable>
|
8008
8008
|
|
8009
|
+
<xsl:call-template name="setNamedDestination"/>
|
8010
|
+
|
8009
8011
|
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
8010
8012
|
|
8013
|
+
<xsl:for-each select="*[local-name() = 'name']">
|
8014
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
8015
|
+
</xsl:for-each>
|
8016
|
+
|
8011
8017
|
<xsl:call-template name="refine_table-container-style">
|
8012
8018
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
8013
8019
|
</xsl:call-template>
|
@@ -8212,6 +8218,7 @@
|
|
8212
8218
|
<!-- table/name-->
|
8213
8219
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
8214
8220
|
<xsl:param name="continued"/>
|
8221
|
+
<xsl:param name="cols-count"/>
|
8215
8222
|
<xsl:if test="normalize-space() != ''">
|
8216
8223
|
|
8217
8224
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -8233,9 +8240,30 @@
|
|
8233
8240
|
|
8234
8241
|
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
8235
8242
|
<xsl:if test="$continued = 'true'">
|
8236
|
-
|
8237
|
-
|
8238
|
-
|
8243
|
+
|
8244
|
+
<!-- to prevent the error 'THead element may contain only TR elements' -->
|
8245
|
+
|
8246
|
+
<xsl:choose>
|
8247
|
+
<xsl:when test="string(number($cols-count)) != 'NaN'">
|
8248
|
+
<fo:table width="100%" table-layout="fixed" role="SKIP">
|
8249
|
+
<fo:table-body role="SKIP">
|
8250
|
+
<fo:table-row>
|
8251
|
+
<fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
|
8252
|
+
<fo:block text-align="right" role="SKIP">
|
8253
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
8254
|
+
</fo:block>
|
8255
|
+
</fo:table-cell>
|
8256
|
+
</fo:table-row>
|
8257
|
+
</fo:table-body>
|
8258
|
+
</fo:table>
|
8259
|
+
</xsl:when>
|
8260
|
+
<xsl:otherwise>
|
8261
|
+
<fo:block text-align="right">
|
8262
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
8263
|
+
</fo:block>
|
8264
|
+
</xsl:otherwise>
|
8265
|
+
</xsl:choose>
|
8266
|
+
|
8239
8267
|
</xsl:if>
|
8240
8268
|
<!-- </xsl:if> -->
|
8241
8269
|
|
@@ -8628,6 +8656,7 @@
|
|
8628
8656
|
|
8629
8657
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
8630
8658
|
<xsl:with-param name="continued">true</xsl:with-param>
|
8659
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
8631
8660
|
</xsl:apply-templates>
|
8632
8661
|
|
8633
8662
|
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
@@ -9005,8 +9034,8 @@
|
|
9005
9034
|
<xsl:for-each select="xalan:nodeset($styles__)/item">
|
9006
9035
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
9007
9036
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
9008
|
-
<xsl:if test="$key = 'color' or
|
9009
|
-
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
9037
|
+
<xsl:if test="$key = 'color' or $key = 'background-color' or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
|
9038
|
+
<style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
|
9010
9039
|
</xsl:if>
|
9011
9040
|
</xsl:for-each>
|
9012
9041
|
</xsl:variable>
|
@@ -9073,6 +9102,7 @@
|
|
9073
9102
|
<!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
|
9074
9103
|
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name() = 'example']" priority="2">
|
9075
9104
|
|
9105
|
+
<xsl:call-template name="setNamedDestination"/>
|
9076
9106
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="table-note-style" provisional-distance-between-starts="{9 + $text_indent}mm"> <!-- 12 -->
|
9077
9107
|
<fo:list-item>
|
9078
9108
|
<fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()">
|
@@ -9700,7 +9730,7 @@
|
|
9700
9730
|
<xsl:variable name="target" select="@target"/>
|
9701
9731
|
<xsl:choose>
|
9702
9732
|
<!-- case for footnotes in Requirement tables (https://github.com/metanorma/metanorma-ogc/issues/791) -->
|
9703
|
-
<xsl:when test="not(ancestor::*[local-name() = 'table'][1]
|
9733
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'][1]//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body'][@id = $target]) and $footnotes/*[local-name() = 'fmt-fn-body'][@id = $target]">
|
9704
9734
|
<xsl:call-template name="fn">
|
9705
9735
|
<xsl:with-param name="footnote_body_from_table">true</xsl:with-param>
|
9706
9736
|
</xsl:call-template>
|
@@ -9796,6 +9826,10 @@
|
|
9796
9826
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
9797
9827
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
9798
9828
|
|
9829
|
+
<xsl:if test="@key = 'true' and ancestor::*[local-name() = 'figure']">
|
9830
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
9831
|
+
</xsl:if>
|
9832
|
+
|
9799
9833
|
<xsl:call-template name="setBlockSpanAll"/>
|
9800
9834
|
|
9801
9835
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -10096,7 +10130,7 @@
|
|
10096
10130
|
|
10097
10131
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
10098
10132
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
10099
|
-
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
10133
|
+
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always" keep-with-previous="always">
|
10100
10134
|
<xsl:call-template name="refine_figure_key_style"/>
|
10101
10135
|
<xsl:apply-templates/>
|
10102
10136
|
</fo:block>
|
@@ -10347,6 +10381,7 @@
|
|
10347
10381
|
|
10348
10382
|
<xsl:call-template name="refine_dt-cell-style"/>
|
10349
10383
|
|
10384
|
+
<xsl:call-template name="setNamedDestination"/>
|
10350
10385
|
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
10351
10386
|
|
10352
10387
|
<xsl:choose>
|
@@ -10791,7 +10826,7 @@
|
|
10791
10826
|
<!-- ================= -->
|
10792
10827
|
|
10793
10828
|
<!-- highlight text -->
|
10794
|
-
<xsl:template match="*[local-name()='hi']">
|
10829
|
+
<xsl:template match="*[local-name()='hi'] | *[local-name() = 'span'][@class = 'fmt-hi']" priority="3">
|
10795
10830
|
<fo:inline background-color="yellow">
|
10796
10831
|
<xsl:apply-templates/>
|
10797
10832
|
</fo:inline>
|
@@ -12395,6 +12430,7 @@
|
|
12395
12430
|
<!-- Appendix processing -->
|
12396
12431
|
<!-- ======================== -->
|
12397
12432
|
<xsl:template match="*[local-name()='appendix']">
|
12433
|
+
<xsl:call-template name="setNamedDestination"/>
|
12398
12434
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
12399
12435
|
<xsl:apply-templates select="*[local-name()='title']"/>
|
12400
12436
|
</fo:block>
|
@@ -12405,13 +12441,14 @@
|
|
12405
12441
|
<xsl:variable name="level">
|
12406
12442
|
<xsl:call-template name="getLevel"/>
|
12407
12443
|
</xsl:variable>
|
12408
|
-
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
12444
|
+
<fo:inline role="H{$level}"><xsl:call-template name="setIDforNamedDestination"/><xsl:apply-templates/></fo:inline>
|
12409
12445
|
</xsl:template>
|
12410
12446
|
<!-- ======================== -->
|
12411
12447
|
<!-- END Appendix processing -->
|
12412
12448
|
<!-- ======================== -->
|
12413
12449
|
|
12414
12450
|
<xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
12451
|
+
<xsl:call-template name="setNamedDestination"/>
|
12415
12452
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
12416
12453
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
12417
12454
|
</fo:block>
|
@@ -12441,6 +12478,7 @@
|
|
12441
12478
|
<xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
12442
12479
|
<xsl:param name="callout"/>
|
12443
12480
|
<fo:inline id="{@id}">
|
12481
|
+
<xsl:call-template name="setNamedDestination"/>
|
12444
12482
|
<!-- for first p in annotation, put <x> -->
|
12445
12483
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
12446
12484
|
<xsl:apply-templates/>
|
@@ -12491,6 +12529,7 @@
|
|
12491
12529
|
|
12492
12530
|
</xsl:if>
|
12493
12531
|
<fo:block-container margin-left="0mm" role="SKIP">
|
12532
|
+
<xsl:call-template name="setNamedDestination"/>
|
12494
12533
|
<fo:block id="{@id}">
|
12495
12534
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
|
12496
12535
|
</fo:block>
|
@@ -12536,8 +12575,13 @@
|
|
12536
12575
|
</fo:block>
|
12537
12576
|
</fo:table-cell>
|
12538
12577
|
<fo:table-cell display-align="center">
|
12578
|
+
|
12539
12579
|
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
12540
12580
|
|
12581
|
+
<xsl:for-each select="../*[local-name() = 'name']">
|
12582
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
12583
|
+
</xsl:for-each>
|
12584
|
+
|
12541
12585
|
<xsl:call-template name="refine_formula-stem-number-style"/>
|
12542
12586
|
|
12543
12587
|
<xsl:apply-templates select="../*[local-name() = 'name']"/>
|
@@ -12572,6 +12616,7 @@
|
|
12572
12616
|
|
12573
12617
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
12574
12618
|
|
12619
|
+
<xsl:call-template name="setNamedDestination"/>
|
12575
12620
|
<fo:block id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
12576
12621
|
<xsl:call-template name="setBlockSpanAll"/>
|
12577
12622
|
|
@@ -12627,6 +12672,7 @@
|
|
12627
12672
|
</xsl:template>
|
12628
12673
|
|
12629
12674
|
<xsl:template match="*[local-name() = 'termnote']">
|
12675
|
+
<xsl:call-template name="setNamedDestination"/>
|
12630
12676
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
12631
12677
|
|
12632
12678
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -12733,12 +12779,14 @@
|
|
12733
12779
|
|
12734
12780
|
<xsl:template match="*[local-name() = 'terms']">
|
12735
12781
|
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
12782
|
+
<xsl:call-template name="setNamedDestination"/>
|
12736
12783
|
<fo:block id="{@id}">
|
12737
12784
|
<xsl:apply-templates/>
|
12738
12785
|
</fo:block>
|
12739
12786
|
</xsl:template>
|
12740
12787
|
|
12741
12788
|
<xsl:template match="*[local-name() = 'term']">
|
12789
|
+
<xsl:call-template name="setNamedDestination"/>
|
12742
12790
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
12743
12791
|
|
12744
12792
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
|
@@ -12770,6 +12818,7 @@
|
|
12770
12818
|
<xsl:template match="*[local-name() = 'figure']" name="figure">
|
12771
12819
|
<xsl:variable name="isAdded" select="@added"/>
|
12772
12820
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
12821
|
+
<xsl:call-template name="setNamedDestination"/>
|
12773
12822
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
12774
12823
|
<xsl:call-template name="refine_figure-block-style"/>
|
12775
12824
|
|
@@ -12791,6 +12840,11 @@
|
|
12791
12840
|
</xsl:variable>
|
12792
12841
|
|
12793
12842
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
12843
|
+
|
12844
|
+
<xsl:for-each select="*[local-name() = 'name']"> <!-- set context -->
|
12845
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
12846
|
+
</xsl:for-each>
|
12847
|
+
|
12794
12848
|
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
12795
12849
|
</fo:block>
|
12796
12850
|
|
@@ -12835,6 +12889,7 @@
|
|
12835
12889
|
</xsl:template>
|
12836
12890
|
|
12837
12891
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
12892
|
+
<xsl:call-template name="setNamedDestination"/>
|
12838
12893
|
<fo:block id="{@id}">
|
12839
12894
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
12840
12895
|
</fo:block>
|
@@ -12848,6 +12903,7 @@
|
|
12848
12903
|
</xsl:template>
|
12849
12904
|
|
12850
12905
|
<!-- SOURCE: ... -->
|
12906
|
+
<!-- figure/source -->
|
12851
12907
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
|
12852
12908
|
|
12853
12909
|
<xsl:call-template name="termsource"/>
|
@@ -14087,6 +14143,7 @@
|
|
14087
14143
|
<xsl:template match="title" mode="bookmark"/>
|
14088
14144
|
<xsl:template match="text()" mode="bookmark"/>
|
14089
14145
|
|
14146
|
+
<!-- figure/name -->
|
14090
14147
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
|
14091
14148
|
<xsl:if test="normalize-space() != ''">
|
14092
14149
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
@@ -14099,11 +14156,11 @@
|
|
14099
14156
|
</xsl:template>
|
14100
14157
|
|
14101
14158
|
<!-- figure/fn -->
|
14102
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
|
14159
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'fn']" priority="2"/>
|
14103
14160
|
<!-- figure/note -->
|
14104
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
|
14161
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'note']" priority="2"/>
|
14105
14162
|
<!-- figure/example -->
|
14106
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
|
14163
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'example']" priority="2"/>
|
14107
14164
|
|
14108
14165
|
<!-- figure/note[@type = 'units'] -->
|
14109
14166
|
<!-- image/note[@type = 'units'] -->
|
@@ -14801,6 +14858,7 @@
|
|
14801
14858
|
<!-- permission -->
|
14802
14859
|
<!-- ========== -->
|
14803
14860
|
<xsl:template match="*[local-name() = 'permission']">
|
14861
|
+
<xsl:call-template name="setNamedDestination"/>
|
14804
14862
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
14805
14863
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
14806
14864
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -14809,10 +14867,12 @@
|
|
14809
14867
|
|
14810
14868
|
<xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
|
14811
14869
|
<xsl:if test="normalize-space() != ''">
|
14812
|
-
<fo:block xsl:use-attribute-sets="permission-name-style">
|
14813
|
-
<xsl:apply-templates/>
|
14814
14870
|
|
14815
|
-
|
14871
|
+
<fo:block xsl:use-attribute-sets="permission-name-style">
|
14872
|
+
<xsl:apply-templates/>
|
14873
|
+
|
14874
|
+
</fo:block>
|
14875
|
+
|
14816
14876
|
</xsl:if>
|
14817
14877
|
</xsl:template>
|
14818
14878
|
|
@@ -14828,6 +14888,7 @@
|
|
14828
14888
|
<!-- requirement -->
|
14829
14889
|
<!-- ========== -->
|
14830
14890
|
<xsl:template match="*[local-name() = 'requirement']">
|
14891
|
+
<xsl:call-template name="setNamedDestination"/>
|
14831
14892
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
14832
14893
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
14833
14894
|
<xsl:apply-templates select="*[local-name()='label']"/>
|
@@ -14839,11 +14900,13 @@
|
|
14839
14900
|
|
14840
14901
|
<xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
|
14841
14902
|
<xsl:if test="normalize-space() != ''">
|
14842
|
-
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
14843
14903
|
|
14844
|
-
|
14904
|
+
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
14905
|
+
|
14906
|
+
<xsl:apply-templates/>
|
14907
|
+
|
14908
|
+
</fo:block>
|
14845
14909
|
|
14846
|
-
</fo:block>
|
14847
14910
|
</xsl:if>
|
14848
14911
|
</xsl:template>
|
14849
14912
|
|
@@ -14872,6 +14935,7 @@
|
|
14872
14935
|
<!-- recommendation -->
|
14873
14936
|
<!-- ========== -->
|
14874
14937
|
<xsl:template match="*[local-name() = 'recommendation']">
|
14938
|
+
<xsl:call-template name="setNamedDestination"/>
|
14875
14939
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
14876
14940
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
14877
14941
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -14880,10 +14944,12 @@
|
|
14880
14944
|
|
14881
14945
|
<xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
|
14882
14946
|
<xsl:if test="normalize-space() != ''">
|
14883
|
-
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
14884
|
-
<xsl:apply-templates/>
|
14885
14947
|
|
14886
|
-
|
14948
|
+
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
14949
|
+
<xsl:apply-templates/>
|
14950
|
+
|
14951
|
+
</fo:block>
|
14952
|
+
|
14887
14953
|
</xsl:if>
|
14888
14954
|
</xsl:template>
|
14889
14955
|
|
@@ -14962,6 +15028,7 @@
|
|
14962
15028
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
14963
15029
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
14964
15030
|
</xsl:if>
|
15031
|
+
<xsl:call-template name="setNamedDestination"/>
|
14965
15032
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
14966
15033
|
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
14967
15034
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -15071,6 +15138,7 @@
|
|
15071
15138
|
<!-- termexample -->
|
15072
15139
|
<!-- ====== -->
|
15073
15140
|
<xsl:template match="*[local-name() = 'termexample']">
|
15141
|
+
<xsl:call-template name="setNamedDestination"/>
|
15074
15142
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
15075
15143
|
<xsl:call-template name="refine_termexample-style"/>
|
15076
15144
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -15125,6 +15193,7 @@
|
|
15125
15193
|
-->
|
15126
15194
|
<xsl:template match="*[local-name() = 'example']" name="example">
|
15127
15195
|
|
15196
|
+
<xsl:call-template name="setNamedDestination"/>
|
15128
15197
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
15129
15198
|
<xsl:call-template name="setBlockSpanAll"/>
|
15130
15199
|
|
@@ -15597,12 +15666,17 @@
|
|
15597
15666
|
</xsl:if>
|
15598
15667
|
|
15599
15668
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
15669
|
+
|
15600
15670
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
15601
15671
|
|
15602
15672
|
<xsl:if test="not($vertical_layout = 'true')">
|
15603
15673
|
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
15604
15674
|
</xsl:if>
|
15605
15675
|
|
15676
|
+
<xsl:for-each select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"><!-- change context -->
|
15677
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
15678
|
+
</xsl:for-each>
|
15679
|
+
|
15606
15680
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
15607
15681
|
</fo:block>
|
15608
15682
|
</xsl:if>
|
@@ -15731,6 +15805,7 @@
|
|
15731
15805
|
<!-- main sections -->
|
15732
15806
|
<xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
15733
15807
|
|
15808
|
+
<xsl:call-template name="setNamedDestination"/>
|
15734
15809
|
<fo:block>
|
15735
15810
|
<xsl:call-template name="setId"/>
|
15736
15811
|
|
@@ -15771,6 +15846,7 @@
|
|
15771
15846
|
|
15772
15847
|
<fo:block break-after="page"/>
|
15773
15848
|
|
15849
|
+
<xsl:call-template name="setNamedDestination"/>
|
15774
15850
|
<fo:block>
|
15775
15851
|
<xsl:call-template name="setId"/>
|
15776
15852
|
<xsl:call-template name="addReviewHelper"/>
|
@@ -15799,6 +15875,7 @@
|
|
15799
15875
|
</xsl:template>
|
15800
15876
|
|
15801
15877
|
<xsl:template match="*[local-name() = 'clause'][normalize-space() != '' or *[local-name() = 'figure'] or @id]" name="template_clause"> <!-- if clause isn't empty -->
|
15878
|
+
<xsl:call-template name="setNamedDestination"/>
|
15802
15879
|
<fo:block>
|
15803
15880
|
<xsl:if test="parent::*[local-name() = 'copyright-statement']">
|
15804
15881
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
@@ -15821,6 +15898,7 @@
|
|
15821
15898
|
</xsl:template> <!-- refine_clause_style -->
|
15822
15899
|
|
15823
15900
|
<xsl:template match="*[local-name() = 'definitions']">
|
15901
|
+
<xsl:call-template name="setNamedDestination"/>
|
15824
15902
|
<fo:block id="{@id}">
|
15825
15903
|
<xsl:apply-templates/>
|
15826
15904
|
</fo:block>
|
@@ -15836,6 +15914,8 @@
|
|
15836
15914
|
<xsl:otherwise>
|
15837
15915
|
|
15838
15916
|
<fo:block break-after="page"/>
|
15917
|
+
<xsl:call-template name="setNamedDestination"/>
|
15918
|
+
|
15839
15919
|
<fo:block id="{@id}">
|
15840
15920
|
|
15841
15921
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -15907,6 +15987,7 @@
|
|
15907
15987
|
<!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
|
15908
15988
|
following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
|
15909
15989
|
<!-- <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> -->
|
15990
|
+
<xsl:call-template name="setNamedDestination"/>
|
15910
15991
|
<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>
|
15911
15992
|
<!-- </xsl:if> -->
|
15912
15993
|
</xsl:if>
|
@@ -16648,6 +16729,7 @@
|
|
16648
16729
|
<!-- Normative references -->
|
16649
16730
|
<xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
|
16650
16731
|
|
16732
|
+
<xsl:call-template name="setNamedDestination"/>
|
16651
16733
|
<fo:block id="{@id}">
|
16652
16734
|
<xsl:apply-templates/>
|
16653
16735
|
|
@@ -16678,6 +16760,7 @@
|
|
16678
16760
|
</xsl:if>
|
16679
16761
|
</xsl:if> -->
|
16680
16762
|
|
16763
|
+
<xsl:call-template name="setNamedDestination"/>
|
16681
16764
|
<fo:block id="{@id}"/>
|
16682
16765
|
|
16683
16766
|
<xsl:apply-templates select="*[local-name() = 'title'][@columns = 1]"/>
|
@@ -16702,6 +16785,7 @@
|
|
16702
16785
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
16703
16786
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
16704
16787
|
|
16788
|
+
<xsl:call-template name="setNamedDestination"/>
|
16705
16789
|
<fo:block-container margin-left="6mm" role="SKIP">
|
16706
16790
|
<fo:block-container margin-left="0mm" role="SKIP">
|
16707
16791
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
@@ -16718,6 +16802,7 @@
|
|
16718
16802
|
<!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
16719
16803
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
16720
16804
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
16805
|
+
<xsl:call-template name="setNamedDestination"/>
|
16721
16806
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
16722
16807
|
|
16723
16808
|
<fo:list-item>
|
@@ -16747,6 +16832,7 @@
|
|
16747
16832
|
<xsl:choose>
|
16748
16833
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
16749
16834
|
<xsl:otherwise>
|
16835
|
+
<xsl:call-template name="setNamedDestination"/>
|
16750
16836
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
16751
16837
|
|
16752
16838
|
<fo:list-item-label end-indent="label-end()">
|
@@ -17143,6 +17229,7 @@
|
|
17143
17229
|
<xsl:template match="*[local-name() = 'admonition']">
|
17144
17230
|
|
17145
17231
|
<!-- text in the box -->
|
17232
|
+
<xsl:call-template name="setNamedDestination"/>
|
17146
17233
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
17147
17234
|
|
17148
17235
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -17398,7 +17485,7 @@
|
|
17398
17485
|
</xsl:template>
|
17399
17486
|
|
17400
17487
|
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
17401
|
-
<xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear' or @class = 'horizontal' or @class = 'norotate' or @class = 'halffontsize']" mode="update_xml_step1" priority="2">
|
17488
|
+
<xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear' or @class = 'fmt-hi' or @class = 'horizontal' or @class = 'norotate' or @class = 'halffontsize']" mode="update_xml_step1" priority="2">
|
17402
17489
|
<xsl:copy>
|
17403
17490
|
<xsl:copy-of select="@*"/>
|
17404
17491
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -17430,28 +17517,56 @@
|
|
17430
17517
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
17431
17518
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
17432
17519
|
|
17433
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
17520
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_step1">
|
17434
17521
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
17435
17522
|
<xsl:copy-of select="@*"/>
|
17436
17523
|
<xsl:choose>
|
17437
17524
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
17438
|
-
<xsl:
|
17525
|
+
<xsl:choose>
|
17526
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
17527
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
17528
|
+
</xsl:when>
|
17529
|
+
<xsl:otherwise>
|
17530
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_step1"/>
|
17531
|
+
</xsl:otherwise>
|
17532
|
+
</xsl:choose>
|
17439
17533
|
</xsl:when>
|
17440
17534
|
<xsl:otherwise>
|
17441
|
-
<xsl:
|
17535
|
+
<xsl:choose>
|
17536
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
17537
|
+
<xsl:copy-of select="node()"/>
|
17538
|
+
</xsl:when>
|
17539
|
+
<xsl:otherwise>
|
17540
|
+
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
17541
|
+
</xsl:otherwise>
|
17542
|
+
</xsl:choose>
|
17442
17543
|
</xsl:otherwise>
|
17443
17544
|
</xsl:choose>
|
17444
17545
|
</xsl:element>
|
17445
17546
|
</xsl:template>
|
17446
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
17547
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_pres">
|
17447
17548
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
17448
17549
|
<xsl:copy-of select="@*"/>
|
17449
17550
|
<xsl:choose>
|
17450
17551
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
17451
|
-
<xsl:
|
17552
|
+
<xsl:choose>
|
17553
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
17554
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
17555
|
+
</xsl:when>
|
17556
|
+
<xsl:otherwise>
|
17557
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_pres"/>
|
17558
|
+
</xsl:otherwise>
|
17559
|
+
</xsl:choose>
|
17452
17560
|
</xsl:when>
|
17453
17561
|
<xsl:otherwise>
|
17454
|
-
<xsl:
|
17562
|
+
<xsl:choose>
|
17563
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
17564
|
+
<xsl:copy-of select="node()"/>
|
17565
|
+
</xsl:when>
|
17566
|
+
<xsl:otherwise>
|
17567
|
+
<xsl:apply-templates select="node()" mode="update_xml_pres"/>
|
17568
|
+
</xsl:otherwise>
|
17569
|
+
</xsl:choose>
|
17455
17570
|
</xsl:otherwise>
|
17456
17571
|
</xsl:choose>
|
17457
17572
|
</xsl:element>
|
@@ -17546,6 +17661,9 @@
|
|
17546
17661
|
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
|
17547
17662
|
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
|
17548
17663
|
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
|
17664
|
+
<!-- https://github.com/metanorma/isodoc/issues/687 -->
|
17665
|
+
<xsl:template match="*[local-name() = 'source']" mode="update_xml_step1"/>
|
17666
|
+
<xsl:template match="*[local-name() = 'source']" mode="update_xml_pres"/>
|
17549
17667
|
|
17550
17668
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
17551
17669
|
<xsl:copy>
|
@@ -17680,16 +17798,24 @@
|
|
17680
17798
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_step1">
|
17681
17799
|
<xsl:element name="title" namespace="{$namespace_full}">
|
17682
17800
|
<xsl:copy-of select="@*"/>
|
17801
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
17802
|
+
|
17683
17803
|
<xsl:apply-templates mode="update_xml_step1"/>
|
17684
17804
|
</xsl:element>
|
17685
17805
|
</xsl:template>
|
17686
17806
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_pres">
|
17687
17807
|
<xsl:element name="title" namespace="{$namespace_full}">
|
17688
17808
|
<xsl:copy-of select="@*"/>
|
17809
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
17810
|
+
|
17689
17811
|
<xsl:apply-templates mode="update_xml_pres"/>
|
17690
17812
|
</xsl:element>
|
17691
17813
|
</xsl:template>
|
17692
17814
|
|
17815
|
+
<xsl:template name="addNamedDestinationAttribute">
|
17816
|
+
|
17817
|
+
</xsl:template>
|
17818
|
+
|
17693
17819
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
17694
17820
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
17695
17821
|
<xsl:choose>
|
@@ -17699,6 +17825,8 @@
|
|
17699
17825
|
<xsl:otherwise>
|
17700
17826
|
<xsl:element name="name" namespace="{$namespace_full}">
|
17701
17827
|
<xsl:copy-of select="@*"/>
|
17828
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
17829
|
+
|
17702
17830
|
<xsl:apply-templates mode="update_xml_step1"/>
|
17703
17831
|
</xsl:element>
|
17704
17832
|
</xsl:otherwise>
|
@@ -17712,6 +17840,8 @@
|
|
17712
17840
|
<xsl:otherwise>
|
17713
17841
|
<xsl:element name="name" namespace="{$namespace_full}">
|
17714
17842
|
<xsl:copy-of select="@*"/>
|
17843
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
17844
|
+
|
17715
17845
|
<xsl:apply-templates mode="update_xml_pres"/>
|
17716
17846
|
</xsl:element>
|
17717
17847
|
</xsl:otherwise>
|
@@ -17816,6 +17946,20 @@
|
|
17816
17946
|
</xsl:element>
|
17817
17947
|
</xsl:template>
|
17818
17948
|
|
17949
|
+
<xsl:template match="*[local-name() = 'fmt-source']"/>
|
17950
|
+
<xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_step1">
|
17951
|
+
<xsl:element name="source" namespace="{$namespace_full}">
|
17952
|
+
<xsl:copy-of select="@*"/>
|
17953
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
17954
|
+
</xsl:element>
|
17955
|
+
</xsl:template>
|
17956
|
+
<xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_pres">
|
17957
|
+
<xsl:element name="source" namespace="{$namespace_full}">
|
17958
|
+
<xsl:copy-of select="@*"/>
|
17959
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
17960
|
+
</xsl:element>
|
17961
|
+
</xsl:template>
|
17962
|
+
|
17819
17963
|
<xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
|
17820
17964
|
<xsl:apply-templates mode="update_xml_step1"/>
|
17821
17965
|
</xsl:template>
|
@@ -19281,6 +19425,30 @@
|
|
19281
19425
|
</xsl:attribute>
|
19282
19426
|
</xsl:template>
|
19283
19427
|
|
19428
|
+
<xsl:template name="setIDforNamedDestination">
|
19429
|
+
<xsl:if test="@named_dest">
|
19430
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
19431
|
+
</xsl:if>
|
19432
|
+
</xsl:template>
|
19433
|
+
|
19434
|
+
<xsl:template name="setIDforNamedDestinationInline">
|
19435
|
+
<xsl:if test="@named_dest">
|
19436
|
+
<fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
|
19437
|
+
</xsl:if>
|
19438
|
+
</xsl:template>
|
19439
|
+
|
19440
|
+
<xsl:template name="setNamedDestination">
|
19441
|
+
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
19442
|
+
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
|
19443
|
+
<fox:destination internal-destination="{@id}"/>
|
19444
|
+
</xsl:if>
|
19445
|
+
<xsl:for-each select=". | *[local-name() = 'title'] | *[local-name() = 'name']">
|
19446
|
+
<xsl:if test="@named_dest">
|
19447
|
+
<fox:destination internal-destination="{@named_dest}"/>
|
19448
|
+
</xsl:if>
|
19449
|
+
</xsl:for-each>
|
19450
|
+
</xsl:template>
|
19451
|
+
|
19284
19452
|
<xsl:template name="add-letter-spacing">
|
19285
19453
|
<xsl:param name="text"/>
|
19286
19454
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|
@@ -78,18 +78,28 @@ module IsoDoc
|
|
78
78
|
"<tr><td border='0' colspan='#{cols}'>#{elem}</td></tr>"
|
79
79
|
end
|
80
80
|
|
81
|
-
#
|
82
|
-
def
|
81
|
+
# KILL
|
82
|
+
def tablesourcex(elem)
|
83
83
|
ret = [semx_fmt_dup(elem)]
|
84
|
-
|
85
|
-
|
84
|
+
n = elem
|
85
|
+
while n = n&.next_element
|
86
|
+
case n.name
|
87
|
+
when "source"
|
88
|
+
when "fmt-source"
|
89
|
+
ret << to_xml(n.remove.children)
|
90
|
+
else break
|
91
|
+
end
|
86
92
|
end
|
87
|
-
s = ret.map
|
93
|
+
s = ret.map(&:strip).join("; ")
|
88
94
|
tablesource_label(elem, s)
|
89
95
|
end
|
90
96
|
|
91
|
-
def
|
97
|
+
def source1_label(elem, sources, ancestor)
|
98
|
+
case ancestor
|
99
|
+
when :table
|
92
100
|
elem.children = l10n("#{@i18n.source}: #{sources}")
|
101
|
+
else super
|
102
|
+
end
|
93
103
|
end
|
94
104
|
|
95
105
|
def bibdata_i18n(bibdata)
|
@@ -267,6 +267,10 @@ in a document (e.g. sourcecode annotations)</a:documentation>
|
|
267
267
|
<value>justified</value>
|
268
268
|
</choice>
|
269
269
|
</define>
|
270
|
+
<define name="IdRefType">
|
271
|
+
<a:documentation>Type of cross-references to elements. In BasicDoc, these always point to id { xsd:ID } </a:documentation>
|
272
|
+
<data type="IDREF"/>
|
273
|
+
</define>
|
270
274
|
<define name="RequiredId">
|
271
275
|
<a:documentation>Mandatory anchor of element, to be used for cross-references within the document</a:documentation>
|
272
276
|
<attribute name="id">
|
@@ -409,13 +413,13 @@ in a document (e.g. sourcecode annotations)</a:documentation>
|
|
409
413
|
<attribute name="from">
|
410
414
|
<a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
|
411
415
|
If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
|
412
|
-
<
|
416
|
+
<ref name="IdRefType"/>
|
413
417
|
</attribute>
|
414
418
|
</optional>
|
415
419
|
<optional>
|
416
420
|
<attribute name="to">
|
417
421
|
<a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
|
418
|
-
<
|
422
|
+
<ref name="IdRefType"/>
|
419
423
|
</attribute>
|
420
424
|
</optional>
|
421
425
|
</define>
|
@@ -1504,7 +1508,7 @@ Restricted recursively to contain only other such inline elements with no identi
|
|
1504
1508
|
<attribute name="to">
|
1505
1509
|
<a:documentation>A reference to an anchor element (typically a bookmark),
|
1506
1510
|
to indicate that the index range covers a range of locations between the current index element and the `to` anchor</a:documentation>
|
1507
|
-
<
|
1511
|
+
<ref name="IdRefType"/>
|
1508
1512
|
</attribute>
|
1509
1513
|
</optional>
|
1510
1514
|
<ref name="index-primary">
|
@@ -1662,7 +1666,7 @@ which can be bookmarks as well as block or section references</a:documentation>
|
|
1662
1666
|
<define name="XrefAttributes">
|
1663
1667
|
<attribute name="target">
|
1664
1668
|
<a:documentation>The identifier of a section, block or inlined element being referenced</a:documentation>
|
1665
|
-
<
|
1669
|
+
<ref name="IdRefType"/>
|
1666
1670
|
</attribute>
|
1667
1671
|
<optional>
|
1668
1672
|
<attribute name="type">
|
@@ -1723,7 +1727,7 @@ The target of a footnote is the location it is embedded in within the text</a:do
|
|
1723
1727
|
<attribute name="target">
|
1724
1728
|
<a:documentation>The target of the callout is understood to be the location of the callout within the source code;
|
1725
1729
|
the extent of the target is not expressed overtly</a:documentation>
|
1726
|
-
<
|
1730
|
+
<ref name="IdRefType"/>
|
1727
1731
|
</attribute>
|
1728
1732
|
<text>
|
1729
1733
|
<a:documentation>The label of the callout, used to identify its target within the source code</a:documentation>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<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">
|
3
|
-
<!-- VERSION v2.0.
|
3
|
+
<!-- VERSION v2.0.5 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -36,6 +36,12 @@
|
|
36
36
|
</zeroOrMore>
|
37
37
|
</element>
|
38
38
|
</define>
|
39
|
+
<define name="IdRefType">
|
40
|
+
<a:documentation>Cross-references are not normalised to xsd:IDREF in Semantic XML: that is deferred to Presentation XML.
|
41
|
+
All IdRefType instances point not to `@id` in Semantic XML, which is the Content GUID for an element,
|
42
|
+
but to `@anchor`, the user-supplied cross-reference</a:documentation>
|
43
|
+
<text/>
|
44
|
+
</define>
|
39
45
|
<define name="index-primary">
|
40
46
|
<element name="primary">
|
41
47
|
<oneOrMore>
|
@@ -238,7 +244,7 @@
|
|
238
244
|
<a:documentation>Notes specific to this block</a:documentation>
|
239
245
|
</ref>
|
240
246
|
</zeroOrMore>
|
241
|
-
<ref name="
|
247
|
+
<ref name="BlockSource">
|
242
248
|
<a:documentation>A source for the table</a:documentation>
|
243
249
|
</ref>
|
244
250
|
</define>
|
@@ -262,10 +268,112 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
262
268
|
<a:documentation>Notes whose scope is the current block</a:documentation>
|
263
269
|
</ref>
|
264
270
|
</zeroOrMore>
|
265
|
-
<ref name="
|
271
|
+
<ref name="BlockSource">
|
272
|
+
<a:documentation>A source for the block</a:documentation>
|
273
|
+
</ref>
|
274
|
+
</define>
|
275
|
+
<define name="FigureBody">
|
276
|
+
<optional>
|
277
|
+
<ref name="tname">
|
278
|
+
<a:documentation>The caption of the block</a:documentation>
|
279
|
+
</ref>
|
280
|
+
</optional>
|
281
|
+
<choice>
|
282
|
+
<a:documentation>Content of the figure</a:documentation>
|
283
|
+
<ref name="image"/>
|
284
|
+
<ref name="video"/>
|
285
|
+
<ref name="audio"/>
|
286
|
+
<ref name="pre"/>
|
287
|
+
<oneOrMore>
|
288
|
+
<ref name="paragraph-with-footnote"/>
|
289
|
+
</oneOrMore>
|
290
|
+
<zeroOrMore>
|
291
|
+
<ref name="figure"/>
|
292
|
+
</zeroOrMore>
|
293
|
+
</choice>
|
294
|
+
<zeroOrMore>
|
295
|
+
<ref name="fn">
|
296
|
+
<a:documentation>Footnotes specific to the figure</a:documentation>
|
297
|
+
</ref>
|
298
|
+
</zeroOrMore>
|
299
|
+
<optional>
|
300
|
+
<ref name="dl">
|
301
|
+
<a:documentation>An optional definitions list defining any symbols used in the figure</a:documentation>
|
302
|
+
</ref>
|
303
|
+
</optional>
|
304
|
+
<zeroOrMore>
|
305
|
+
<ref name="note">
|
306
|
+
<a:documentation>Notes whose scope is the current block</a:documentation>
|
307
|
+
</ref>
|
308
|
+
</zeroOrMore>
|
309
|
+
<ref name="BlockSource">
|
266
310
|
<a:documentation>A source for the block</a:documentation>
|
267
311
|
</ref>
|
268
312
|
</define>
|
313
|
+
<define name="FigureNoIdBody">
|
314
|
+
<optional>
|
315
|
+
<ref name="source">
|
316
|
+
<a:documentation>A URI or other reference intended to link to an externally hosted image (or equivalent)</a:documentation>
|
317
|
+
</ref>
|
318
|
+
</optional>
|
319
|
+
<optional>
|
320
|
+
<ref name="tname">
|
321
|
+
<a:documentation>The caption of the block</a:documentation>
|
322
|
+
</ref>
|
323
|
+
</optional>
|
324
|
+
<choice>
|
325
|
+
<a:documentation>Content of the figure</a:documentation>
|
326
|
+
<ref name="image-no-id"/>
|
327
|
+
<ref name="video-no-id"/>
|
328
|
+
<ref name="audio-no-id"/>
|
329
|
+
<ref name="pre-no-id"/>
|
330
|
+
<oneOrMore>
|
331
|
+
<ref name="paragraph-with-footnote-no-id"/>
|
332
|
+
</oneOrMore>
|
333
|
+
<zeroOrMore>
|
334
|
+
<ref name="figure-no-id"/>
|
335
|
+
</zeroOrMore>
|
336
|
+
</choice>
|
337
|
+
<zeroOrMore>
|
338
|
+
<ref name="fn">
|
339
|
+
<a:documentation>Footnotes specific to the figure</a:documentation>
|
340
|
+
</ref>
|
341
|
+
</zeroOrMore>
|
342
|
+
<optional>
|
343
|
+
<ref name="dl-no-id">
|
344
|
+
<a:documentation>An optional definitions list defining any symbols used in the figure</a:documentation>
|
345
|
+
</ref>
|
346
|
+
</optional>
|
347
|
+
<zeroOrMore>
|
348
|
+
<ref name="note-no-id">
|
349
|
+
<a:documentation>Notes whose scope is the current block</a:documentation>
|
350
|
+
</ref>
|
351
|
+
</zeroOrMore>
|
352
|
+
<ref name="BlockSource">
|
353
|
+
<a:documentation>A source for the block</a:documentation>
|
354
|
+
</ref>
|
355
|
+
</define>
|
356
|
+
<define name="source">
|
357
|
+
<element name="source">
|
358
|
+
<attribute name="status">
|
359
|
+
<a:documentation>The status of the term as it is used in this document, relative to its definition in the original document</a:documentation>
|
360
|
+
<ref name="SourceStatusType"/>
|
361
|
+
</attribute>
|
362
|
+
<attribute name="type">
|
363
|
+
<a:documentation>The type of the managed term in the present context</a:documentation>
|
364
|
+
<ref name="SourceTypeType"/>
|
365
|
+
</attribute>
|
366
|
+
<ref name="origin">
|
367
|
+
<a:documentation>The original document and location where the term definition has been obtained from</a:documentation>
|
368
|
+
</ref>
|
369
|
+
<optional>
|
370
|
+
<ref name="modification">
|
371
|
+
<a:documentation>Any changes that the definition of the term has undergone relative to the original document,
|
372
|
+
in order to be applicable in this standardisation document</a:documentation>
|
373
|
+
</ref>
|
374
|
+
</optional>
|
375
|
+
</element>
|
376
|
+
</define>
|
269
377
|
<define name="sourcecodebody">
|
270
378
|
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
271
379
|
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
@@ -687,6 +795,20 @@ titlecase, or lowercase</a:documentation>
|
|
687
795
|
</attribute>
|
688
796
|
</optional>
|
689
797
|
</define>
|
798
|
+
<define name="RequiredId" combine="interleave">
|
799
|
+
<optional>
|
800
|
+
<attribute name="anchor">
|
801
|
+
<a:documentation>User-supplied anchor of element; replaced by content-based id, with all references to the anchor updated accordingly</a:documentation>
|
802
|
+
</attribute>
|
803
|
+
</optional>
|
804
|
+
</define>
|
805
|
+
<define name="OptionalId" combine="interleave">
|
806
|
+
<optional>
|
807
|
+
<attribute name="anchor">
|
808
|
+
<a:documentation> User-supplied anchor of element; replaced by content-based id, with all references to the anchor updated accordingly</a:documentation>
|
809
|
+
</attribute>
|
810
|
+
</optional>
|
811
|
+
</define>
|
690
812
|
<define name="ObligationType">
|
691
813
|
<a:documentation>The force of a clause in a standard document: whether it has normative or informative effect</a:documentation>
|
692
814
|
<choice>
|
@@ -1081,7 +1203,7 @@ That concept may be defined as a term within the current document, or it may be
|
|
1081
1203
|
<element name="label">
|
1082
1204
|
<!-- Identifier of form input element that this element is a label of -->
|
1083
1205
|
<attribute name="for">
|
1084
|
-
<
|
1206
|
+
<ref name="IdRefType"/>
|
1085
1207
|
</attribute>
|
1086
1208
|
<zeroOrMore>
|
1087
1209
|
<ref name="PureTextElement"/>
|
@@ -1328,6 +1450,7 @@ numbers</a:documentation>
|
|
1328
1450
|
<ref name="foreword"/>
|
1329
1451
|
<ref name="introduction"/>
|
1330
1452
|
<ref name="acknowledgements"/>
|
1453
|
+
<ref name="executivesummary"/>
|
1331
1454
|
</choice>
|
1332
1455
|
</oneOrMore>
|
1333
1456
|
</element>
|
@@ -1351,6 +1474,11 @@ numbers</a:documentation>
|
|
1351
1474
|
<ref name="Content-Section"/>
|
1352
1475
|
</element>
|
1353
1476
|
</define>
|
1477
|
+
<define name="executivesummary">
|
1478
|
+
<element name="executivesummary">
|
1479
|
+
<ref name="Content-Section"/>
|
1480
|
+
</element>
|
1481
|
+
</define>
|
1354
1482
|
<define name="indexsect">
|
1355
1483
|
<element name="indexsect">
|
1356
1484
|
<ref name="Content-Section"/>
|
@@ -1576,6 +1704,15 @@ used in document amendments</a:documentation>
|
|
1576
1704
|
<define name="annex">
|
1577
1705
|
<element name="annex">
|
1578
1706
|
<ref name="Annex-Section"/>
|
1707
|
+
<zeroOrMore>
|
1708
|
+
<ref name="annex-appendix"/>
|
1709
|
+
</zeroOrMore>
|
1710
|
+
</element>
|
1711
|
+
</define>
|
1712
|
+
<define name="annex-appendix">
|
1713
|
+
<a:documentation>Appendix, distinct subclause type for annexes (annex to annex, rather than subclause to annex)</a:documentation>
|
1714
|
+
<element name="appendix">
|
1715
|
+
<ref name="Clause-Section"/>
|
1579
1716
|
</element>
|
1580
1717
|
</define>
|
1581
1718
|
<define name="terms">
|
@@ -2106,7 +2243,7 @@ used in document amendments</a:documentation>
|
|
2106
2243
|
</define>
|
2107
2244
|
<define name="termsource">
|
2108
2245
|
<a:documentation>The bibliographic source where a term is defined in the sense applicable in this standardisation document</a:documentation>
|
2109
|
-
<element name="
|
2246
|
+
<element name="source">
|
2110
2247
|
<attribute name="status">
|
2111
2248
|
<a:documentation>The status of the term as it is used in this document, relative to its definition in the original document</a:documentation>
|
2112
2249
|
<ref name="SourceStatusType"/>
|
@@ -2488,6 +2625,11 @@ Normative References contents contain normative references, but as a clause in t
|
|
2488
2625
|
<ref name="termsource"/>
|
2489
2626
|
</zeroOrMore>
|
2490
2627
|
</define>
|
2628
|
+
<define name="BlockSource">
|
2629
|
+
<zeroOrMore>
|
2630
|
+
<ref name="source"/>
|
2631
|
+
</zeroOrMore>
|
2632
|
+
</define>
|
2491
2633
|
<start>
|
2492
2634
|
<ref name="standard-document"/>
|
2493
2635
|
</start>
|
@@ -46,13 +46,17 @@ module Metanorma
|
|
46
46
|
options_preprocess(options)
|
47
47
|
case format
|
48
48
|
when :html
|
49
|
-
IsoDoc::Jis::HtmlConvert.new(options)
|
49
|
+
IsoDoc::Jis::HtmlConvert.new(options)
|
50
|
+
.convert(inname, xml, nil, outname)
|
50
51
|
when :doc
|
51
|
-
IsoDoc::Jis::WordConvert.new(options)
|
52
|
+
IsoDoc::Jis::WordConvert.new(options)
|
53
|
+
.convert(inname, xml, nil, outname)
|
52
54
|
when :pdf
|
53
|
-
IsoDoc::Jis::PdfConvert.new(options)
|
55
|
+
IsoDoc::Jis::PdfConvert.new(options)
|
56
|
+
.convert(inname, xml, nil, outname)
|
54
57
|
when :presentation
|
55
|
-
IsoDoc::Jis::PresentationXMLConvert.new(options)
|
58
|
+
IsoDoc::Jis::PresentationXMLConvert.new(options)
|
59
|
+
.convert(inname, xml, nil, outname)
|
56
60
|
else
|
57
61
|
super
|
58
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-jis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: japanese_calendar
|