metanorma-bipm 2.8.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/bipm/bipm.brochure.xsl +156 -14
- data/lib/isodoc/bipm/bipm.guide.xsl +156 -14
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +156 -14
- data/lib/isodoc/bipm/bipm.rapport.xsl +156 -14
- data/lib/isodoc/bipm/html/htmlstyle.css +13 -9
- data/lib/isodoc/bipm/html/htmlstyle.scss +10 -6
- data/lib/isodoc/bipm/jcgm.standard.xsl +150 -13
- data/lib/metanorma/bipm/basicdoc.rng +5 -1
- data/lib/metanorma/bipm/cleanup.rb +5 -1
- data/lib/metanorma/bipm/converter.rb +2 -4
- data/lib/metanorma/bipm/validate.rb +1 -1
- data/lib/metanorma/bipm/version.rb +1 -1
- data/lib/metanorma/bipm.rb +5 -2
- data/metanorma-bipm.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c19d03a9129bf06e2f40d1f3ad9f04329a7998fa93a0e0d1d7c1cf868ce757b1
|
|
4
|
+
data.tar.gz: '04639d86b292cdca3e6bff19e6a483f61d8cd06716da5076226e55b7cca38213'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0c76364721912ff29ac04abecb60b76f9f8585a52ddbfe5d9e6bcf4e1ac849e9c40207cf83f504273d59838fe3c89090aff8f88ee3edec2016f2d081bf7ed7c
|
|
7
|
+
data.tar.gz: 5701338ac4a163f068c1304ff70c770c8b37ecdd618d046504e2edf1dd1eb4bca37c37712e7083cd1b5af836cfd822bb5e42803237dc7006502bd0da241b3f98
|
|
@@ -5224,7 +5224,23 @@
|
|
|
5224
5224
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
5225
5225
|
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
|
5226
5226
|
<xsl:attribute name="main_page_sequence"/>
|
|
5227
|
-
|
|
5227
|
+
|
|
5228
|
+
<!-- from common <xsl:template name="index-pages"> -->
|
|
5229
|
+
<xsl:variable name="docid">
|
|
5230
|
+
<xsl:call-template name="getDocumentId"/>
|
|
5231
|
+
</xsl:variable>
|
|
5232
|
+
|
|
5233
|
+
<xsl:variable name="current_document_index_id">
|
|
5234
|
+
<xsl:apply-templates select="." mode="index_add_id">
|
|
5235
|
+
<xsl:with-param name="docid" select="$docid"/>
|
|
5236
|
+
</xsl:apply-templates>
|
|
5237
|
+
</xsl:variable>
|
|
5238
|
+
<xsl:variable name="current_document_index">
|
|
5239
|
+
<xsl:apply-templates select="xalan:nodeset($current_document_index_id)" mode="index_update"/>
|
|
5240
|
+
</xsl:variable>
|
|
5241
|
+
|
|
5242
|
+
<!-- xalan:nodeset($current_document_index) -->
|
|
5243
|
+
<xsl:apply-templates select="xalan:nodeset($current_document_index)" mode="update_xml_step_move_pagebreak"/>
|
|
5228
5244
|
</xsl:element>
|
|
5229
5245
|
</xsl:for-each>
|
|
5230
5246
|
</xsl:template>
|
|
@@ -6276,6 +6292,7 @@
|
|
|
6276
6292
|
</xsl:template>
|
|
6277
6293
|
|
|
6278
6294
|
<xsl:attribute-set name="tt-style">
|
|
6295
|
+
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
|
6279
6296
|
</xsl:attribute-set>
|
|
6280
6297
|
|
|
6281
6298
|
<xsl:template name="refine_tt-style">
|
|
@@ -8043,6 +8060,11 @@
|
|
|
8043
8060
|
<!-- Display table's name before table as standalone block -->
|
|
8044
8061
|
<!-- $namespace = 'iso' or -->
|
|
8045
8062
|
<xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
|
|
8063
|
+
<xsl:if test="not(mn:fmt-name)"> <!-- for https://github.com/metanorma/mn-samples-jis/issues/75#issuecomment-3922169930 -->
|
|
8064
|
+
<xsl:apply-templates select="mn:name">
|
|
8065
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
|
8066
|
+
</xsl:apply-templates>
|
|
8067
|
+
</xsl:if>
|
|
8046
8068
|
<xsl:call-template name="table_name_fn_display"/>
|
|
8047
8069
|
|
|
8048
8070
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
|
|
@@ -8294,7 +8316,13 @@
|
|
|
8294
8316
|
</xsl:template>
|
|
8295
8317
|
|
|
8296
8318
|
<!-- table/name-->
|
|
8297
|
-
<xsl:template match="
|
|
8319
|
+
<xsl:template match="mn:table[not(mn:fmt-name)]/mn:name"> <!-- for https://github.com/metanorma/mn-samples-jis/issues/75#issuecomment-3922169930 -->
|
|
8320
|
+
<xsl:param name="process">false</xsl:param>
|
|
8321
|
+
<xsl:if test="$process = 'true'">
|
|
8322
|
+
<xsl:call-template name="table_name"/>
|
|
8323
|
+
</xsl:if>
|
|
8324
|
+
</xsl:template>
|
|
8325
|
+
<xsl:template match="*[local-name()='table']/mn:fmt-name" name="table_name">
|
|
8298
8326
|
<xsl:param name="continued"/>
|
|
8299
8327
|
<xsl:param name="cols-count"/>
|
|
8300
8328
|
<xsl:if test="normalize-space() != ''">
|
|
@@ -8757,12 +8785,14 @@
|
|
|
8757
8785
|
<xsl:param name="colwidths"/>
|
|
8758
8786
|
<xsl:param name="colgroup"/>
|
|
8759
8787
|
|
|
8760
|
-
<xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or
|
|
8788
|
+
<xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ../mn:key or (..//mn:fn[not(parent::mn:fmt-name)] and not(ancestor::mn:table[1]//mn:tfoot//mn:fmt-footnote-container)) or ../mn:fmt-source or ../mn:p"/>
|
|
8789
|
+
<!-- in JIS fmt-footnote-container renders in tfoot, so no need render fn in the separate table -->
|
|
8761
8790
|
|
|
8762
|
-
<xsl:variable name="
|
|
8791
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable_">
|
|
8763
8792
|
</xsl:variable>
|
|
8793
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable" select="normalize-space($isNoteOrFnExistShowAfterTable_)"/>
|
|
8764
8794
|
|
|
8765
|
-
<xsl:if test="$isNoteOrFnExist = 'true' or
|
|
8795
|
+
<xsl:if test="$isNoteOrFnExist = 'true' or $isNoteOrFnExistShowAfterTable = 'true'">
|
|
8766
8796
|
|
|
8767
8797
|
<xsl:variable name="cols-count">
|
|
8768
8798
|
<xsl:choose>
|
|
@@ -14405,10 +14435,22 @@
|
|
|
14405
14435
|
<!-- End Highlight syntax styles -->
|
|
14406
14436
|
|
|
14407
14437
|
<!-- Index section styles -->
|
|
14438
|
+
|
|
14439
|
+
<xsl:attribute-set name="indexsect-region-body-style">
|
|
14440
|
+
<xsl:attribute name="column-count">2</xsl:attribute>
|
|
14441
|
+
<xsl:attribute name="column-gap">10mm</xsl:attribute>
|
|
14442
|
+
</xsl:attribute-set>
|
|
14443
|
+
|
|
14444
|
+
<xsl:attribute-set name="indexsect-title-block-style">
|
|
14445
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
14446
|
+
<xsl:attribute name="span">all</xsl:attribute>
|
|
14447
|
+
</xsl:attribute-set>
|
|
14448
|
+
|
|
14408
14449
|
<xsl:attribute-set name="indexsect-title-style">
|
|
14409
14450
|
<xsl:attribute name="role">H1</xsl:attribute>
|
|
14410
|
-
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
|
14411
14451
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
14452
|
+
<xsl:attribute name="margin-bottom">24pt</xsl:attribute>
|
|
14453
|
+
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
|
14412
14454
|
<xsl:attribute name="margin-bottom">84pt</xsl:attribute>
|
|
14413
14455
|
<xsl:attribute name="margin-left">-18mm</xsl:attribute>
|
|
14414
14456
|
</xsl:attribute-set> <!-- indexsect-title-style -->
|
|
@@ -14439,6 +14481,27 @@
|
|
|
14439
14481
|
</xsl:for-each>
|
|
14440
14482
|
</xsl:variable>
|
|
14441
14483
|
|
|
14484
|
+
<xsl:template name="index-pages">
|
|
14485
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
14486
|
+
|
|
14487
|
+
<xsl:variable name="docid">
|
|
14488
|
+
<xsl:call-template name="getDocumentId"/>
|
|
14489
|
+
</xsl:variable>
|
|
14490
|
+
|
|
14491
|
+
<xsl:variable name="current_document_index_id">
|
|
14492
|
+
<xsl:apply-templates select="//mn:indexsect" mode="index_add_id">
|
|
14493
|
+
<xsl:with-param name="docid" select="$docid"/>
|
|
14494
|
+
</xsl:apply-templates>
|
|
14495
|
+
</xsl:variable>
|
|
14496
|
+
<xsl:variable name="current_document_index">
|
|
14497
|
+
<xsl:apply-templates select="xalan:nodeset($current_document_index_id)" mode="index_update"/>
|
|
14498
|
+
</xsl:variable>
|
|
14499
|
+
|
|
14500
|
+
<xsl:apply-templates select="xalan:nodeset($current_document_index)" mode="index">
|
|
14501
|
+
<xsl:with-param name="num" select="$num"/>
|
|
14502
|
+
</xsl:apply-templates>
|
|
14503
|
+
</xsl:template>
|
|
14504
|
+
|
|
14442
14505
|
<xsl:template match="@*|node()" mode="index_add_id">
|
|
14443
14506
|
<xsl:param name="docid"/>
|
|
14444
14507
|
<xsl:copy>
|
|
@@ -14491,7 +14554,7 @@
|
|
|
14491
14554
|
<xsl:template match="mn:indexsect//mn:li" mode="index_update">
|
|
14492
14555
|
<xsl:copy>
|
|
14493
14556
|
<xsl:apply-templates select="@*" mode="index_update"/>
|
|
14494
|
-
|
|
14557
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
|
|
14495
14558
|
</xsl:copy>
|
|
14496
14559
|
</xsl:template>
|
|
14497
14560
|
|
|
@@ -14699,11 +14762,24 @@
|
|
|
14699
14762
|
<!-- End of Index processing -->
|
|
14700
14763
|
<!-- =================== -->
|
|
14701
14764
|
|
|
14702
|
-
|
|
14765
|
+
<xsl:attribute-set name="form-checkbox-style">
|
|
14766
|
+
<xsl:attribute name="border">0.5pt solid black</xsl:attribute>
|
|
14767
|
+
<xsl:attribute name="background-color">yellow</xsl:attribute>
|
|
14768
|
+
</xsl:attribute-set>
|
|
14769
|
+
|
|
14770
|
+
<xsl:variable name="METANORMA_FORM_START_PREFIX">_metanorma_form_start</xsl:variable>
|
|
14771
|
+
<xsl:variable name="METANORMA_FORM_ITEM_PREFIX">_metanorma_form_item_</xsl:variable>
|
|
14772
|
+
<xsl:variable name="METANORMA_FORM_ITEM_BORDER">1pt solid black</xsl:variable>
|
|
14773
|
+
|
|
14774
|
+
<!-- =================== -->
|
|
14703
14775
|
<!-- Form's elements processing -->
|
|
14704
14776
|
<!-- =================== -->
|
|
14705
14777
|
<xsl:template match="mn:form">
|
|
14706
14778
|
<fo:block>
|
|
14779
|
+
<fo:inline>
|
|
14780
|
+
<xsl:attribute name="id"><xsl:value-of select="concat($METANORMA_FORM_START_PREFIX, '___', @id, '___', @name)"/></xsl:attribute>
|
|
14781
|
+
<xsl:value-of select="$hair_space"/>
|
|
14782
|
+
</fo:inline>
|
|
14707
14783
|
<xsl:apply-templates/>
|
|
14708
14784
|
</fo:block>
|
|
14709
14785
|
</xsl:template>
|
|
@@ -14712,7 +14788,23 @@
|
|
|
14712
14788
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
14713
14789
|
</xsl:template>
|
|
14714
14790
|
|
|
14715
|
-
<xsl:template match="mn:form//mn:input[@type = 'text'
|
|
14791
|
+
<xsl:template match="mn:form//mn:input[@type = 'text']">
|
|
14792
|
+
<!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
|
|
14793
|
+
<fo:inline>
|
|
14794
|
+
<xsl:call-template name="set_id_metanorma_form_item">
|
|
14795
|
+
<xsl:with-param name="add_border_prefix">true</xsl:with-param>
|
|
14796
|
+
</xsl:call-template>
|
|
14797
|
+
<xsl:value-of select="$hair_space"/>
|
|
14798
|
+
</fo:inline>
|
|
14799
|
+
<fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove, this border needs for mn2pdf FOPIFFormsHandler -->
|
|
14800
|
+
<fo:inline>
|
|
14801
|
+
<xsl:call-template name="set_id_metanorma_form_item"/>
|
|
14802
|
+
<xsl:call-template name="text_input"/>
|
|
14803
|
+
</fo:inline>
|
|
14804
|
+
</fo:inline>
|
|
14805
|
+
</xsl:template>
|
|
14806
|
+
|
|
14807
|
+
<xsl:template match="mn:form//mn:input[@type = 'date' or @type = 'file' or @type = 'password']">
|
|
14716
14808
|
<fo:inline>
|
|
14717
14809
|
<xsl:call-template name="text_input"/>
|
|
14718
14810
|
</fo:inline>
|
|
@@ -14744,7 +14836,20 @@
|
|
|
14744
14836
|
</xsl:template>
|
|
14745
14837
|
|
|
14746
14838
|
<xsl:template match="mn:form//mn:input[@type = 'checkbox']">
|
|
14747
|
-
<
|
|
14839
|
+
<xsl:variable name="form_item_type">checkbox</xsl:variable>
|
|
14840
|
+
<!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
|
|
14841
|
+
<fo:inline>
|
|
14842
|
+
<xsl:call-template name="set_id_metanorma_form_item">
|
|
14843
|
+
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
14844
|
+
<xsl:with-param name="add_border_prefix">true</xsl:with-param>
|
|
14845
|
+
</xsl:call-template>
|
|
14846
|
+
<xsl:value-of select="$hair_space"/>
|
|
14847
|
+
</fo:inline>
|
|
14848
|
+
|
|
14849
|
+
<fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove 'border', this border needs for mn2pdf FOPIFFormsHandler -->
|
|
14850
|
+
<xsl:call-template name="set_id_metanorma_form_item">
|
|
14851
|
+
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
14852
|
+
</xsl:call-template>
|
|
14748
14853
|
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
|
14749
14854
|
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
|
14750
14855
|
<xsl:attribute name="content-width">100%</xsl:attribute>
|
|
@@ -14754,11 +14859,24 @@
|
|
|
14754
14859
|
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
|
14755
14860
|
</svg>
|
|
14756
14861
|
</fo:instream-foreign-object>
|
|
14757
|
-
</fo:inline>
|
|
14862
|
+
</fo:inline><fo:inline padding-right="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
|
14758
14863
|
</xsl:template>
|
|
14759
14864
|
|
|
14760
14865
|
<xsl:template match="mn:form//mn:input[@type = 'radio']">
|
|
14761
|
-
<
|
|
14866
|
+
<xsl:variable name="form_item_type">radiobutton</xsl:variable>
|
|
14867
|
+
<!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
|
|
14868
|
+
<fo:inline>
|
|
14869
|
+
<xsl:call-template name="set_id_metanorma_form_item">
|
|
14870
|
+
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
14871
|
+
<xsl:with-param name="add_border_prefix">true</xsl:with-param>
|
|
14872
|
+
</xsl:call-template>
|
|
14873
|
+
<xsl:value-of select="$hair_space"/>
|
|
14874
|
+
</fo:inline>
|
|
14875
|
+
|
|
14876
|
+
<fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove 'border', this border needs for mn2pdf FOPIFFormsHandler -->
|
|
14877
|
+
<xsl:call-template name="set_id_metanorma_form_item">
|
|
14878
|
+
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
14879
|
+
</xsl:call-template>
|
|
14762
14880
|
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
|
14763
14881
|
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
|
14764
14882
|
<xsl:attribute name="content-width">100%</xsl:attribute>
|
|
@@ -14770,6 +14888,7 @@
|
|
|
14770
14888
|
</svg>
|
|
14771
14889
|
</fo:instream-foreign-object>
|
|
14772
14890
|
</fo:inline>
|
|
14891
|
+
<fo:inline padding-right="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
|
14773
14892
|
</xsl:template>
|
|
14774
14893
|
|
|
14775
14894
|
<xsl:template match="mn:form//mn:select">
|
|
@@ -14779,11 +14898,28 @@
|
|
|
14779
14898
|
</xsl:template>
|
|
14780
14899
|
|
|
14781
14900
|
<xsl:template match="mn:form//mn:textarea">
|
|
14782
|
-
<fo:block-container border="
|
|
14901
|
+
<fo:block-container border="{$METANORMA_FORM_ITEM_BORDER}" width="50%">
|
|
14783
14902
|
<fo:block> </fo:block>
|
|
14784
14903
|
</fo:block-container>
|
|
14785
14904
|
</xsl:template>
|
|
14786
14905
|
|
|
14906
|
+
<xsl:template name="set_id_metanorma_form_item">
|
|
14907
|
+
<xsl:param name="form_item_type">textfield</xsl:param>
|
|
14908
|
+
<xsl:param name="add_border_prefix">false</xsl:param>
|
|
14909
|
+
<xsl:variable name="border_prefix"><xsl:if test="normalize-space($add_border_prefix) = 'true'">border_</xsl:if></xsl:variable>
|
|
14910
|
+
<xsl:if test="@id">
|
|
14911
|
+
<!-- _metanorma_form_item_border____form_item_type___id___name___value -->
|
|
14912
|
+
<!-- split by '___': [2] - form_item_type, [3] - id, [4] - name, [5] - value -->
|
|
14913
|
+
<xsl:variable name="value">
|
|
14914
|
+
<xsl:choose>
|
|
14915
|
+
<xsl:when test="@type = 'checkbox'"><xsl:value-of select="normalize-space(@checked = 'true')"/><!-- true or false --></xsl:when>
|
|
14916
|
+
<xsl:otherwise><xsl:value-of select="@value"/></xsl:otherwise>
|
|
14917
|
+
</xsl:choose>
|
|
14918
|
+
</xsl:variable>
|
|
14919
|
+
<xsl:attribute name="id"><xsl:value-of select="concat($METANORMA_FORM_ITEM_PREFIX, $border_prefix, '___', $form_item_type, '___', @id, '___', @name, '___', $value)"/></xsl:attribute>
|
|
14920
|
+
</xsl:if>
|
|
14921
|
+
</xsl:template>
|
|
14922
|
+
|
|
14787
14923
|
<!-- =================== -->
|
|
14788
14924
|
<!-- End Form's elements processing -->
|
|
14789
14925
|
<!-- =================== -->
|
|
@@ -14864,6 +15000,7 @@
|
|
|
14864
15000
|
</xsl:template>
|
|
14865
15001
|
|
|
14866
15002
|
<xsl:attribute-set name="toc-pagenumber-style">
|
|
15003
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
14867
15004
|
<xsl:attribute name="font-family">Arial</xsl:attribute>
|
|
14868
15005
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
14869
15006
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
@@ -16768,7 +16905,12 @@
|
|
|
16768
16905
|
<xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
|
|
16769
16906
|
<xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
|
|
16770
16907
|
<xsl:choose>
|
|
16771
|
-
<xsl:when test="$
|
|
16908
|
+
<xsl:when test="$internal-destination = 'true'">
|
|
16909
|
+
<fo:wrapper role="Reference">
|
|
16910
|
+
<xsl:copy-of select="$element_node"/>
|
|
16911
|
+
</fo:wrapper>
|
|
16912
|
+
</xsl:when>
|
|
16913
|
+
<xsl:when test="$external-destination = 'true'">
|
|
16772
16914
|
<xsl:copy-of select="$element_node"/>
|
|
16773
16915
|
</xsl:when>
|
|
16774
16916
|
<xsl:otherwise>
|
|
@@ -5224,7 +5224,23 @@
|
|
|
5224
5224
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
5225
5225
|
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
|
5226
5226
|
<xsl:attribute name="main_page_sequence"/>
|
|
5227
|
-
|
|
5227
|
+
|
|
5228
|
+
<!-- from common <xsl:template name="index-pages"> -->
|
|
5229
|
+
<xsl:variable name="docid">
|
|
5230
|
+
<xsl:call-template name="getDocumentId"/>
|
|
5231
|
+
</xsl:variable>
|
|
5232
|
+
|
|
5233
|
+
<xsl:variable name="current_document_index_id">
|
|
5234
|
+
<xsl:apply-templates select="." mode="index_add_id">
|
|
5235
|
+
<xsl:with-param name="docid" select="$docid"/>
|
|
5236
|
+
</xsl:apply-templates>
|
|
5237
|
+
</xsl:variable>
|
|
5238
|
+
<xsl:variable name="current_document_index">
|
|
5239
|
+
<xsl:apply-templates select="xalan:nodeset($current_document_index_id)" mode="index_update"/>
|
|
5240
|
+
</xsl:variable>
|
|
5241
|
+
|
|
5242
|
+
<!-- xalan:nodeset($current_document_index) -->
|
|
5243
|
+
<xsl:apply-templates select="xalan:nodeset($current_document_index)" mode="update_xml_step_move_pagebreak"/>
|
|
5228
5244
|
</xsl:element>
|
|
5229
5245
|
</xsl:for-each>
|
|
5230
5246
|
</xsl:template>
|
|
@@ -6276,6 +6292,7 @@
|
|
|
6276
6292
|
</xsl:template>
|
|
6277
6293
|
|
|
6278
6294
|
<xsl:attribute-set name="tt-style">
|
|
6295
|
+
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
|
6279
6296
|
</xsl:attribute-set>
|
|
6280
6297
|
|
|
6281
6298
|
<xsl:template name="refine_tt-style">
|
|
@@ -8043,6 +8060,11 @@
|
|
|
8043
8060
|
<!-- Display table's name before table as standalone block -->
|
|
8044
8061
|
<!-- $namespace = 'iso' or -->
|
|
8045
8062
|
<xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
|
|
8063
|
+
<xsl:if test="not(mn:fmt-name)"> <!-- for https://github.com/metanorma/mn-samples-jis/issues/75#issuecomment-3922169930 -->
|
|
8064
|
+
<xsl:apply-templates select="mn:name">
|
|
8065
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
|
8066
|
+
</xsl:apply-templates>
|
|
8067
|
+
</xsl:if>
|
|
8046
8068
|
<xsl:call-template name="table_name_fn_display"/>
|
|
8047
8069
|
|
|
8048
8070
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
|
|
@@ -8294,7 +8316,13 @@
|
|
|
8294
8316
|
</xsl:template>
|
|
8295
8317
|
|
|
8296
8318
|
<!-- table/name-->
|
|
8297
|
-
<xsl:template match="
|
|
8319
|
+
<xsl:template match="mn:table[not(mn:fmt-name)]/mn:name"> <!-- for https://github.com/metanorma/mn-samples-jis/issues/75#issuecomment-3922169930 -->
|
|
8320
|
+
<xsl:param name="process">false</xsl:param>
|
|
8321
|
+
<xsl:if test="$process = 'true'">
|
|
8322
|
+
<xsl:call-template name="table_name"/>
|
|
8323
|
+
</xsl:if>
|
|
8324
|
+
</xsl:template>
|
|
8325
|
+
<xsl:template match="*[local-name()='table']/mn:fmt-name" name="table_name">
|
|
8298
8326
|
<xsl:param name="continued"/>
|
|
8299
8327
|
<xsl:param name="cols-count"/>
|
|
8300
8328
|
<xsl:if test="normalize-space() != ''">
|
|
@@ -8757,12 +8785,14 @@
|
|
|
8757
8785
|
<xsl:param name="colwidths"/>
|
|
8758
8786
|
<xsl:param name="colgroup"/>
|
|
8759
8787
|
|
|
8760
|
-
<xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or
|
|
8788
|
+
<xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ../mn:key or (..//mn:fn[not(parent::mn:fmt-name)] and not(ancestor::mn:table[1]//mn:tfoot//mn:fmt-footnote-container)) or ../mn:fmt-source or ../mn:p"/>
|
|
8789
|
+
<!-- in JIS fmt-footnote-container renders in tfoot, so no need render fn in the separate table -->
|
|
8761
8790
|
|
|
8762
|
-
<xsl:variable name="
|
|
8791
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable_">
|
|
8763
8792
|
</xsl:variable>
|
|
8793
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable" select="normalize-space($isNoteOrFnExistShowAfterTable_)"/>
|
|
8764
8794
|
|
|
8765
|
-
<xsl:if test="$isNoteOrFnExist = 'true' or
|
|
8795
|
+
<xsl:if test="$isNoteOrFnExist = 'true' or $isNoteOrFnExistShowAfterTable = 'true'">
|
|
8766
8796
|
|
|
8767
8797
|
<xsl:variable name="cols-count">
|
|
8768
8798
|
<xsl:choose>
|
|
@@ -14405,10 +14435,22 @@
|
|
|
14405
14435
|
<!-- End Highlight syntax styles -->
|
|
14406
14436
|
|
|
14407
14437
|
<!-- Index section styles -->
|
|
14438
|
+
|
|
14439
|
+
<xsl:attribute-set name="indexsect-region-body-style">
|
|
14440
|
+
<xsl:attribute name="column-count">2</xsl:attribute>
|
|
14441
|
+
<xsl:attribute name="column-gap">10mm</xsl:attribute>
|
|
14442
|
+
</xsl:attribute-set>
|
|
14443
|
+
|
|
14444
|
+
<xsl:attribute-set name="indexsect-title-block-style">
|
|
14445
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
14446
|
+
<xsl:attribute name="span">all</xsl:attribute>
|
|
14447
|
+
</xsl:attribute-set>
|
|
14448
|
+
|
|
14408
14449
|
<xsl:attribute-set name="indexsect-title-style">
|
|
14409
14450
|
<xsl:attribute name="role">H1</xsl:attribute>
|
|
14410
|
-
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
|
14411
14451
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
14452
|
+
<xsl:attribute name="margin-bottom">24pt</xsl:attribute>
|
|
14453
|
+
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
|
14412
14454
|
<xsl:attribute name="margin-bottom">84pt</xsl:attribute>
|
|
14413
14455
|
<xsl:attribute name="margin-left">-18mm</xsl:attribute>
|
|
14414
14456
|
</xsl:attribute-set> <!-- indexsect-title-style -->
|
|
@@ -14439,6 +14481,27 @@
|
|
|
14439
14481
|
</xsl:for-each>
|
|
14440
14482
|
</xsl:variable>
|
|
14441
14483
|
|
|
14484
|
+
<xsl:template name="index-pages">
|
|
14485
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
14486
|
+
|
|
14487
|
+
<xsl:variable name="docid">
|
|
14488
|
+
<xsl:call-template name="getDocumentId"/>
|
|
14489
|
+
</xsl:variable>
|
|
14490
|
+
|
|
14491
|
+
<xsl:variable name="current_document_index_id">
|
|
14492
|
+
<xsl:apply-templates select="//mn:indexsect" mode="index_add_id">
|
|
14493
|
+
<xsl:with-param name="docid" select="$docid"/>
|
|
14494
|
+
</xsl:apply-templates>
|
|
14495
|
+
</xsl:variable>
|
|
14496
|
+
<xsl:variable name="current_document_index">
|
|
14497
|
+
<xsl:apply-templates select="xalan:nodeset($current_document_index_id)" mode="index_update"/>
|
|
14498
|
+
</xsl:variable>
|
|
14499
|
+
|
|
14500
|
+
<xsl:apply-templates select="xalan:nodeset($current_document_index)" mode="index">
|
|
14501
|
+
<xsl:with-param name="num" select="$num"/>
|
|
14502
|
+
</xsl:apply-templates>
|
|
14503
|
+
</xsl:template>
|
|
14504
|
+
|
|
14442
14505
|
<xsl:template match="@*|node()" mode="index_add_id">
|
|
14443
14506
|
<xsl:param name="docid"/>
|
|
14444
14507
|
<xsl:copy>
|
|
@@ -14491,7 +14554,7 @@
|
|
|
14491
14554
|
<xsl:template match="mn:indexsect//mn:li" mode="index_update">
|
|
14492
14555
|
<xsl:copy>
|
|
14493
14556
|
<xsl:apply-templates select="@*" mode="index_update"/>
|
|
14494
|
-
|
|
14557
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
|
|
14495
14558
|
</xsl:copy>
|
|
14496
14559
|
</xsl:template>
|
|
14497
14560
|
|
|
@@ -14699,11 +14762,24 @@
|
|
|
14699
14762
|
<!-- End of Index processing -->
|
|
14700
14763
|
<!-- =================== -->
|
|
14701
14764
|
|
|
14702
|
-
|
|
14765
|
+
<xsl:attribute-set name="form-checkbox-style">
|
|
14766
|
+
<xsl:attribute name="border">0.5pt solid black</xsl:attribute>
|
|
14767
|
+
<xsl:attribute name="background-color">yellow</xsl:attribute>
|
|
14768
|
+
</xsl:attribute-set>
|
|
14769
|
+
|
|
14770
|
+
<xsl:variable name="METANORMA_FORM_START_PREFIX">_metanorma_form_start</xsl:variable>
|
|
14771
|
+
<xsl:variable name="METANORMA_FORM_ITEM_PREFIX">_metanorma_form_item_</xsl:variable>
|
|
14772
|
+
<xsl:variable name="METANORMA_FORM_ITEM_BORDER">1pt solid black</xsl:variable>
|
|
14773
|
+
|
|
14774
|
+
<!-- =================== -->
|
|
14703
14775
|
<!-- Form's elements processing -->
|
|
14704
14776
|
<!-- =================== -->
|
|
14705
14777
|
<xsl:template match="mn:form">
|
|
14706
14778
|
<fo:block>
|
|
14779
|
+
<fo:inline>
|
|
14780
|
+
<xsl:attribute name="id"><xsl:value-of select="concat($METANORMA_FORM_START_PREFIX, '___', @id, '___', @name)"/></xsl:attribute>
|
|
14781
|
+
<xsl:value-of select="$hair_space"/>
|
|
14782
|
+
</fo:inline>
|
|
14707
14783
|
<xsl:apply-templates/>
|
|
14708
14784
|
</fo:block>
|
|
14709
14785
|
</xsl:template>
|
|
@@ -14712,7 +14788,23 @@
|
|
|
14712
14788
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
14713
14789
|
</xsl:template>
|
|
14714
14790
|
|
|
14715
|
-
<xsl:template match="mn:form//mn:input[@type = 'text'
|
|
14791
|
+
<xsl:template match="mn:form//mn:input[@type = 'text']">
|
|
14792
|
+
<!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
|
|
14793
|
+
<fo:inline>
|
|
14794
|
+
<xsl:call-template name="set_id_metanorma_form_item">
|
|
14795
|
+
<xsl:with-param name="add_border_prefix">true</xsl:with-param>
|
|
14796
|
+
</xsl:call-template>
|
|
14797
|
+
<xsl:value-of select="$hair_space"/>
|
|
14798
|
+
</fo:inline>
|
|
14799
|
+
<fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove, this border needs for mn2pdf FOPIFFormsHandler -->
|
|
14800
|
+
<fo:inline>
|
|
14801
|
+
<xsl:call-template name="set_id_metanorma_form_item"/>
|
|
14802
|
+
<xsl:call-template name="text_input"/>
|
|
14803
|
+
</fo:inline>
|
|
14804
|
+
</fo:inline>
|
|
14805
|
+
</xsl:template>
|
|
14806
|
+
|
|
14807
|
+
<xsl:template match="mn:form//mn:input[@type = 'date' or @type = 'file' or @type = 'password']">
|
|
14716
14808
|
<fo:inline>
|
|
14717
14809
|
<xsl:call-template name="text_input"/>
|
|
14718
14810
|
</fo:inline>
|
|
@@ -14744,7 +14836,20 @@
|
|
|
14744
14836
|
</xsl:template>
|
|
14745
14837
|
|
|
14746
14838
|
<xsl:template match="mn:form//mn:input[@type = 'checkbox']">
|
|
14747
|
-
<
|
|
14839
|
+
<xsl:variable name="form_item_type">checkbox</xsl:variable>
|
|
14840
|
+
<!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
|
|
14841
|
+
<fo:inline>
|
|
14842
|
+
<xsl:call-template name="set_id_metanorma_form_item">
|
|
14843
|
+
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
14844
|
+
<xsl:with-param name="add_border_prefix">true</xsl:with-param>
|
|
14845
|
+
</xsl:call-template>
|
|
14846
|
+
<xsl:value-of select="$hair_space"/>
|
|
14847
|
+
</fo:inline>
|
|
14848
|
+
|
|
14849
|
+
<fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove 'border', this border needs for mn2pdf FOPIFFormsHandler -->
|
|
14850
|
+
<xsl:call-template name="set_id_metanorma_form_item">
|
|
14851
|
+
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
14852
|
+
</xsl:call-template>
|
|
14748
14853
|
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
|
14749
14854
|
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
|
14750
14855
|
<xsl:attribute name="content-width">100%</xsl:attribute>
|
|
@@ -14754,11 +14859,24 @@
|
|
|
14754
14859
|
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
|
14755
14860
|
</svg>
|
|
14756
14861
|
</fo:instream-foreign-object>
|
|
14757
|
-
</fo:inline>
|
|
14862
|
+
</fo:inline><fo:inline padding-right="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
|
14758
14863
|
</xsl:template>
|
|
14759
14864
|
|
|
14760
14865
|
<xsl:template match="mn:form//mn:input[@type = 'radio']">
|
|
14761
|
-
<
|
|
14866
|
+
<xsl:variable name="form_item_type">radiobutton</xsl:variable>
|
|
14867
|
+
<!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
|
|
14868
|
+
<fo:inline>
|
|
14869
|
+
<xsl:call-template name="set_id_metanorma_form_item">
|
|
14870
|
+
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
14871
|
+
<xsl:with-param name="add_border_prefix">true</xsl:with-param>
|
|
14872
|
+
</xsl:call-template>
|
|
14873
|
+
<xsl:value-of select="$hair_space"/>
|
|
14874
|
+
</fo:inline>
|
|
14875
|
+
|
|
14876
|
+
<fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove 'border', this border needs for mn2pdf FOPIFFormsHandler -->
|
|
14877
|
+
<xsl:call-template name="set_id_metanorma_form_item">
|
|
14878
|
+
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
14879
|
+
</xsl:call-template>
|
|
14762
14880
|
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
|
14763
14881
|
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
|
14764
14882
|
<xsl:attribute name="content-width">100%</xsl:attribute>
|
|
@@ -14770,6 +14888,7 @@
|
|
|
14770
14888
|
</svg>
|
|
14771
14889
|
</fo:instream-foreign-object>
|
|
14772
14890
|
</fo:inline>
|
|
14891
|
+
<fo:inline padding-right="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
|
14773
14892
|
</xsl:template>
|
|
14774
14893
|
|
|
14775
14894
|
<xsl:template match="mn:form//mn:select">
|
|
@@ -14779,11 +14898,28 @@
|
|
|
14779
14898
|
</xsl:template>
|
|
14780
14899
|
|
|
14781
14900
|
<xsl:template match="mn:form//mn:textarea">
|
|
14782
|
-
<fo:block-container border="
|
|
14901
|
+
<fo:block-container border="{$METANORMA_FORM_ITEM_BORDER}" width="50%">
|
|
14783
14902
|
<fo:block> </fo:block>
|
|
14784
14903
|
</fo:block-container>
|
|
14785
14904
|
</xsl:template>
|
|
14786
14905
|
|
|
14906
|
+
<xsl:template name="set_id_metanorma_form_item">
|
|
14907
|
+
<xsl:param name="form_item_type">textfield</xsl:param>
|
|
14908
|
+
<xsl:param name="add_border_prefix">false</xsl:param>
|
|
14909
|
+
<xsl:variable name="border_prefix"><xsl:if test="normalize-space($add_border_prefix) = 'true'">border_</xsl:if></xsl:variable>
|
|
14910
|
+
<xsl:if test="@id">
|
|
14911
|
+
<!-- _metanorma_form_item_border____form_item_type___id___name___value -->
|
|
14912
|
+
<!-- split by '___': [2] - form_item_type, [3] - id, [4] - name, [5] - value -->
|
|
14913
|
+
<xsl:variable name="value">
|
|
14914
|
+
<xsl:choose>
|
|
14915
|
+
<xsl:when test="@type = 'checkbox'"><xsl:value-of select="normalize-space(@checked = 'true')"/><!-- true or false --></xsl:when>
|
|
14916
|
+
<xsl:otherwise><xsl:value-of select="@value"/></xsl:otherwise>
|
|
14917
|
+
</xsl:choose>
|
|
14918
|
+
</xsl:variable>
|
|
14919
|
+
<xsl:attribute name="id"><xsl:value-of select="concat($METANORMA_FORM_ITEM_PREFIX, $border_prefix, '___', $form_item_type, '___', @id, '___', @name, '___', $value)"/></xsl:attribute>
|
|
14920
|
+
</xsl:if>
|
|
14921
|
+
</xsl:template>
|
|
14922
|
+
|
|
14787
14923
|
<!-- =================== -->
|
|
14788
14924
|
<!-- End Form's elements processing -->
|
|
14789
14925
|
<!-- =================== -->
|
|
@@ -14864,6 +15000,7 @@
|
|
|
14864
15000
|
</xsl:template>
|
|
14865
15001
|
|
|
14866
15002
|
<xsl:attribute-set name="toc-pagenumber-style">
|
|
15003
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
14867
15004
|
<xsl:attribute name="font-family">Arial</xsl:attribute>
|
|
14868
15005
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
14869
15006
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
@@ -16768,7 +16905,12 @@
|
|
|
16768
16905
|
<xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
|
|
16769
16906
|
<xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
|
|
16770
16907
|
<xsl:choose>
|
|
16771
|
-
<xsl:when test="$
|
|
16908
|
+
<xsl:when test="$internal-destination = 'true'">
|
|
16909
|
+
<fo:wrapper role="Reference">
|
|
16910
|
+
<xsl:copy-of select="$element_node"/>
|
|
16911
|
+
</fo:wrapper>
|
|
16912
|
+
</xsl:when>
|
|
16913
|
+
<xsl:when test="$external-destination = 'true'">
|
|
16772
16914
|
<xsl:copy-of select="$element_node"/>
|
|
16773
16915
|
</xsl:when>
|
|
16774
16916
|
<xsl:otherwise>
|