metanorma-ieee 1.4.3 → 1.4.5
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/html2doc/ieee_wp/lists.rb +2 -1
- data/lib/isodoc/ieee/html/html_ieee_intro.html +1 -0
- data/lib/isodoc/ieee/ieee.amendment.xsl +310 -60
- data/lib/isodoc/ieee/ieee.standard.xsl +310 -60
- data/lib/isodoc/ieee/presentation_concepts.rb +167 -0
- data/lib/isodoc/ieee/presentation_terms.rb +35 -341
- data/lib/isodoc/ieee/presentation_xml_convert.rb +14 -11
- data/lib/isodoc/ieee/xref.rb +8 -15
- data/lib/metanorma/ieee/basicdoc.rng +14 -8
- data/lib/metanorma/ieee/biblio-standoc.rng +37 -7
- data/lib/metanorma/ieee/biblio.rng +30 -18
- data/lib/metanorma/ieee/cleanup_ref.rb +15 -13
- data/lib/metanorma/ieee/converter.rb +1 -1
- data/lib/metanorma/ieee/front.rb +1 -2
- data/lib/metanorma/ieee/ieee.rng +0 -32
- data/lib/metanorma/ieee/isodoc.rng +130 -96
- data/lib/metanorma/ieee/relaton-ieee.rng +34 -37
- data/lib/metanorma/ieee/reqt.rng +7 -6
- data/lib/metanorma/ieee/validate.rb +2 -4
- data/lib/metanorma/ieee/version.rb +1 -1
- metadata +3 -2
@@ -2801,7 +2801,7 @@
|
|
2801
2801
|
<xsl:choose>
|
2802
2802
|
<xsl:when test="ancestor::ieee:table/@unnumbered = 'true' and normalize-space($substring_after) = 'Key'"><!-- no display Table - --></xsl:when>
|
2803
2803
|
<xsl:otherwise>
|
2804
|
-
<fo:inline font-weight="bold" font-style="normal">
|
2804
|
+
<fo:inline font-weight="bold" font-style="normal" role="SKIP">
|
2805
2805
|
<xsl:choose>
|
2806
2806
|
<xsl:when test="$current_template = 'whitepaper' or $current_template= 'icap-whitepaper' or $current_template = 'industry-connection-report'">
|
2807
2807
|
<!-- Figure N in blue color -->
|
@@ -4509,6 +4509,7 @@
|
|
4509
4509
|
</xsl:template> <!-- refine_table-style -->
|
4510
4510
|
|
4511
4511
|
<xsl:attribute-set name="table-name-style">
|
4512
|
+
<xsl:attribute name="role">Caption</xsl:attribute>
|
4512
4513
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4513
4514
|
|
4514
4515
|
<xsl:attribute name="font-family">Arial</xsl:attribute>
|
@@ -4520,6 +4521,9 @@
|
|
4520
4521
|
|
4521
4522
|
<xsl:template name="refine_table-name-style">
|
4522
4523
|
<xsl:param name="continued"/>
|
4524
|
+
<xsl:if test="$continued = 'true'">
|
4525
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
4526
|
+
</xsl:if>
|
4523
4527
|
|
4524
4528
|
</xsl:template> <!-- refine_table-name-style -->
|
4525
4529
|
|
@@ -6179,8 +6183,14 @@
|
|
6179
6183
|
</xsl:choose>
|
6180
6184
|
</xsl:variable>
|
6181
6185
|
|
6186
|
+
<xsl:call-template name="setNamedDestination"/>
|
6187
|
+
|
6182
6188
|
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
6183
6189
|
|
6190
|
+
<xsl:for-each select="*[local-name() = 'name']">
|
6191
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
6192
|
+
</xsl:for-each>
|
6193
|
+
|
6184
6194
|
<xsl:call-template name="refine_table-container-style">
|
6185
6195
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
6186
6196
|
</xsl:call-template>
|
@@ -6331,7 +6341,7 @@
|
|
6331
6341
|
</xsl:if>
|
6332
6342
|
|
6333
6343
|
</fo:block-container>
|
6334
|
-
</xsl:variable>
|
6344
|
+
</xsl:variable> <!-- END: variable name="table" -->
|
6335
6345
|
|
6336
6346
|
<xsl:variable name="isAdded" select="@added"/>
|
6337
6347
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -6368,11 +6378,13 @@
|
|
6368
6378
|
|
6369
6379
|
</xsl:template>
|
6370
6380
|
|
6381
|
+
<!-- table/name-->
|
6371
6382
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
6372
6383
|
<xsl:param name="continued"/>
|
6384
|
+
<xsl:param name="cols-count"/>
|
6373
6385
|
<xsl:if test="normalize-space() != ''">
|
6374
6386
|
|
6375
|
-
<fo:inline>
|
6387
|
+
<fo:inline role="SKIP">
|
6376
6388
|
|
6377
6389
|
<xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
|
6378
6390
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
@@ -6846,7 +6858,7 @@
|
|
6846
6858
|
|
6847
6859
|
<xsl:variable name="tableWithNotesAndFootnotes">
|
6848
6860
|
|
6849
|
-
<fo:table keep-with-previous="always">
|
6861
|
+
<fo:table keep-with-previous="always" role="SKIP">
|
6850
6862
|
<xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
|
6851
6863
|
<xsl:variable name="name" select="local-name()"/>
|
6852
6864
|
<xsl:choose>
|
@@ -6877,9 +6889,9 @@
|
|
6877
6889
|
</xsl:otherwise>
|
6878
6890
|
</xsl:choose>
|
6879
6891
|
|
6880
|
-
<fo:table-body>
|
6881
|
-
<fo:table-row>
|
6882
|
-
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
6892
|
+
<fo:table-body role="SKIP">
|
6893
|
+
<fo:table-row role="SKIP">
|
6894
|
+
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
|
6883
6895
|
|
6884
6896
|
<xsl:call-template name="refine_table-footer-cell-style"/>
|
6885
6897
|
|
@@ -6954,6 +6966,7 @@
|
|
6954
6966
|
<!-- if there isn't 'thead' and there is a table's title -->
|
6955
6967
|
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='thead']) and ancestor::*[local-name()='table']/*[local-name()='name']">
|
6956
6968
|
<fo:table-header>
|
6969
|
+
|
6957
6970
|
<xsl:call-template name="table-header-title">
|
6958
6971
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
6959
6972
|
</xsl:call-template>
|
@@ -7207,8 +7220,8 @@
|
|
7207
7220
|
<xsl:for-each select="xalan:nodeset($styles__)/item">
|
7208
7221
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
7209
7222
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
7210
|
-
<xsl:if test="$key = 'color' or
|
7211
|
-
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
7223
|
+
<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'">
|
7224
|
+
<style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
|
7212
7225
|
</xsl:if>
|
7213
7226
|
</xsl:for-each>
|
7214
7227
|
</xsl:variable>
|
@@ -7272,6 +7285,7 @@
|
|
7272
7285
|
<!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
|
7273
7286
|
<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">
|
7274
7287
|
|
7288
|
+
<xsl:call-template name="setNamedDestination"/>
|
7275
7289
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
7276
7290
|
<xsl:copy-of select="@id"/>
|
7277
7291
|
|
@@ -7319,6 +7333,7 @@
|
|
7319
7333
|
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
7320
7334
|
<!-- fn in text -->
|
7321
7335
|
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" priority="2" name="fn">
|
7336
|
+
<xsl:param name="footnote_body_from_table">false</xsl:param>
|
7322
7337
|
|
7323
7338
|
<!-- list of unique footnotes -->
|
7324
7339
|
<xsl:variable name="p_fn_">
|
@@ -7384,7 +7399,7 @@
|
|
7384
7399
|
<xsl:copy-of select="$footnote_inline"/>
|
7385
7400
|
</xsl:when>
|
7386
7401
|
<!-- <xsl:when test="$footnotes//*[local-name() = 'fmt-fn-body'][@id = $ref_id] or normalize-space(@skip_footnote_body) = 'false'"> -->
|
7387
|
-
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
7402
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
7388
7403
|
|
7389
7404
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
7390
7405
|
<xsl:copy-of select="$footnote_inline"/>
|
@@ -7793,39 +7808,51 @@
|
|
7793
7808
|
<!-- fn reference in the table rendering (for instance, 'some text 1) some text' ) -->
|
7794
7809
|
<!-- fn --> <!-- in table --> <!-- for figure see <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/> -->
|
7795
7810
|
<xsl:template match="*[local-name()='fn']">
|
7796
|
-
<
|
7811
|
+
<xsl:variable name="target" select="@target"/>
|
7812
|
+
<xsl:choose>
|
7813
|
+
<!-- case for footnotes in Requirement tables (https://github.com/metanorma/metanorma-ogc/issues/791) -->
|
7814
|
+
<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]">
|
7815
|
+
<xsl:call-template name="fn">
|
7816
|
+
<xsl:with-param name="footnote_body_from_table">true</xsl:with-param>
|
7817
|
+
</xsl:call-template>
|
7818
|
+
</xsl:when>
|
7819
|
+
<xsl:otherwise>
|
7797
7820
|
|
7798
|
-
|
7821
|
+
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
7799
7822
|
|
7800
|
-
|
7801
|
-
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
7802
|
-
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
7803
|
-
<!-- <xsl:attribute name="internal-destination">
|
7804
|
-
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
7805
|
-
</xsl:attribute>
|
7806
|
-
</xsl:if>
|
7807
|
-
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
7808
|
-
<xsl:attribute name="internal-destination">
|
7809
|
-
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
7810
|
-
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
7811
|
-
</xsl:attribute>
|
7812
|
-
</xsl:if> -->
|
7813
|
-
<!-- <xsl:if test="$namespace = 'plateau'">
|
7814
|
-
<xsl:text>※</xsl:text>
|
7815
|
-
</xsl:if> -->
|
7816
|
-
<!-- <xsl:value-of select="@reference"/> -->
|
7823
|
+
<xsl:call-template name="refine_fn-reference-style"/>
|
7817
7824
|
|
7818
|
-
|
7825
|
+
<!-- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> --> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
7826
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
7827
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
7828
|
+
<!-- <xsl:attribute name="internal-destination">
|
7829
|
+
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
7830
|
+
</xsl:attribute>
|
7831
|
+
</xsl:if>
|
7832
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
7833
|
+
<xsl:attribute name="internal-destination">
|
7834
|
+
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
7835
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
7836
|
+
</xsl:attribute>
|
7837
|
+
</xsl:if> -->
|
7838
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
7839
|
+
<xsl:text>※</xsl:text>
|
7840
|
+
</xsl:if> -->
|
7841
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
7819
7842
|
|
7820
|
-
|
7821
|
-
|
7822
|
-
|
7823
|
-
|
7824
|
-
|
7825
|
-
|
7826
|
-
|
7827
|
-
|
7828
|
-
|
7843
|
+
<xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
|
7844
|
+
|
7845
|
+
<!-- <xsl:if test="$namespace = 'bsi'">
|
7846
|
+
<xsl:text>)</xsl:text>
|
7847
|
+
</xsl:if> -->
|
7848
|
+
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
7849
|
+
<!-- <xsl:if test="$namespace = 'jis'">
|
7850
|
+
<fo:inline font-weight="normal">)</fo:inline>
|
7851
|
+
</xsl:if> -->
|
7852
|
+
</fo:basic-link>
|
7853
|
+
</fo:inline>
|
7854
|
+
</xsl:otherwise>
|
7855
|
+
</xsl:choose>
|
7829
7856
|
</xsl:template> <!-- fn -->
|
7830
7857
|
|
7831
7858
|
<!-- fn/text() -->
|
@@ -7880,6 +7907,10 @@
|
|
7880
7907
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
7881
7908
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
7882
7909
|
|
7910
|
+
<xsl:if test="@key = 'true' and ancestor::*[local-name() = 'figure']">
|
7911
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
7912
|
+
</xsl:if>
|
7913
|
+
|
7883
7914
|
<xsl:call-template name="setBlockSpanAll"/>
|
7884
7915
|
|
7885
7916
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -8173,7 +8204,7 @@
|
|
8173
8204
|
|
8174
8205
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
8175
8206
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
8176
|
-
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
8207
|
+
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always" keep-with-previous="always">
|
8177
8208
|
<xsl:call-template name="refine_figure_key_style"/>
|
8178
8209
|
<xsl:apply-templates/>
|
8179
8210
|
</fo:block>
|
@@ -8424,6 +8455,7 @@
|
|
8424
8455
|
|
8425
8456
|
<xsl:call-template name="refine_dt-cell-style"/>
|
8426
8457
|
|
8458
|
+
<xsl:call-template name="setNamedDestination"/>
|
8427
8459
|
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
8428
8460
|
|
8429
8461
|
<xsl:choose>
|
@@ -8858,7 +8890,7 @@
|
|
8858
8890
|
<!-- ================= -->
|
8859
8891
|
|
8860
8892
|
<!-- highlight text -->
|
8861
|
-
<xsl:template match="*[local-name()='hi']">
|
8893
|
+
<xsl:template match="*[local-name()='hi'] | *[local-name() = 'span'][@class = 'fmt-hi']" priority="3">
|
8862
8894
|
<fo:inline background-color="yellow">
|
8863
8895
|
<xsl:apply-templates/>
|
8864
8896
|
</fo:inline>
|
@@ -10455,6 +10487,7 @@
|
|
10455
10487
|
<!-- Appendix processing -->
|
10456
10488
|
<!-- ======================== -->
|
10457
10489
|
<xsl:template match="*[local-name()='appendix']">
|
10490
|
+
<xsl:call-template name="setNamedDestination"/>
|
10458
10491
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
10459
10492
|
<xsl:apply-templates select="*[local-name()='title']"/>
|
10460
10493
|
</fo:block>
|
@@ -10465,13 +10498,14 @@
|
|
10465
10498
|
<xsl:variable name="level">
|
10466
10499
|
<xsl:call-template name="getLevel"/>
|
10467
10500
|
</xsl:variable>
|
10468
|
-
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
10501
|
+
<fo:inline role="H{$level}"><xsl:call-template name="setIDforNamedDestination"/><xsl:apply-templates/></fo:inline>
|
10469
10502
|
</xsl:template>
|
10470
10503
|
<!-- ======================== -->
|
10471
10504
|
<!-- END Appendix processing -->
|
10472
10505
|
<!-- ======================== -->
|
10473
10506
|
|
10474
10507
|
<xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
10508
|
+
<xsl:call-template name="setNamedDestination"/>
|
10475
10509
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
10476
10510
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
10477
10511
|
</fo:block>
|
@@ -10501,6 +10535,7 @@
|
|
10501
10535
|
<xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
10502
10536
|
<xsl:param name="callout"/>
|
10503
10537
|
<fo:inline id="{@id}">
|
10538
|
+
<xsl:call-template name="setNamedDestination"/>
|
10504
10539
|
<!-- for first p in annotation, put <x> -->
|
10505
10540
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
10506
10541
|
<xsl:apply-templates/>
|
@@ -10547,6 +10582,7 @@
|
|
10547
10582
|
|
10548
10583
|
</xsl:if>
|
10549
10584
|
<fo:block-container margin-left="0mm" role="SKIP">
|
10585
|
+
<xsl:call-template name="setNamedDestination"/>
|
10550
10586
|
<fo:block id="{@id}">
|
10551
10587
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
|
10552
10588
|
</fo:block>
|
@@ -10592,8 +10628,13 @@
|
|
10592
10628
|
</fo:block>
|
10593
10629
|
</fo:table-cell>
|
10594
10630
|
<fo:table-cell display-align="center">
|
10631
|
+
|
10595
10632
|
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
10596
10633
|
|
10634
|
+
<xsl:for-each select="../*[local-name() = 'name']">
|
10635
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
10636
|
+
</xsl:for-each>
|
10637
|
+
|
10597
10638
|
<xsl:call-template name="refine_formula-stem-number-style"/>
|
10598
10639
|
|
10599
10640
|
<xsl:apply-templates select="../*[local-name() = 'name']"/>
|
@@ -10628,6 +10669,8 @@
|
|
10628
10669
|
|
10629
10670
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
10630
10671
|
|
10672
|
+
<xsl:call-template name="setNamedDestination"/>
|
10673
|
+
|
10631
10674
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
10632
10675
|
|
10633
10676
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -10692,6 +10735,7 @@
|
|
10692
10735
|
</xsl:template>
|
10693
10736
|
|
10694
10737
|
<xsl:template match="*[local-name() = 'termnote']">
|
10738
|
+
<xsl:call-template name="setNamedDestination"/>
|
10695
10739
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
10696
10740
|
|
10697
10741
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -10798,12 +10842,14 @@
|
|
10798
10842
|
|
10799
10843
|
<xsl:template match="*[local-name() = 'terms']">
|
10800
10844
|
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
10845
|
+
<xsl:call-template name="setNamedDestination"/>
|
10801
10846
|
<fo:block id="{@id}">
|
10802
10847
|
<xsl:apply-templates/>
|
10803
10848
|
</fo:block>
|
10804
10849
|
</xsl:template>
|
10805
10850
|
|
10806
10851
|
<xsl:template match="*[local-name() = 'term']">
|
10852
|
+
<xsl:call-template name="setNamedDestination"/>
|
10807
10853
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
10808
10854
|
|
10809
10855
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
|
@@ -10835,6 +10881,7 @@
|
|
10835
10881
|
<xsl:template match="*[local-name() = 'figure']" name="figure">
|
10836
10882
|
<xsl:variable name="isAdded" select="@added"/>
|
10837
10883
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
10884
|
+
<xsl:call-template name="setNamedDestination"/>
|
10838
10885
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
10839
10886
|
<xsl:call-template name="refine_figure-block-style"/>
|
10840
10887
|
|
@@ -10851,6 +10898,11 @@
|
|
10851
10898
|
</xsl:variable>
|
10852
10899
|
|
10853
10900
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
10901
|
+
|
10902
|
+
<xsl:for-each select="*[local-name() = 'name']"> <!-- set context -->
|
10903
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
10904
|
+
</xsl:for-each>
|
10905
|
+
|
10854
10906
|
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
10855
10907
|
</fo:block>
|
10856
10908
|
|
@@ -10883,6 +10935,7 @@
|
|
10883
10935
|
</xsl:template>
|
10884
10936
|
|
10885
10937
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
10938
|
+
<xsl:call-template name="setNamedDestination"/>
|
10886
10939
|
<fo:block id="{@id}">
|
10887
10940
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
10888
10941
|
</fo:block>
|
@@ -10896,6 +10949,7 @@
|
|
10896
10949
|
</xsl:template>
|
10897
10950
|
|
10898
10951
|
<!-- SOURCE: ... -->
|
10952
|
+
<!-- figure/source -->
|
10899
10953
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
|
10900
10954
|
|
10901
10955
|
<xsl:call-template name="termsource"/>
|
@@ -11821,6 +11875,13 @@
|
|
11821
11875
|
<xsl:apply-templates select="."/>
|
11822
11876
|
</xsl:template>
|
11823
11877
|
|
11878
|
+
<!-- prevent missing stem for table and figures in ToC -->
|
11879
|
+
<xsl:template match="*[local-name() = 'name' or local-name() = 'fmt-name']//*[local-name() = 'stem']" mode="contents">
|
11880
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'fmt-stem'])">
|
11881
|
+
<xsl:apply-templates select="."/>
|
11882
|
+
</xsl:if>
|
11883
|
+
</xsl:template>
|
11884
|
+
|
11824
11885
|
<xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/>
|
11825
11886
|
|
11826
11887
|
<xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/>
|
@@ -12044,7 +12105,8 @@
|
|
12044
12105
|
|
12045
12106
|
<xsl:for-each select="$contents_nodes//tables/table">
|
12046
12107
|
<fo:bookmark internal-destination="{@id}">
|
12047
|
-
<fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
|
12108
|
+
<!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
|
12109
|
+
<fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
|
12048
12110
|
</fo:bookmark>
|
12049
12111
|
</xsl:for-each>
|
12050
12112
|
</fo:bookmark>
|
@@ -12053,6 +12115,26 @@
|
|
12053
12115
|
</xsl:template> <!-- insertTableBookmarks -->
|
12054
12116
|
<!-- End Bookmarks -->
|
12055
12117
|
|
12118
|
+
<!-- ============================ -->
|
12119
|
+
<!-- mode="bookmark_clean" -->
|
12120
|
+
<!-- ============================ -->
|
12121
|
+
<xsl:template match="node()" mode="bookmark_clean">
|
12122
|
+
<xsl:apply-templates select="node()" mode="bookmark_clean"/>
|
12123
|
+
</xsl:template>
|
12124
|
+
|
12125
|
+
<xsl:template match="text()" mode="bookmark_clean">
|
12126
|
+
<xsl:value-of select="."/>
|
12127
|
+
</xsl:template>
|
12128
|
+
|
12129
|
+
<xsl:template match="*[local-name() = 'math']" mode="bookmark_clean">
|
12130
|
+
<xsl:value-of select="normalize-space(.)"/>
|
12131
|
+
</xsl:template>
|
12132
|
+
|
12133
|
+
<xsl:template match="*[local-name() = 'asciimath']" mode="bookmark_clean"/>
|
12134
|
+
<!-- ============================ -->
|
12135
|
+
<!-- END: mode="bookmark_clean" -->
|
12136
|
+
<!-- ============================ -->
|
12137
|
+
|
12056
12138
|
<xsl:template name="getLangVersion">
|
12057
12139
|
<xsl:param name="lang"/>
|
12058
12140
|
<xsl:param name="doctype" select="''"/>
|
@@ -12100,6 +12182,7 @@
|
|
12100
12182
|
<xsl:template match="title" mode="bookmark"/>
|
12101
12183
|
<xsl:template match="text()" mode="bookmark"/>
|
12102
12184
|
|
12185
|
+
<!-- figure/name -->
|
12103
12186
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
|
12104
12187
|
<xsl:if test="normalize-space() != ''">
|
12105
12188
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
@@ -12814,6 +12897,7 @@
|
|
12814
12897
|
<!-- permission -->
|
12815
12898
|
<!-- ========== -->
|
12816
12899
|
<xsl:template match="*[local-name() = 'permission']">
|
12900
|
+
<xsl:call-template name="setNamedDestination"/>
|
12817
12901
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
12818
12902
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
12819
12903
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -12822,10 +12906,12 @@
|
|
12822
12906
|
|
12823
12907
|
<xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
|
12824
12908
|
<xsl:if test="normalize-space() != ''">
|
12825
|
-
<fo:block xsl:use-attribute-sets="permission-name-style">
|
12826
|
-
<xsl:apply-templates/>
|
12827
12909
|
|
12828
|
-
|
12910
|
+
<fo:block xsl:use-attribute-sets="permission-name-style">
|
12911
|
+
<xsl:apply-templates/>
|
12912
|
+
|
12913
|
+
</fo:block>
|
12914
|
+
|
12829
12915
|
</xsl:if>
|
12830
12916
|
</xsl:template>
|
12831
12917
|
|
@@ -12841,6 +12927,7 @@
|
|
12841
12927
|
<!-- requirement -->
|
12842
12928
|
<!-- ========== -->
|
12843
12929
|
<xsl:template match="*[local-name() = 'requirement']">
|
12930
|
+
<xsl:call-template name="setNamedDestination"/>
|
12844
12931
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
12845
12932
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
12846
12933
|
<xsl:apply-templates select="*[local-name()='label']"/>
|
@@ -12852,11 +12939,13 @@
|
|
12852
12939
|
|
12853
12940
|
<xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
|
12854
12941
|
<xsl:if test="normalize-space() != ''">
|
12855
|
-
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
12856
12942
|
|
12857
|
-
|
12943
|
+
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
12944
|
+
|
12945
|
+
<xsl:apply-templates/>
|
12946
|
+
|
12947
|
+
</fo:block>
|
12858
12948
|
|
12859
|
-
</fo:block>
|
12860
12949
|
</xsl:if>
|
12861
12950
|
</xsl:template>
|
12862
12951
|
|
@@ -12885,6 +12974,7 @@
|
|
12885
12974
|
<!-- recommendation -->
|
12886
12975
|
<!-- ========== -->
|
12887
12976
|
<xsl:template match="*[local-name() = 'recommendation']">
|
12977
|
+
<xsl:call-template name="setNamedDestination"/>
|
12888
12978
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
12889
12979
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
12890
12980
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -12893,10 +12983,12 @@
|
|
12893
12983
|
|
12894
12984
|
<xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
|
12895
12985
|
<xsl:if test="normalize-space() != ''">
|
12896
|
-
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
12897
|
-
<xsl:apply-templates/>
|
12898
12986
|
|
12899
|
-
|
12987
|
+
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
12988
|
+
<xsl:apply-templates/>
|
12989
|
+
|
12990
|
+
</fo:block>
|
12991
|
+
|
12900
12992
|
</xsl:if>
|
12901
12993
|
</xsl:template>
|
12902
12994
|
|
@@ -12975,6 +13067,7 @@
|
|
12975
13067
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
12976
13068
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
12977
13069
|
</xsl:if>
|
13070
|
+
<xsl:call-template name="setNamedDestination"/>
|
12978
13071
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
12979
13072
|
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
12980
13073
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -13084,6 +13177,7 @@
|
|
13084
13177
|
<!-- termexample -->
|
13085
13178
|
<!-- ====== -->
|
13086
13179
|
<xsl:template match="*[local-name() = 'termexample']">
|
13180
|
+
<xsl:call-template name="setNamedDestination"/>
|
13087
13181
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
13088
13182
|
<xsl:call-template name="refine_termexample-style"/>
|
13089
13183
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -13142,6 +13236,7 @@
|
|
13142
13236
|
-->
|
13143
13237
|
<xsl:template match="*[local-name() = 'example']" name="example">
|
13144
13238
|
|
13239
|
+
<xsl:call-template name="setNamedDestination"/>
|
13145
13240
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
13146
13241
|
|
13147
13242
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -13654,8 +13749,13 @@
|
|
13654
13749
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
13655
13750
|
|
13656
13751
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
13752
|
+
|
13657
13753
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
13658
13754
|
|
13755
|
+
<xsl:for-each select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"><!-- change context -->
|
13756
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
13757
|
+
</xsl:for-each>
|
13758
|
+
|
13659
13759
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
13660
13760
|
</fo:block>
|
13661
13761
|
</xsl:if>
|
@@ -13775,6 +13875,7 @@
|
|
13775
13875
|
<!-- main sections -->
|
13776
13876
|
<xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
13777
13877
|
|
13878
|
+
<xsl:call-template name="setNamedDestination"/>
|
13778
13879
|
<fo:block>
|
13779
13880
|
<xsl:call-template name="setId"/>
|
13780
13881
|
|
@@ -13815,6 +13916,7 @@
|
|
13815
13916
|
|
13816
13917
|
<fo:block break-after="page"/>
|
13817
13918
|
|
13919
|
+
<xsl:call-template name="setNamedDestination"/>
|
13818
13920
|
<fo:block>
|
13819
13921
|
<xsl:call-template name="setId"/>
|
13820
13922
|
<xsl:call-template name="addReviewHelper"/>
|
@@ -13843,6 +13945,7 @@
|
|
13843
13945
|
</xsl:template>
|
13844
13946
|
|
13845
13947
|
<xsl:template match="*[local-name() = 'clause'][normalize-space() != '' or *[local-name() = 'figure'] or @id]" name="template_clause"> <!-- if clause isn't empty -->
|
13948
|
+
<xsl:call-template name="setNamedDestination"/>
|
13846
13949
|
<fo:block>
|
13847
13950
|
<xsl:if test="parent::*[local-name() = 'copyright-statement']">
|
13848
13951
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
@@ -13865,6 +13968,7 @@
|
|
13865
13968
|
</xsl:template> <!-- refine_clause_style -->
|
13866
13969
|
|
13867
13970
|
<xsl:template match="*[local-name() = 'definitions']">
|
13971
|
+
<xsl:call-template name="setNamedDestination"/>
|
13868
13972
|
<fo:block id="{@id}">
|
13869
13973
|
<xsl:apply-templates/>
|
13870
13974
|
</fo:block>
|
@@ -13880,6 +13984,8 @@
|
|
13880
13984
|
<xsl:otherwise>
|
13881
13985
|
|
13882
13986
|
<fo:block break-after="page"/>
|
13987
|
+
<xsl:call-template name="setNamedDestination"/>
|
13988
|
+
|
13883
13989
|
<fo:block id="{@id}">
|
13884
13990
|
|
13885
13991
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -13951,6 +14057,7 @@
|
|
13951
14057
|
<!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
|
13952
14058
|
following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
|
13953
14059
|
<!-- <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> -->
|
14060
|
+
<xsl:call-template name="setNamedDestination"/>
|
13954
14061
|
<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>
|
13955
14062
|
<!-- </xsl:if> -->
|
13956
14063
|
</xsl:if>
|
@@ -14061,9 +14168,15 @@
|
|
14061
14168
|
<xsl:when test="local-name(..) = 'ul'">
|
14062
14169
|
<xsl:choose>
|
14063
14170
|
<xsl:when test="normalize-space($processing_instruction_type) = 'simple'"/>
|
14171
|
+
<!-- https://github.com/metanorma/isodoc/issues/675 -->
|
14172
|
+
<xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when>
|
14064
14173
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
14065
14174
|
</xsl:choose>
|
14066
14175
|
</xsl:when>
|
14176
|
+
<!-- https://github.com/metanorma/isodoc/issues/675 -->
|
14177
|
+
<xsl:when test="local-name(..) = 'ol' and @label and @full = 'true'"> <!-- @full added in the template li/fmt-name -->
|
14178
|
+
<xsl:value-of select="@label"/>
|
14179
|
+
</xsl:when>
|
14067
14180
|
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
14068
14181
|
|
14069
14182
|
<xsl:variable name="type" select="../@type"/>
|
@@ -14188,7 +14301,7 @@
|
|
14188
14301
|
|
14189
14302
|
</xsl:otherwise>
|
14190
14303
|
</xsl:choose>
|
14191
|
-
</xsl:template>
|
14304
|
+
</xsl:template> <!-- getListItemFormat -->
|
14192
14305
|
|
14193
14306
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
14194
14307
|
<xsl:param name="indent">0</xsl:param>
|
@@ -14320,6 +14433,11 @@
|
|
14320
14433
|
|
14321
14434
|
<xsl:call-template name="refine_list-item-label-style"/>
|
14322
14435
|
|
14436
|
+
<xsl:if test="local-name(..) = 'ul'">
|
14437
|
+
<xsl:variable name="li_label" select="@label"/>
|
14438
|
+
<xsl:copy-of select="$ul_labels//label[. = $li_label]/@*[not(local-name() = 'level')]"/>
|
14439
|
+
</xsl:if>
|
14440
|
+
|
14323
14441
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
14324
14442
|
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
14325
14443
|
<xsl:call-template name="append_add-style"/>
|
@@ -14666,6 +14784,7 @@
|
|
14666
14784
|
<!-- Normative references -->
|
14667
14785
|
<xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
|
14668
14786
|
|
14787
|
+
<xsl:call-template name="setNamedDestination"/>
|
14669
14788
|
<fo:block id="{@id}">
|
14670
14789
|
<xsl:apply-templates/>
|
14671
14790
|
|
@@ -14684,6 +14803,7 @@
|
|
14684
14803
|
</xsl:if>
|
14685
14804
|
</xsl:if> -->
|
14686
14805
|
|
14806
|
+
<xsl:call-template name="setNamedDestination"/>
|
14687
14807
|
<fo:block id="{@id}"/>
|
14688
14808
|
|
14689
14809
|
<xsl:apply-templates select="*[local-name() = 'title'][@columns = 1]"/>
|
@@ -14703,6 +14823,7 @@
|
|
14703
14823
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
14704
14824
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
14705
14825
|
|
14826
|
+
<xsl:call-template name="setNamedDestination"/>
|
14706
14827
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
14707
14828
|
|
14708
14829
|
<xsl:call-template name="processBibitem"/>
|
@@ -14716,6 +14837,7 @@
|
|
14716
14837
|
<!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
14717
14838
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
14718
14839
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
14840
|
+
<xsl:call-template name="setNamedDestination"/>
|
14719
14841
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
14720
14842
|
|
14721
14843
|
<xsl:variable name="bibitem_label">
|
@@ -14758,6 +14880,7 @@
|
|
14758
14880
|
<xsl:choose>
|
14759
14881
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
14760
14882
|
<xsl:otherwise>
|
14883
|
+
<xsl:call-template name="setNamedDestination"/>
|
14761
14884
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
14762
14885
|
|
14763
14886
|
<fo:list-item-label end-indent="label-end()">
|
@@ -15157,6 +15280,7 @@
|
|
15157
15280
|
<xsl:template match="*[local-name() = 'admonition']">
|
15158
15281
|
|
15159
15282
|
<!-- text in the box -->
|
15283
|
+
<xsl:call-template name="setNamedDestination"/>
|
15160
15284
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
15161
15285
|
|
15162
15286
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -15446,7 +15570,7 @@
|
|
15446
15570
|
</xsl:template>
|
15447
15571
|
|
15448
15572
|
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
15449
|
-
<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">
|
15573
|
+
<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">
|
15450
15574
|
<xsl:copy>
|
15451
15575
|
<xsl:copy-of select="@*"/>
|
15452
15576
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -15478,28 +15602,56 @@
|
|
15478
15602
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
15479
15603
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
15480
15604
|
|
15481
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
15605
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_step1">
|
15482
15606
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
15483
15607
|
<xsl:copy-of select="@*"/>
|
15484
15608
|
<xsl:choose>
|
15485
15609
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
15486
|
-
<xsl:
|
15610
|
+
<xsl:choose>
|
15611
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
15612
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
15613
|
+
</xsl:when>
|
15614
|
+
<xsl:otherwise>
|
15615
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_step1"/>
|
15616
|
+
</xsl:otherwise>
|
15617
|
+
</xsl:choose>
|
15487
15618
|
</xsl:when>
|
15488
15619
|
<xsl:otherwise>
|
15489
|
-
<xsl:
|
15620
|
+
<xsl:choose>
|
15621
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
15622
|
+
<xsl:copy-of select="node()"/>
|
15623
|
+
</xsl:when>
|
15624
|
+
<xsl:otherwise>
|
15625
|
+
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
15626
|
+
</xsl:otherwise>
|
15627
|
+
</xsl:choose>
|
15490
15628
|
</xsl:otherwise>
|
15491
15629
|
</xsl:choose>
|
15492
15630
|
</xsl:element>
|
15493
15631
|
</xsl:template>
|
15494
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
15632
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_pres">
|
15495
15633
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
15496
15634
|
<xsl:copy-of select="@*"/>
|
15497
15635
|
<xsl:choose>
|
15498
15636
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
15499
|
-
<xsl:
|
15637
|
+
<xsl:choose>
|
15638
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
15639
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
15640
|
+
</xsl:when>
|
15641
|
+
<xsl:otherwise>
|
15642
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_pres"/>
|
15643
|
+
</xsl:otherwise>
|
15644
|
+
</xsl:choose>
|
15500
15645
|
</xsl:when>
|
15501
15646
|
<xsl:otherwise>
|
15502
|
-
<xsl:
|
15647
|
+
<xsl:choose>
|
15648
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
15649
|
+
<xsl:copy-of select="node()"/>
|
15650
|
+
</xsl:when>
|
15651
|
+
<xsl:otherwise>
|
15652
|
+
<xsl:apply-templates select="node()" mode="update_xml_pres"/>
|
15653
|
+
</xsl:otherwise>
|
15654
|
+
</xsl:choose>
|
15503
15655
|
</xsl:otherwise>
|
15504
15656
|
</xsl:choose>
|
15505
15657
|
</xsl:element>
|
@@ -15728,16 +15880,24 @@
|
|
15728
15880
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_step1">
|
15729
15881
|
<xsl:element name="title" namespace="{$namespace_full}">
|
15730
15882
|
<xsl:copy-of select="@*"/>
|
15883
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
15884
|
+
|
15731
15885
|
<xsl:apply-templates mode="update_xml_step1"/>
|
15732
15886
|
</xsl:element>
|
15733
15887
|
</xsl:template>
|
15734
15888
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_pres">
|
15735
15889
|
<xsl:element name="title" namespace="{$namespace_full}">
|
15736
15890
|
<xsl:copy-of select="@*"/>
|
15891
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
15892
|
+
|
15737
15893
|
<xsl:apply-templates mode="update_xml_pres"/>
|
15738
15894
|
</xsl:element>
|
15739
15895
|
</xsl:template>
|
15740
15896
|
|
15897
|
+
<xsl:template name="addNamedDestinationAttribute">
|
15898
|
+
|
15899
|
+
</xsl:template>
|
15900
|
+
|
15741
15901
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
15742
15902
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
15743
15903
|
<xsl:choose>
|
@@ -15747,6 +15907,8 @@
|
|
15747
15907
|
<xsl:otherwise>
|
15748
15908
|
<xsl:element name="name" namespace="{$namespace_full}">
|
15749
15909
|
<xsl:copy-of select="@*"/>
|
15910
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
15911
|
+
|
15750
15912
|
<xsl:apply-templates mode="update_xml_step1"/>
|
15751
15913
|
</xsl:element>
|
15752
15914
|
</xsl:otherwise>
|
@@ -15760,12 +15922,24 @@
|
|
15760
15922
|
<xsl:otherwise>
|
15761
15923
|
<xsl:element name="name" namespace="{$namespace_full}">
|
15762
15924
|
<xsl:copy-of select="@*"/>
|
15925
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
15926
|
+
|
15763
15927
|
<xsl:apply-templates mode="update_xml_pres"/>
|
15764
15928
|
</xsl:element>
|
15765
15929
|
</xsl:otherwise>
|
15766
15930
|
</xsl:choose>
|
15767
15931
|
</xsl:template>
|
15768
15932
|
|
15933
|
+
<!-- li/fmt-name -->
|
15934
|
+
<xsl:template match="*[local-name() = 'li']/*[local-name() = 'fmt-name']" priority="2" mode="update_xml_step1">
|
15935
|
+
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
15936
|
+
<xsl:attribute name="full">true</xsl:attribute>
|
15937
|
+
</xsl:template>
|
15938
|
+
<xsl:template match="*[local-name() = 'li']/*[local-name() = 'fmt-name']" priority="2" mode="update_xml_pres">
|
15939
|
+
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
15940
|
+
<xsl:attribute name="full">true</xsl:attribute>
|
15941
|
+
</xsl:template>
|
15942
|
+
|
15769
15943
|
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
15770
15944
|
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
|
15771
15945
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -16684,6 +16858,64 @@
|
|
16684
16858
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
16685
16859
|
</xsl:template>
|
16686
16860
|
|
16861
|
+
<!-- ===================================== -->
|
16862
|
+
<!-- ===================================== -->
|
16863
|
+
<!-- Ruby text (CJK languages) rendering -->
|
16864
|
+
<!-- ===================================== -->
|
16865
|
+
<!-- ===================================== -->
|
16866
|
+
<xsl:template match="*[local-name() = 'ruby']">
|
16867
|
+
<fo:inline-container text-indent="0mm" last-line-end-indent="0mm">
|
16868
|
+
<xsl:if test="not(ancestor::*[local-name() = 'ruby'])">
|
16869
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
16870
|
+
</xsl:if>
|
16871
|
+
<xsl:variable name="rt_text" select="*[local-name() = 'rt']"/>
|
16872
|
+
<xsl:variable name="rb_text" select=".//*[local-name() = 'rb'][not(*[local-name() = 'ruby'])]"/>
|
16873
|
+
<!-- Example: width="2em" -->
|
16874
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
16875
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
16876
|
+
<xsl:variable name="text_width">
|
16877
|
+
<xsl:choose>
|
16878
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
16879
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
16880
|
+
</xsl:choose>
|
16881
|
+
</xsl:variable>
|
16882
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
16883
|
+
|
16884
|
+
<xsl:choose>
|
16885
|
+
<xsl:when test="ancestor::*[local-name() = 'ruby']">
|
16886
|
+
<xsl:apply-templates select="*[local-name() = 'rb']"/>
|
16887
|
+
<xsl:apply-templates select="*[local-name() = 'rt']"/>
|
16888
|
+
</xsl:when>
|
16889
|
+
<xsl:otherwise>
|
16890
|
+
<xsl:apply-templates select="*[local-name() = 'rt']"/>
|
16891
|
+
<xsl:apply-templates select="*[local-name() = 'rb']"/>
|
16892
|
+
</xsl:otherwise>
|
16893
|
+
</xsl:choose>
|
16894
|
+
|
16895
|
+
<xsl:apply-templates select="node()[not(local-name() = 'rt') and not(local-name() = 'rb')]"/>
|
16896
|
+
</fo:inline-container>
|
16897
|
+
</xsl:template>
|
16898
|
+
|
16899
|
+
<xsl:template match="*[local-name() = 'rb']">
|
16900
|
+
<fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
|
16901
|
+
</xsl:template>
|
16902
|
+
|
16903
|
+
<xsl:template match="*[local-name() = 'rt']">
|
16904
|
+
<fo:block font-size="0.5em" text-align="center" line-height="1.2em" space-before="-1.4em" space-before.conditionality="retain"> <!-- -->
|
16905
|
+
<xsl:if test="ancestor::*[local-name() = 'ruby'][last()]//*[local-name() = 'ruby'] or ancestor::*[local-name() = 'rb']">
|
16906
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
16907
|
+
</xsl:if>
|
16908
|
+
<xsl:apply-templates/>
|
16909
|
+
</fo:block>
|
16910
|
+
|
16911
|
+
</xsl:template>
|
16912
|
+
|
16913
|
+
<!-- ===================================== -->
|
16914
|
+
<!-- ===================================== -->
|
16915
|
+
<!-- END: Ruby text (CJK languages) rendering -->
|
16916
|
+
<!-- ===================================== -->
|
16917
|
+
<!-- ===================================== -->
|
16918
|
+
|
16687
16919
|
<xsl:template name="printEdition">
|
16688
16920
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
16689
16921
|
|
@@ -17251,6 +17483,24 @@
|
|
17251
17483
|
</xsl:attribute>
|
17252
17484
|
</xsl:template>
|
17253
17485
|
|
17486
|
+
<xsl:template name="setIDforNamedDestination">
|
17487
|
+
<xsl:if test="@named_dest">
|
17488
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
17489
|
+
</xsl:if>
|
17490
|
+
</xsl:template>
|
17491
|
+
|
17492
|
+
<xsl:template name="setNamedDestination">
|
17493
|
+
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
17494
|
+
<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'">
|
17495
|
+
<fox:destination internal-destination="{@id}"/>
|
17496
|
+
</xsl:if>
|
17497
|
+
<xsl:for-each select=". | *[local-name() = 'title'] | *[local-name() = 'name']">
|
17498
|
+
<xsl:if test="@named_dest">
|
17499
|
+
<fox:destination internal-destination="{@named_dest}"/>
|
17500
|
+
</xsl:if>
|
17501
|
+
</xsl:for-each>
|
17502
|
+
</xsl:template>
|
17503
|
+
|
17254
17504
|
<xsl:template name="add-letter-spacing">
|
17255
17505
|
<xsl:param name="text"/>
|
17256
17506
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|