metanorma-bipm 2.7.2 → 2.7.4
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/base_convert.rb +3 -28
- data/lib/isodoc/bipm/bipm.brochure.xsl +704 -190
- data/lib/isodoc/bipm/bipm.guide.xsl +704 -190
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +704 -190
- data/lib/isodoc/bipm/bipm.rapport.xsl +704 -190
- data/lib/isodoc/bipm/jcgm.standard.xsl +707 -199
- data/lib/isodoc/bipm/metadata.rb +23 -12
- data/lib/isodoc/bipm/presentation_footnotes.rb +5 -3
- data/lib/isodoc/bipm/presentation_xml_convert.rb +3 -2
- data/lib/isodoc/bipm/xref.rb +3 -2
- data/lib/metanorma/bipm/biblio-standoc.rng +0 -49
- data/lib/metanorma/bipm/biblio.rng +11 -1
- data/lib/metanorma/bipm/converter.rb +2 -2
- data/lib/metanorma/bipm/front.rb +35 -31
- data/lib/metanorma/bipm/isodoc.rng +24 -1
- data/lib/metanorma/bipm/relaton-bipm.rng +0 -45
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma.yml +3 -0
- metadata +2 -2
@@ -1206,7 +1206,10 @@
|
|
1206
1206
|
<!-- indexes=<xsl:copy-of select="$indexes"/> -->
|
1207
1207
|
<!-- Index -->
|
1208
1208
|
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//mn:indexsect" mode="index">
|
1209
|
-
<xsl:with-param name="isDraft" select="normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
1209
|
+
<!-- <xsl:with-param name="isDraft" select="normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
1210
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'draft') or
|
1211
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'projet'))"/> -->
|
1212
|
+
<xsl:with-param name="isDraft" select="normalize-space(normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft) != '' or normalize-space(//mn:metanorma/mn:metanorma-extension/mn:semantic-metadata/mn:stage-published) = 'false')"/>
|
1210
1213
|
<xsl:with-param name="lang" select="$curr_lang"/>
|
1211
1214
|
</xsl:apply-templates>
|
1212
1215
|
|
@@ -1294,7 +1297,9 @@
|
|
1294
1297
|
|
1295
1298
|
<fo:block> </fo:block>
|
1296
1299
|
<fo:block font-size="9pt">
|
1297
|
-
<xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/mn:variant[@language = $curr_lang]"/>
|
1300
|
+
<!-- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/mn:variant[@language = $curr_lang]"/> -->
|
1301
|
+
<!-- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee[@language = $curr_lang]"/> -->
|
1302
|
+
<xsl:value-of select="//mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:name[@language = $curr_lang]"/>
|
1298
1303
|
</fo:block>
|
1299
1304
|
</fo:block-container>
|
1300
1305
|
|
@@ -1361,7 +1366,10 @@
|
|
1361
1366
|
|
1362
1367
|
<!-- Index -->
|
1363
1368
|
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//mn:indexsect" mode="index">
|
1364
|
-
<xsl:with-param name="isDraft" select="normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
1369
|
+
<!-- <xsl:with-param name="isDraft" select="normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
1370
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'draft') or
|
1371
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'projet'))"/> -->
|
1372
|
+
<xsl:with-param name="isDraft" select="normalize-space(normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft) != '' or normalize-space(//mn:metanorma/mn:metanorma-extension/mn:semantic-metadata/mn:stage-published) = 'false')"/>
|
1365
1373
|
<xsl:with-param name="lang" select="$curr_lang"/>
|
1366
1374
|
</xsl:apply-templates>
|
1367
1375
|
|
@@ -1691,8 +1699,12 @@
|
|
1691
1699
|
|
1692
1700
|
<fo:block-container absolute-position="fixed" left="12mm" top="242mm" height="42mm" width="140mm" display-align="after">
|
1693
1701
|
<fo:block font-size="12pt">
|
1694
|
-
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/mn:variant[@language = 'fr']"/></fo:block>
|
1695
|
-
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee
|
1702
|
+
<!-- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/mn:variant[@language = 'fr']"/></fo:block> -->
|
1703
|
+
<!-- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee[@language = 'fr']"/></fo:block> -->
|
1704
|
+
<fo:block><xsl:value-of select="//mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:name[@language = 'fr']"/></fo:block>
|
1705
|
+
<!-- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/mn:variant[@language = 'en']"/></fo:block> -->
|
1706
|
+
<!-- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee[@language = 'en']"/></fo:block> -->
|
1707
|
+
<fo:block><xsl:value-of select="//mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:name[@language = 'en']"/></fo:block>
|
1696
1708
|
<fo:block> </fo:block>
|
1697
1709
|
|
1698
1710
|
<fo:block>
|
@@ -3055,7 +3067,7 @@
|
|
3055
3067
|
|
3056
3068
|
<xsl:template match="mn:fmt-preferred" priority="2">
|
3057
3069
|
<fo:block font-weight="bold" keep-with-next="always" space-before="8pt" margin-bottom="6pt">
|
3058
|
-
<xsl:call-template name="
|
3070
|
+
<xsl:call-template name="refine_preferred-term-style"/>
|
3059
3071
|
<xsl:if test="ancestor::mn:term[1]/mn:fmt-name">
|
3060
3072
|
<xsl:variable name="level">
|
3061
3073
|
<xsl:call-template name="getLevelTermName"/>
|
@@ -3560,7 +3572,10 @@
|
|
3560
3572
|
<xsl:template name="insertDraftWatermark">
|
3561
3573
|
<xsl:param name="isDraft"/>
|
3562
3574
|
<xsl:param name="lang"/>
|
3563
|
-
<xsl:if test="$isDraft = 'true' or normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
3575
|
+
<!-- <xsl:if test="$isDraft = 'true' or normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
3576
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'draft') or
|
3577
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'projet')) = 'true'"> -->
|
3578
|
+
<xsl:if test="$isDraft = 'true' or normalize-space(normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft) != '' or normalize-space(//mn:metanorma/mn:metanorma-extension/mn:semantic-metadata/mn:stage-published) = 'false') = 'true'">
|
3564
3579
|
<!-- DRAFT -->
|
3565
3580
|
<xsl:variable name="draft_label">
|
3566
3581
|
<xsl:choose>
|
@@ -3604,7 +3619,10 @@
|
|
3604
3619
|
</xsl:template>
|
3605
3620
|
|
3606
3621
|
<xsl:template name="insertHeaderDraftWatermark">
|
3607
|
-
<xsl:variable name="isDraft" select="normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
3622
|
+
<!-- <xsl:variable name="isDraft" select="normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
3623
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'draft') or
|
3624
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'projet'))"/> -->
|
3625
|
+
<xsl:variable name="isDraft" select="normalize-space(normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft) != '' or normalize-space(//mn:metanorma/mn:metanorma-extension/mn:semantic-metadata/mn:stage-published) = 'false')"/>
|
3608
3626
|
<xsl:variable name="curr_lang" select="$doc_split_by_language"/>
|
3609
3627
|
<xsl:if test="$isDraft = 'true'">
|
3610
3628
|
<fo:static-content flow-name="header-blank" role="artifact">
|
@@ -5602,50 +5620,94 @@
|
|
5602
5620
|
<xsl:attribute-set name="copyright-statement-style">
|
5603
5621
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
5604
5622
|
|
5623
|
+
<xsl:template name="refine_copyright-statement-style">
|
5624
|
+
</xsl:template>
|
5625
|
+
|
5605
5626
|
<xsl:attribute-set name="copyright-statement-title-style">
|
5606
5627
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
5607
5628
|
|
5629
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
5630
|
+
</xsl:template>
|
5631
|
+
|
5608
5632
|
<xsl:attribute-set name="copyright-statement-p-style">
|
5609
5633
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
5610
5634
|
|
5611
|
-
|
5635
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
5636
|
+
|
5637
|
+
</xsl:template>
|
5638
|
+
|
5639
|
+
<xsl:attribute-set name="license-statement-style">
|
5612
5640
|
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
5613
5641
|
<xsl:attribute name="font-size">10.5pt</xsl:attribute>
|
5614
5642
|
</xsl:attribute-set> <!-- license-statement-style -->
|
5615
5643
|
|
5644
|
+
<xsl:template name="refine_license-statement-style">
|
5645
|
+
</xsl:template>
|
5646
|
+
|
5616
5647
|
<xsl:attribute-set name="license-statement-title-style">
|
5617
5648
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
5618
5649
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
5619
5650
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
5620
5651
|
</xsl:attribute-set> <!-- license-statement-title-style -->
|
5621
5652
|
|
5653
|
+
<xsl:template name="refine_license-statement-title-style">
|
5654
|
+
</xsl:template>
|
5655
|
+
|
5622
5656
|
<xsl:attribute-set name="license-statement-p-style">
|
5623
5657
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
5624
5658
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
5625
5659
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
5626
5660
|
|
5661
|
+
<xsl:template name="refine_license-statement-p-style">
|
5662
|
+
|
5663
|
+
</xsl:template>
|
5664
|
+
|
5627
5665
|
<xsl:attribute-set name="legal-statement-style">
|
5628
5666
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
5629
5667
|
|
5668
|
+
<xsl:template name="refine_legal-statement-style">
|
5669
|
+
</xsl:template>
|
5670
|
+
|
5630
5671
|
<xsl:attribute-set name="legal-statement-title-style">
|
5631
5672
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
5632
5673
|
</xsl:attribute-set> <!-- legal-statement-title-style -->
|
5633
5674
|
|
5675
|
+
<xsl:template name="refine_legal-statement-title-style">
|
5676
|
+
</xsl:template>
|
5677
|
+
|
5634
5678
|
<xsl:attribute-set name="legal-statement-p-style">
|
5635
5679
|
</xsl:attribute-set> <!-- legal-statement-p-style -->
|
5636
5680
|
|
5681
|
+
<xsl:template name="refine_legal-statement-p-style">
|
5682
|
+
<xsl:if test="@align">
|
5683
|
+
<xsl:attribute name="text-align">
|
5684
|
+
<xsl:value-of select="@align"/>
|
5685
|
+
</xsl:attribute>
|
5686
|
+
</xsl:if>
|
5687
|
+
</xsl:template>
|
5688
|
+
|
5637
5689
|
<xsl:attribute-set name="feedback-statement-style">
|
5638
5690
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
5639
5691
|
<xsl:attribute name="line-height">125%</xsl:attribute>
|
5640
5692
|
</xsl:attribute-set> <!-- feedback-statement-style -->
|
5641
5693
|
|
5694
|
+
<xsl:template name="refine_feedback-statement-style">
|
5695
|
+
</xsl:template>
|
5696
|
+
|
5642
5697
|
<xsl:attribute-set name="feedback-statement-title-style">
|
5643
5698
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
5644
5699
|
</xsl:attribute-set> <!-- feedback-statement-title-style -->
|
5645
5700
|
|
5701
|
+
<xsl:template name="refine_feedback-statement-title-style">
|
5702
|
+
|
5703
|
+
</xsl:template>
|
5704
|
+
|
5646
5705
|
<xsl:attribute-set name="feedback-statement-p-style">
|
5647
5706
|
</xsl:attribute-set> <!-- feedback-statement-p-style -->
|
5648
5707
|
|
5708
|
+
<xsl:template name="refine_feedback-statement-p-style">
|
5709
|
+
</xsl:template>
|
5710
|
+
|
5649
5711
|
<!-- End boilerplate sections styles -->
|
5650
5712
|
|
5651
5713
|
<!-- ================================= -->
|
@@ -5653,6 +5715,8 @@
|
|
5653
5715
|
<!-- ================================= -->
|
5654
5716
|
<xsl:template match="mn:copyright-statement">
|
5655
5717
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
5718
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
5719
|
+
|
5656
5720
|
<xsl:apply-templates/>
|
5657
5721
|
</fo:block>
|
5658
5722
|
</xsl:template> <!-- copyright-statement -->
|
@@ -5669,6 +5733,7 @@
|
|
5669
5733
|
|
5670
5734
|
<xsl:template match="mn:license-statement">
|
5671
5735
|
<fo:block xsl:use-attribute-sets="license-statement-style">
|
5736
|
+
<xsl:call-template name="refine_license-statement-style"/>
|
5672
5737
|
<xsl:apply-templates/>
|
5673
5738
|
</fo:block>
|
5674
5739
|
</xsl:template> <!-- license-statement -->
|
@@ -5678,6 +5743,7 @@
|
|
5678
5743
|
<xsl:call-template name="getLevel"/>
|
5679
5744
|
</xsl:variable>
|
5680
5745
|
<fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
|
5746
|
+
<xsl:call-template name="refine_license-statement-title-style"/>
|
5681
5747
|
<xsl:apply-templates/>
|
5682
5748
|
</fo:block>
|
5683
5749
|
|
@@ -5694,6 +5760,7 @@
|
|
5694
5760
|
<xsl:template match="mn:legal-statement">
|
5695
5761
|
<xsl:param name="isLegacy">false</xsl:param>
|
5696
5762
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
5763
|
+
<xsl:call-template name="refine_legal-statement-style"/>
|
5697
5764
|
<xsl:apply-templates/>
|
5698
5765
|
</fo:block>
|
5699
5766
|
</xsl:template> <!-- legal-statement -->
|
@@ -5863,6 +5930,27 @@
|
|
5863
5930
|
<xsl:attribute-set name="sourcecode-container-style">
|
5864
5931
|
</xsl:attribute-set>
|
5865
5932
|
|
5933
|
+
<xsl:template name="refine_sourcecode-container-style">
|
5934
|
+
<xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
|
5935
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
5936
|
+
</xsl:if>
|
5937
|
+
|
5938
|
+
<xsl:if test="ancestor::mn:example">
|
5939
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
5940
|
+
</xsl:if>
|
5941
|
+
|
5942
|
+
<xsl:copy-of select="@id"/>
|
5943
|
+
|
5944
|
+
<xsl:if test="parent::mn:note">
|
5945
|
+
<xsl:attribute name="margin-left">
|
5946
|
+
<xsl:choose>
|
5947
|
+
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
5948
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
5949
|
+
</xsl:choose>
|
5950
|
+
</xsl:attribute>
|
5951
|
+
</xsl:if>
|
5952
|
+
</xsl:template>
|
5953
|
+
|
5866
5954
|
<xsl:attribute-set name="sourcecode-style">
|
5867
5955
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
5868
5956
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -5880,6 +5968,9 @@
|
|
5880
5968
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
5881
5969
|
</xsl:attribute-set> <!-- sourcecode-name-style -->
|
5882
5970
|
|
5971
|
+
<xsl:template name="refine_sourcecode-name-style">
|
5972
|
+
</xsl:template>
|
5973
|
+
|
5883
5974
|
<xsl:template name="add-zero-spaces-equal">
|
5884
5975
|
<xsl:param name="text" select="."/>
|
5885
5976
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
@@ -5967,24 +6058,8 @@
|
|
5967
6058
|
<xsl:otherwise>
|
5968
6059
|
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
|
5969
6060
|
|
5970
|
-
<xsl:
|
5971
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
5972
|
-
</xsl:if>
|
5973
|
-
|
5974
|
-
<xsl:if test="ancestor::mn:example">
|
5975
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
5976
|
-
</xsl:if>
|
5977
|
-
|
5978
|
-
<xsl:copy-of select="@id"/>
|
6061
|
+
<xsl:call-template name="refine_sourcecode-container-style"/>
|
5979
6062
|
|
5980
|
-
<xsl:if test="parent::mn:note">
|
5981
|
-
<xsl:attribute name="margin-left">
|
5982
|
-
<xsl:choose>
|
5983
|
-
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
5984
|
-
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
5985
|
-
</xsl:choose>
|
5986
|
-
</xsl:attribute>
|
5987
|
-
</xsl:if>
|
5988
6063
|
<fo:block-container margin-left="0mm" role="SKIP">
|
5989
6064
|
|
5990
6065
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
@@ -6311,6 +6386,7 @@
|
|
6311
6386
|
<xsl:template match="mn:sourcecode/mn:fmt-name">
|
6312
6387
|
<xsl:if test="normalize-space() != ''">
|
6313
6388
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
6389
|
+
<xsl:call-template name="refine_sourcecode-name-style"/>
|
6314
6390
|
<xsl:apply-templates/>
|
6315
6391
|
</fo:block>
|
6316
6392
|
</xsl:if>
|
@@ -6357,11 +6433,30 @@
|
|
6357
6433
|
<xsl:attribute-set name="pre-style">
|
6358
6434
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
6359
6435
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
6360
|
-
</xsl:attribute-set>
|
6436
|
+
</xsl:attribute-set> <!-- pre-style -->
|
6437
|
+
|
6438
|
+
<xsl:template name="refine_pre-style">
|
6439
|
+
</xsl:template>
|
6361
6440
|
|
6362
6441
|
<xsl:attribute-set name="tt-style">
|
6363
6442
|
</xsl:attribute-set>
|
6364
6443
|
|
6444
|
+
<xsl:template name="refine_tt-style">
|
6445
|
+
<xsl:variable name="_font-size"> <!-- inherit -->
|
6446
|
+
</xsl:variable>
|
6447
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
6448
|
+
<xsl:if test="$font-size != ''">
|
6449
|
+
<xsl:attribute name="font-size">
|
6450
|
+
<xsl:choose>
|
6451
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
6452
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
6453
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
6454
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
6455
|
+
</xsl:choose>
|
6456
|
+
</xsl:attribute>
|
6457
|
+
</xsl:if>
|
6458
|
+
</xsl:template>
|
6459
|
+
|
6365
6460
|
<xsl:variable name="color-added-text">
|
6366
6461
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
6367
6462
|
</xsl:variable>
|
@@ -6374,9 +6469,14 @@
|
|
6374
6469
|
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
6375
6470
|
</xsl:attribute-set>
|
6376
6471
|
|
6472
|
+
<xsl:template name="refine_add-style">
|
6473
|
+
</xsl:template>
|
6474
|
+
|
6377
6475
|
<xsl:variable name="add-style">
|
6378
|
-
|
6379
|
-
|
6476
|
+
<add-style xsl:use-attribute-sets="add-style">
|
6477
|
+
<xsl:call-template name="refine_add-style"/>
|
6478
|
+
</add-style>
|
6479
|
+
</xsl:variable>
|
6380
6480
|
<xsl:template name="append_add-style">
|
6381
6481
|
<xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
|
6382
6482
|
</xsl:template>
|
@@ -6389,24 +6489,77 @@
|
|
6389
6489
|
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
6390
6490
|
</xsl:attribute-set>
|
6391
6491
|
|
6492
|
+
<xsl:template name="refine_del-style">
|
6493
|
+
</xsl:template>
|
6494
|
+
|
6495
|
+
<xsl:attribute-set name="strong-style">
|
6496
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
6497
|
+
</xsl:attribute-set>
|
6498
|
+
|
6499
|
+
<xsl:template name="refine_strong_style">
|
6500
|
+
<xsl:if test="ancestor::*['preferred']">
|
6501
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
6502
|
+
</xsl:if>
|
6503
|
+
</xsl:template> <!-- refine_strong_style -->
|
6504
|
+
|
6505
|
+
<xsl:attribute-set name="em-style">
|
6506
|
+
<xsl:attribute name="font-style">italic</xsl:attribute>
|
6507
|
+
</xsl:attribute-set>
|
6508
|
+
|
6509
|
+
<xsl:template name="refine_em_style">
|
6510
|
+
</xsl:template> <!-- refine_em_style -->
|
6511
|
+
|
6512
|
+
<xsl:attribute-set name="sup-style">
|
6513
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
6514
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
6515
|
+
</xsl:attribute-set>
|
6516
|
+
|
6517
|
+
<xsl:template name="refine_sup-style">
|
6518
|
+
</xsl:template>
|
6519
|
+
|
6520
|
+
<xsl:attribute-set name="sub-style">
|
6521
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
6522
|
+
<xsl:attribute name="vertical-align">sub</xsl:attribute>
|
6523
|
+
</xsl:attribute-set>
|
6524
|
+
|
6525
|
+
<xsl:template name="refine_sub-style">
|
6526
|
+
</xsl:template>
|
6527
|
+
|
6528
|
+
<xsl:attribute-set name="underline-style">
|
6529
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
6530
|
+
</xsl:attribute-set>
|
6531
|
+
|
6532
|
+
<xsl:template name="refine_underline-style">
|
6533
|
+
</xsl:template>
|
6534
|
+
|
6535
|
+
<xsl:attribute-set name="hi-style">
|
6536
|
+
<xsl:attribute name="background-color">yellow</xsl:attribute>
|
6537
|
+
</xsl:attribute-set>
|
6538
|
+
|
6539
|
+
<xsl:template name="refine_hi-style">
|
6540
|
+
</xsl:template>
|
6541
|
+
|
6542
|
+
<xsl:attribute-set name="strike-style">
|
6543
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
6544
|
+
</xsl:attribute-set>
|
6545
|
+
|
6546
|
+
<xsl:template name="refine_strike-style">
|
6547
|
+
</xsl:template>
|
6548
|
+
|
6392
6549
|
<xsl:template match="mn:br">
|
6393
6550
|
<xsl:value-of select="$linebreak"/>
|
6394
6551
|
</xsl:template>
|
6395
6552
|
|
6396
|
-
|
6397
|
-
<fo:inline
|
6398
|
-
<xsl:call-template name="
|
6553
|
+
<xsl:template match="mn:em">
|
6554
|
+
<fo:inline xsl:use-attribute-sets="em-style">
|
6555
|
+
<xsl:call-template name="refine_em_style"/>
|
6399
6556
|
<xsl:apply-templates/>
|
6400
6557
|
</fo:inline>
|
6401
6558
|
</xsl:template>
|
6402
6559
|
|
6403
|
-
<xsl:template name="refine_italic_style">
|
6404
|
-
</xsl:template>
|
6405
|
-
|
6406
6560
|
<xsl:template match="mn:strong | *[local-name()='b']">
|
6407
6561
|
<xsl:param name="split_keep-within-line"/>
|
6408
|
-
<fo:inline
|
6409
|
-
|
6562
|
+
<fo:inline xsl:use-attribute-sets="strong-style">
|
6410
6563
|
<xsl:call-template name="refine_strong_style"/>
|
6411
6564
|
|
6412
6565
|
<xsl:apply-templates>
|
@@ -6415,44 +6568,27 @@
|
|
6415
6568
|
</fo:inline>
|
6416
6569
|
</xsl:template>
|
6417
6570
|
|
6418
|
-
<xsl:template name="refine_strong_style">
|
6419
|
-
<xsl:if test="ancestor::*['preferred']">
|
6420
|
-
<xsl:attribute name="role">SKIP</xsl:attribute>
|
6421
|
-
</xsl:if>
|
6422
|
-
</xsl:template>
|
6423
|
-
|
6424
6571
|
<xsl:template match="*[local-name()='padding']">
|
6425
6572
|
<fo:inline padding-right="{@value}"> </fo:inline>
|
6426
6573
|
</xsl:template>
|
6427
6574
|
|
6428
6575
|
<xsl:template match="mn:sup">
|
6429
|
-
<fo:inline
|
6576
|
+
<fo:inline xsl:use-attribute-sets="sup-style">
|
6577
|
+
<xsl:call-template name="refine_sup-style"/>
|
6430
6578
|
<xsl:apply-templates/>
|
6431
6579
|
</fo:inline>
|
6432
6580
|
</xsl:template>
|
6433
6581
|
|
6434
6582
|
<xsl:template match="mn:sub">
|
6435
|
-
<fo:inline
|
6583
|
+
<fo:inline xsl:use-attribute-sets="sub-style">
|
6584
|
+
<xsl:call-template name="refine_sub-style"/>
|
6436
6585
|
<xsl:apply-templates/>
|
6437
6586
|
</fo:inline>
|
6438
6587
|
</xsl:template>
|
6439
6588
|
|
6440
6589
|
<xsl:template match="mn:tt">
|
6441
6590
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
6442
|
-
|
6443
|
-
<xsl:variable name="_font-size"> <!-- inherit -->
|
6444
|
-
</xsl:variable>
|
6445
|
-
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
6446
|
-
<xsl:if test="$font-size != ''">
|
6447
|
-
<xsl:attribute name="font-size">
|
6448
|
-
<xsl:choose>
|
6449
|
-
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
6450
|
-
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
6451
|
-
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
6452
|
-
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
6453
|
-
</xsl:choose>
|
6454
|
-
</xsl:attribute>
|
6455
|
-
</xsl:if>
|
6591
|
+
<xsl:call-template name="refine_tt-style"/>
|
6456
6592
|
<xsl:apply-templates/>
|
6457
6593
|
</fo:inline>
|
6458
6594
|
</xsl:template> <!-- tt -->
|
@@ -6471,7 +6607,8 @@
|
|
6471
6607
|
</xsl:template>
|
6472
6608
|
|
6473
6609
|
<xsl:template match="mn:underline">
|
6474
|
-
<fo:inline
|
6610
|
+
<fo:inline xsl:use-attribute-sets="underline-style">
|
6611
|
+
<xsl:call-template name="refine_underline-style"/>
|
6475
6612
|
<xsl:apply-templates/>
|
6476
6613
|
</fo:inline>
|
6477
6614
|
</xsl:template>
|
@@ -6629,6 +6766,7 @@
|
|
6629
6766
|
|
6630
6767
|
<xsl:template match="mn:del">
|
6631
6768
|
<fo:inline xsl:use-attribute-sets="del-style">
|
6769
|
+
<xsl:call-template name="refine_del-style"/>
|
6632
6770
|
<xsl:apply-templates/>
|
6633
6771
|
</fo:inline>
|
6634
6772
|
</xsl:template>
|
@@ -6638,7 +6776,8 @@
|
|
6638
6776
|
|
6639
6777
|
<!-- highlight text -->
|
6640
6778
|
<xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
|
6641
|
-
<fo:inline
|
6779
|
+
<fo:inline xsl:use-attribute-sets="hi-style">
|
6780
|
+
<xsl:call-template name="refine_hi-style"/>
|
6642
6781
|
<xsl:apply-templates/>
|
6643
6782
|
</fo:inline>
|
6644
6783
|
</xsl:template>
|
@@ -6724,7 +6863,8 @@
|
|
6724
6863
|
</xsl:template>
|
6725
6864
|
|
6726
6865
|
<xsl:template match="mn:strike">
|
6727
|
-
<fo:inline
|
6866
|
+
<fo:inline xsl:use-attribute-sets="strike-style">
|
6867
|
+
<xsl:call-template name="refine_strike-style"/>
|
6728
6868
|
<xsl:apply-templates/>
|
6729
6869
|
</fo:inline>
|
6730
6870
|
</xsl:template>
|
@@ -6752,7 +6892,7 @@
|
|
6752
6892
|
</xsl:otherwise>
|
6753
6893
|
</xsl:choose>
|
6754
6894
|
</xsl:variable>
|
6755
|
-
<xsl:if test="$key = 'font-family' or
|
6895
|
+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
|
6756
6896
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
6757
6897
|
</xsl:if>
|
6758
6898
|
<xsl:if test="$key = 'text-indent'">
|
@@ -6804,6 +6944,7 @@
|
|
6804
6944
|
|
6805
6945
|
<xsl:template match="mn:pre" name="pre">
|
6806
6946
|
<fo:block xsl:use-attribute-sets="pre-style">
|
6947
|
+
<xsl:call-template name="refine_pre-style"/>
|
6807
6948
|
<xsl:copy-of select="@id"/>
|
6808
6949
|
<xsl:choose>
|
6809
6950
|
|
@@ -6834,22 +6975,40 @@
|
|
6834
6975
|
<xsl:attribute-set name="permission-style">
|
6835
6976
|
</xsl:attribute-set>
|
6836
6977
|
|
6978
|
+
<xsl:template name="refine_permission-style">
|
6979
|
+
</xsl:template>
|
6980
|
+
|
6837
6981
|
<xsl:attribute-set name="permission-name-style">
|
6838
6982
|
</xsl:attribute-set>
|
6839
6983
|
|
6984
|
+
<xsl:template name="refine_permission-name-style">
|
6985
|
+
</xsl:template>
|
6986
|
+
|
6840
6987
|
<xsl:attribute-set name="permission-label-style">
|
6841
6988
|
</xsl:attribute-set>
|
6842
6989
|
|
6990
|
+
<xsl:template name="refine_permission-label-style">
|
6991
|
+
</xsl:template>
|
6992
|
+
|
6843
6993
|
<xsl:attribute-set name="requirement-style">
|
6844
6994
|
</xsl:attribute-set>
|
6845
6995
|
|
6996
|
+
<xsl:template name="refine_requirement-style">
|
6997
|
+
</xsl:template>
|
6998
|
+
|
6846
6999
|
<xsl:attribute-set name="requirement-name-style">
|
6847
7000
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
6848
7001
|
</xsl:attribute-set>
|
6849
7002
|
|
7003
|
+
<xsl:template name="refine_requirement-name-style">
|
7004
|
+
</xsl:template>
|
7005
|
+
|
6850
7006
|
<xsl:attribute-set name="requirement-label-style">
|
6851
7007
|
</xsl:attribute-set>
|
6852
7008
|
|
7009
|
+
<xsl:template name="refine_requirement-label-style">
|
7010
|
+
</xsl:template>
|
7011
|
+
|
6853
7012
|
<xsl:attribute-set name="subject-style">
|
6854
7013
|
</xsl:attribute-set>
|
6855
7014
|
|
@@ -6877,18 +7036,28 @@
|
|
6877
7036
|
<xsl:attribute-set name="recommendation-style">
|
6878
7037
|
</xsl:attribute-set>
|
6879
7038
|
|
7039
|
+
<xsl:template name="refine_recommendation-style">
|
7040
|
+
</xsl:template>
|
7041
|
+
|
6880
7042
|
<xsl:attribute-set name="recommendation-name-style">
|
6881
7043
|
</xsl:attribute-set>
|
6882
7044
|
|
7045
|
+
<xsl:template name="refine_recommendation-name-style">
|
7046
|
+
</xsl:template>
|
7047
|
+
|
6883
7048
|
<xsl:attribute-set name="recommendation-label-style">
|
6884
7049
|
</xsl:attribute-set>
|
6885
7050
|
|
7051
|
+
<xsl:template name="refine_recommendation-label-style">
|
7052
|
+
</xsl:template>
|
7053
|
+
|
6886
7054
|
<!-- ========== -->
|
6887
7055
|
<!-- permission -->
|
6888
7056
|
<!-- ========== -->
|
6889
7057
|
<xsl:template match="mn:permission">
|
6890
7058
|
<xsl:call-template name="setNamedDestination"/>
|
6891
7059
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
7060
|
+
<xsl:call-template name="refine_permission-style"/>
|
6892
7061
|
<xsl:apply-templates select="mn:fmt-name"/>
|
6893
7062
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
6894
7063
|
</fo:block>
|
@@ -6897,6 +7066,7 @@
|
|
6897
7066
|
<xsl:template match="mn:permission/mn:fmt-name">
|
6898
7067
|
<xsl:if test="normalize-space() != ''">
|
6899
7068
|
<fo:block xsl:use-attribute-sets="permission-name-style">
|
7069
|
+
<xsl:call-template name="refine_permission-name-style"/>
|
6900
7070
|
<xsl:apply-templates/>
|
6901
7071
|
</fo:block>
|
6902
7072
|
</xsl:if>
|
@@ -6904,6 +7074,7 @@
|
|
6904
7074
|
|
6905
7075
|
<xsl:template match="mn:permission/mn:label">
|
6906
7076
|
<fo:block xsl:use-attribute-sets="permission-label-style">
|
7077
|
+
<xsl:call-template name="refine_permission-label-style"/>
|
6907
7078
|
<xsl:apply-templates/>
|
6908
7079
|
</fo:block>
|
6909
7080
|
</xsl:template>
|
@@ -6916,6 +7087,7 @@
|
|
6916
7087
|
<xsl:template match="mn:requirement">
|
6917
7088
|
<xsl:call-template name="setNamedDestination"/>
|
6918
7089
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
7090
|
+
<xsl:call-template name="refine_requirement-style"/>
|
6919
7091
|
<xsl:apply-templates select="mn:fmt-name"/>
|
6920
7092
|
<xsl:apply-templates select="mn:label"/>
|
6921
7093
|
<xsl:apply-templates select="@obligation"/>
|
@@ -6928,6 +7100,7 @@
|
|
6928
7100
|
<xsl:if test="normalize-space() != ''">
|
6929
7101
|
|
6930
7102
|
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
7103
|
+
<xsl:call-template name="refine_requirement-name-style"/>
|
6931
7104
|
<xsl:apply-templates/>
|
6932
7105
|
</fo:block>
|
6933
7106
|
</xsl:if>
|
@@ -6935,6 +7108,7 @@
|
|
6935
7108
|
|
6936
7109
|
<xsl:template match="mn:requirement/mn:label">
|
6937
7110
|
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
7111
|
+
<xsl:call-template name="refine_requirement-label-style"/>
|
6938
7112
|
<xsl:apply-templates/>
|
6939
7113
|
</fo:block>
|
6940
7114
|
</xsl:template>
|
@@ -6960,6 +7134,7 @@
|
|
6960
7134
|
<xsl:template match="mn:recommendation">
|
6961
7135
|
<xsl:call-template name="setNamedDestination"/>
|
6962
7136
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
7137
|
+
<xsl:call-template name="refine_recommendation-style"/>
|
6963
7138
|
<xsl:apply-templates select="mn:fmt-name"/>
|
6964
7139
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
6965
7140
|
</fo:block>
|
@@ -6969,6 +7144,7 @@
|
|
6969
7144
|
<xsl:if test="normalize-space() != ''">
|
6970
7145
|
|
6971
7146
|
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
7147
|
+
<xsl:call-template name="refine_recommendation-name-style"/>
|
6972
7148
|
<xsl:apply-templates/>
|
6973
7149
|
</fo:block>
|
6974
7150
|
</xsl:if>
|
@@ -6976,6 +7152,7 @@
|
|
6976
7152
|
|
6977
7153
|
<xsl:template match="mn:recommendation/mn:label">
|
6978
7154
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
7155
|
+
<xsl:call-template name="refine_recommendation-label-style"/>
|
6979
7156
|
<xsl:apply-templates/>
|
6980
7157
|
</fo:block>
|
6981
7158
|
</xsl:template>
|
@@ -7156,34 +7333,64 @@
|
|
7156
7333
|
<xsl:attribute-set name="term-style">
|
7157
7334
|
</xsl:attribute-set> <!-- term-style -->
|
7158
7335
|
|
7336
|
+
<xsl:template name="refine_term-style">
|
7337
|
+
</xsl:template>
|
7338
|
+
|
7159
7339
|
<xsl:attribute-set name="term-name-style">
|
7160
7340
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
7161
7341
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
7162
7342
|
</xsl:attribute-set> <!-- term-name-style -->
|
7163
7343
|
|
7164
|
-
|
7344
|
+
<xsl:template name="refine_term-name-style">
|
7345
|
+
</xsl:template>
|
7346
|
+
|
7347
|
+
<xsl:attribute-set name="preferred-block-style">
|
7165
7348
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
7166
7349
|
|
7350
|
+
<xsl:template name="refine_preferred-block-style">
|
7351
|
+
</xsl:template>
|
7352
|
+
|
7167
7353
|
<xsl:attribute-set name="preferred-term-style">
|
7168
7354
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
7169
7355
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
7170
7356
|
</xsl:attribute-set> <!-- preferred-term-style -->
|
7171
7357
|
|
7358
|
+
<xsl:template name="refine_preferred-term-style">
|
7359
|
+
<xsl:if test="mn:strong">
|
7360
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
7361
|
+
</xsl:if>
|
7362
|
+
</xsl:template>
|
7363
|
+
|
7172
7364
|
<xsl:attribute-set name="domain-style">
|
7173
7365
|
</xsl:attribute-set> <!-- domain-style -->
|
7174
7366
|
|
7367
|
+
<xsl:template name="refine_domain-style">
|
7368
|
+
</xsl:template>
|
7369
|
+
|
7175
7370
|
<xsl:attribute-set name="admitted-style">
|
7176
7371
|
</xsl:attribute-set> <!-- admitted-style -->
|
7177
7372
|
|
7373
|
+
<xsl:template name="refine_admitted-style">
|
7374
|
+
</xsl:template>
|
7375
|
+
|
7178
7376
|
<xsl:attribute-set name="deprecates-style">
|
7179
7377
|
</xsl:attribute-set> <!-- deprecates-style -->
|
7180
7378
|
|
7379
|
+
<xsl:template name="refine_deprecates-style">
|
7380
|
+
</xsl:template>
|
7381
|
+
|
7181
7382
|
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
7182
7383
|
</xsl:attribute-set>
|
7183
7384
|
|
7385
|
+
<xsl:template name="refine_related-block-style">
|
7386
|
+
</xsl:template>
|
7387
|
+
|
7184
7388
|
<xsl:attribute-set name="definition-style">
|
7185
7389
|
</xsl:attribute-set> <!-- definition-style -->
|
7186
7390
|
|
7391
|
+
<xsl:template name="refine_definition-style">
|
7392
|
+
</xsl:template>
|
7393
|
+
|
7187
7394
|
<xsl:attribute-set name="termsource-style">
|
7188
7395
|
</xsl:attribute-set> <!-- termsource-style -->
|
7189
7396
|
|
@@ -7193,9 +7400,15 @@
|
|
7193
7400
|
<xsl:attribute-set name="termsource-text-style">
|
7194
7401
|
</xsl:attribute-set> <!-- termsource-text-style -->
|
7195
7402
|
|
7403
|
+
<xsl:template name="refine_termsource-text-style">
|
7404
|
+
</xsl:template>
|
7405
|
+
|
7196
7406
|
<xsl:attribute-set name="origin-style">
|
7197
7407
|
</xsl:attribute-set> <!-- origin-style -->
|
7198
7408
|
|
7409
|
+
<xsl:template name="refine_origin-style">
|
7410
|
+
</xsl:template>
|
7411
|
+
|
7199
7412
|
<!-- ====== -->
|
7200
7413
|
<!-- term -->
|
7201
7414
|
<!-- ====== -->
|
@@ -7211,9 +7424,8 @@
|
|
7211
7424
|
<xsl:template match="mn:term">
|
7212
7425
|
<xsl:call-template name="setNamedDestination"/>
|
7213
7426
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
7427
|
+
<xsl:call-template name="refine_term-style"/>
|
7214
7428
|
|
7215
|
-
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
|
7216
|
-
</xsl:if>
|
7217
7429
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
7218
7430
|
</fo:block>
|
7219
7431
|
</xsl:template>
|
@@ -7289,6 +7501,7 @@
|
|
7289
7501
|
<!-- text SOURCE: -->
|
7290
7502
|
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
7291
7503
|
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
7504
|
+
<xsl:call-template name="refine_termsource-text-style"/>
|
7292
7505
|
<xsl:value-of select="."/>
|
7293
7506
|
</fo:inline>
|
7294
7507
|
</xsl:template>
|
@@ -7301,6 +7514,7 @@
|
|
7301
7514
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
7302
7515
|
</xsl:if>
|
7303
7516
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
7517
|
+
<xsl:call-template name="refine_origin-style"/>
|
7304
7518
|
<xsl:apply-templates/>
|
7305
7519
|
</fo:inline>
|
7306
7520
|
</fo:basic-link>
|
@@ -7350,9 +7564,12 @@
|
|
7350
7564
|
</xsl:variable>
|
7351
7565
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
7352
7566
|
|
7567
|
+
<xsl:call-template name="refine_preferred-block-style"/>
|
7568
|
+
|
7353
7569
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
7354
7570
|
|
7355
7571
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
7572
|
+
<xsl:call-template name="refine_term-name-style"/>
|
7356
7573
|
|
7357
7574
|
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
7358
7575
|
<xsl:call-template name="setIDforNamedDestination"/>
|
@@ -7363,7 +7580,7 @@
|
|
7363
7580
|
</xsl:if>
|
7364
7581
|
|
7365
7582
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
7366
|
-
<xsl:call-template name="
|
7583
|
+
<xsl:call-template name="refine_preferred-term-style"/>
|
7367
7584
|
|
7368
7585
|
<xsl:apply-templates/>
|
7369
7586
|
</fo:block>
|
@@ -7384,22 +7601,18 @@
|
|
7384
7601
|
|
7385
7602
|
<xsl:template match="mn:fmt-admitted">
|
7386
7603
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
7604
|
+
<xsl:call-template name="refine_admitted-style"/>
|
7387
7605
|
<xsl:apply-templates/>
|
7388
7606
|
</fo:block>
|
7389
7607
|
</xsl:template>
|
7390
7608
|
|
7391
7609
|
<xsl:template match="mn:fmt-deprecates">
|
7392
7610
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
7611
|
+
<xsl:call-template name="refine_deprecates-style"/>
|
7393
7612
|
<xsl:apply-templates/>
|
7394
7613
|
</fo:block>
|
7395
7614
|
</xsl:template>
|
7396
7615
|
|
7397
|
-
<xsl:template name="setStyle_preferred">
|
7398
|
-
<xsl:if test="mn:strong">
|
7399
|
-
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
7400
|
-
</xsl:if>
|
7401
|
-
</xsl:template>
|
7402
|
-
|
7403
7616
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
7404
7617
|
<!-- in metanorma xml preferred terms delimited by semicolons -->
|
7405
7618
|
<xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
|
@@ -7409,6 +7622,7 @@
|
|
7409
7622
|
|
7410
7623
|
<xsl:template match="mn:fmt-related">
|
7411
7624
|
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
7625
|
+
<xsl:call-template name="refine_related-block-style"/>
|
7412
7626
|
<xsl:apply-templates/>
|
7413
7627
|
</fo:block>
|
7414
7628
|
</xsl:template>
|
@@ -7423,6 +7637,7 @@
|
|
7423
7637
|
<!-- ========== -->
|
7424
7638
|
<xsl:template match="mn:fmt-definition">
|
7425
7639
|
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
7640
|
+
<xsl:call-template name="refine_definition-style"/>
|
7426
7641
|
<xsl:apply-templates/>
|
7427
7642
|
</fo:block>
|
7428
7643
|
</xsl:template>
|
@@ -7469,6 +7684,9 @@
|
|
7469
7684
|
<xsl:attribute-set name="example-body-style">
|
7470
7685
|
</xsl:attribute-set> <!-- example-body-style -->
|
7471
7686
|
|
7687
|
+
<xsl:template name="refine_example-body-style">
|
7688
|
+
</xsl:template>
|
7689
|
+
|
7472
7690
|
<xsl:attribute-set name="example-name-style">
|
7473
7691
|
<xsl:attribute name="font-style">italic</xsl:attribute>
|
7474
7692
|
</xsl:attribute-set> <!-- example-name-style -->
|
@@ -7514,6 +7732,8 @@
|
|
7514
7732
|
<xsl:when test="contains($element, 'block')">
|
7515
7733
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
7516
7734
|
|
7735
|
+
<xsl:call-template name="refine_example-p-style"/>
|
7736
|
+
|
7517
7737
|
<xsl:apply-templates/>
|
7518
7738
|
</fo:block>
|
7519
7739
|
</xsl:when>
|
@@ -7565,6 +7785,7 @@
|
|
7565
7785
|
</fo:block>
|
7566
7786
|
|
7567
7787
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
7788
|
+
<xsl:call-template name="refine_example-body-style"/>
|
7568
7789
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
7569
7790
|
<xsl:variable name="example_body">
|
7570
7791
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
@@ -7627,6 +7848,7 @@
|
|
7627
7848
|
<xsl:if test="*[not(self::mn:fmt-name)][position() > 1]">
|
7628
7849
|
<!-- display further elements in blocks -->
|
7629
7850
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
7851
|
+
<xsl:call-template name="refine_example-body-style"/>
|
7630
7852
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
7631
7853
|
<xsl:apply-templates select="*[not(self::mn:fmt-name)][position() > 1]">
|
7632
7854
|
<xsl:with-param name="fo_element" select="'block'"/>
|
@@ -7907,6 +8129,9 @@
|
|
7907
8129
|
<!-- <xsl:attribute name="padding-right">2.5mm</xsl:attribute> -->
|
7908
8130
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
7909
8131
|
|
8132
|
+
<xsl:template name="refine_table-fn-number-style">
|
8133
|
+
</xsl:template>
|
8134
|
+
|
7910
8135
|
<xsl:attribute-set name="table-fmt-fn-label-style">
|
7911
8136
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
7912
8137
|
</xsl:attribute-set> <!-- table-fmt-fn-label-style -->
|
@@ -7914,30 +8139,12 @@
|
|
7914
8139
|
<xsl:template name="refine_table-fmt-fn-label-style">
|
7915
8140
|
</xsl:template>
|
7916
8141
|
|
7917
|
-
<xsl:attribute-set name="fn-container-body-style">
|
7918
|
-
<xsl:attribute name="text-indent">0</xsl:attribute>
|
7919
|
-
<xsl:attribute name="start-indent">0</xsl:attribute>
|
7920
|
-
</xsl:attribute-set>
|
7921
|
-
|
7922
8142
|
<xsl:attribute-set name="table-fn-body-style">
|
7923
8143
|
</xsl:attribute-set>
|
7924
8144
|
|
7925
|
-
<xsl:
|
7926
|
-
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
7927
|
-
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
7928
|
-
|
7929
|
-
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
7930
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
7931
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
7932
|
-
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
7933
|
-
|
7934
|
-
<xsl:template name="refine_figure-fmt-fn-label-style">
|
8145
|
+
<xsl:template name="refine_table-fn-body-style">
|
7935
8146
|
</xsl:template>
|
7936
8147
|
|
7937
|
-
<xsl:attribute-set name="figure-fn-body-style">
|
7938
|
-
<xsl:attribute name="text-align">justify</xsl:attribute>
|
7939
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
7940
|
-
</xsl:attribute-set>
|
7941
8148
|
<!-- ========================== -->
|
7942
8149
|
<!-- END Table styles -->
|
7943
8150
|
<!-- ========================== -->
|
@@ -9231,6 +9438,7 @@
|
|
9231
9438
|
</xsl:apply-templates>
|
9232
9439
|
|
9233
9440
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
9441
|
+
<xsl:call-template name="refine_table-fn-body-style"/>
|
9234
9442
|
<!-- <xsl:copy-of select="./node()"/> -->
|
9235
9443
|
<xsl:apply-templates/>
|
9236
9444
|
</fo:inline>
|
@@ -9249,6 +9457,7 @@
|
|
9249
9457
|
<xsl:param name="process">false</xsl:param>
|
9250
9458
|
<xsl:if test="$process = 'true'">
|
9251
9459
|
<fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
|
9460
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
9252
9461
|
|
9253
9462
|
<!-- tab is padding-right -->
|
9254
9463
|
<xsl:apply-templates select=".//mn:tab">
|
@@ -10124,9 +10333,18 @@
|
|
10124
10333
|
<xsl:attribute-set name="dl-block-style">
|
10125
10334
|
</xsl:attribute-set>
|
10126
10335
|
|
10336
|
+
<xsl:template name="refine_dl-block-style">
|
10337
|
+
<xsl:if test="@key = 'true' and ancestor::mn:figure">
|
10338
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
10339
|
+
</xsl:if>
|
10340
|
+
</xsl:template>
|
10341
|
+
|
10127
10342
|
<xsl:attribute-set name="dt-row-style">
|
10128
10343
|
</xsl:attribute-set>
|
10129
10344
|
|
10345
|
+
<xsl:template name="refine_dt-row-style">
|
10346
|
+
</xsl:template>
|
10347
|
+
|
10130
10348
|
<xsl:attribute-set name="dt-cell-style">
|
10131
10349
|
</xsl:attribute-set>
|
10132
10350
|
|
@@ -10147,6 +10365,9 @@
|
|
10147
10365
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
10148
10366
|
</xsl:attribute-set> <!-- dl-name-style -->
|
10149
10367
|
|
10368
|
+
<xsl:template name="refine_dl-name-style">
|
10369
|
+
</xsl:template>
|
10370
|
+
|
10150
10371
|
<xsl:attribute-set name="dd-cell-style">
|
10151
10372
|
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
10152
10373
|
</xsl:attribute-set>
|
@@ -10185,9 +10406,7 @@
|
|
10185
10406
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
10186
10407
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
10187
10408
|
|
10188
|
-
<xsl:
|
10189
|
-
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
10190
|
-
</xsl:if>
|
10409
|
+
<xsl:call-template name="refine_dl-block-style"/>
|
10191
10410
|
|
10192
10411
|
<xsl:call-template name="setBlockSpanAll"/>
|
10193
10412
|
<xsl:if test="not(ancestor::mn:li)">
|
@@ -10485,6 +10704,8 @@
|
|
10485
10704
|
<xsl:if test="$process = 'true'">
|
10486
10705
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
10487
10706
|
|
10707
|
+
<xsl:call-template name="refine_dl-name-style"/>
|
10708
|
+
|
10488
10709
|
<xsl:apply-templates/>
|
10489
10710
|
</fo:block>
|
10490
10711
|
</xsl:if>
|
@@ -10673,6 +10894,8 @@
|
|
10673
10894
|
<xsl:param name="split_keep-within-line"/>
|
10674
10895
|
|
10675
10896
|
<fo:table-row xsl:use-attribute-sets="dt-row-style">
|
10897
|
+
<xsl:call-template name="refine_dt-row-style"/>
|
10898
|
+
|
10676
10899
|
<xsl:call-template name="insert_dt_cell">
|
10677
10900
|
<xsl:with-param name="key_iso" select="$key_iso"/>
|
10678
10901
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
@@ -10882,15 +11105,22 @@
|
|
10882
11105
|
<xsl:attribute-set name="appendix-style">
|
10883
11106
|
</xsl:attribute-set>
|
10884
11107
|
|
11108
|
+
<xsl:template name="refine_appendix-style">
|
11109
|
+
</xsl:template>
|
11110
|
+
|
10885
11111
|
<xsl:attribute-set name="appendix-example-style">
|
10886
11112
|
</xsl:attribute-set>
|
10887
11113
|
|
11114
|
+
<xsl:template name="refine_appendix-example-style">
|
11115
|
+
</xsl:template>
|
11116
|
+
|
10888
11117
|
<!-- ======================== -->
|
10889
11118
|
<!-- Appendix processing -->
|
10890
11119
|
<!-- ======================== -->
|
10891
11120
|
<xsl:template match="mn:appendix">
|
10892
11121
|
<xsl:call-template name="setNamedDestination"/>
|
10893
11122
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
11123
|
+
<xsl:call-template name="refine_appendix-style"/>
|
10894
11124
|
<xsl:apply-templates select="mn:fmt-title"/>
|
10895
11125
|
</fo:block>
|
10896
11126
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
|
@@ -10909,13 +11139,23 @@
|
|
10909
11139
|
<xsl:template match="mn:appendix//mn:example" priority="2">
|
10910
11140
|
<xsl:call-template name="setNamedDestination"/>
|
10911
11141
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
11142
|
+
<xsl:call-template name="refine_appendix-example-style"/>
|
10912
11143
|
<xsl:apply-templates select="mn:fmt-name"/>
|
10913
11144
|
</fo:block>
|
10914
11145
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
10915
11146
|
</xsl:template>
|
10916
11147
|
|
10917
11148
|
<xsl:attribute-set name="xref-style">
|
10918
|
-
</xsl:attribute-set>
|
11149
|
+
</xsl:attribute-set> <!-- xref-style -->
|
11150
|
+
|
11151
|
+
<xsl:template name="refine_xref-style">
|
11152
|
+
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[self::mn:table or self::mn:dl])">
|
11153
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
11154
|
+
</xsl:if>
|
11155
|
+
<xsl:if test="parent::mn:add">
|
11156
|
+
<xsl:call-template name="append_add-style"/>
|
11157
|
+
</xsl:if>
|
11158
|
+
</xsl:template> <!-- refine_xref-style -->
|
10919
11159
|
|
10920
11160
|
<xsl:template match="mn:fmt-xref">
|
10921
11161
|
<xsl:call-template name="insert_basic_link">
|
@@ -10924,12 +11164,8 @@
|
|
10924
11164
|
<xsl:call-template name="getAltText"/>
|
10925
11165
|
</xsl:variable>
|
10926
11166
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
|
10927
|
-
<xsl:
|
10928
|
-
|
10929
|
-
</xsl:if>
|
10930
|
-
<xsl:if test="parent::mn:add">
|
10931
|
-
<xsl:call-template name="append_add-style"/>
|
10932
|
-
</xsl:if>
|
11167
|
+
<xsl:call-template name="refine_xref-style"/>
|
11168
|
+
|
10933
11169
|
<xsl:apply-templates/>
|
10934
11170
|
</fo:basic-link>
|
10935
11171
|
</xsl:with-param>
|
@@ -11046,20 +11282,20 @@
|
|
11046
11282
|
<xsl:attribute-set name="note-style">
|
11047
11283
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
11048
11284
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
11049
|
-
</xsl:attribute-set>
|
11285
|
+
</xsl:attribute-set> <!-- note-style -->
|
11050
11286
|
|
11051
11287
|
<xsl:template name="refine_note-style">
|
11052
11288
|
<xsl:if test="parent::mn:li">
|
11053
11289
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
11054
11290
|
<xsl:attribute name="margin-bottom">4pt</xsl:attribute>
|
11055
11291
|
</xsl:if>
|
11056
|
-
</xsl:template>
|
11292
|
+
</xsl:template> <!-- refine_note-style -->
|
11057
11293
|
|
11058
11294
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
11059
11295
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
11060
11296
|
|
11061
11297
|
<xsl:attribute-set name="note-name-style">
|
11062
|
-
</xsl:attribute-set>
|
11298
|
+
</xsl:attribute-set> <!-- note-name-style -->
|
11063
11299
|
|
11064
11300
|
<xsl:template name="refine_note-name-style">
|
11065
11301
|
</xsl:template> <!-- refine_note-name-style -->
|
@@ -11077,19 +11313,22 @@
|
|
11077
11313
|
|
11078
11314
|
<xsl:attribute-set name="note-p-style">
|
11079
11315
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
11080
|
-
</xsl:attribute-set>
|
11316
|
+
</xsl:attribute-set> <!-- note-p-style -->
|
11317
|
+
|
11318
|
+
<xsl:template name="refine_note-p-style">
|
11319
|
+
</xsl:template>
|
11081
11320
|
|
11082
11321
|
<xsl:attribute-set name="termnote-style">
|
11083
11322
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
11084
11323
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
11085
|
-
</xsl:attribute-set>
|
11324
|
+
</xsl:attribute-set> <!-- termnote-style -->
|
11086
11325
|
|
11087
11326
|
<xsl:template name="refine_termnote-style">
|
11088
11327
|
</xsl:template> <!-- refine_termnote-style -->
|
11089
11328
|
|
11090
11329
|
<xsl:attribute-set name="termnote-name-style">
|
11091
11330
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
11092
|
-
</xsl:attribute-set>
|
11331
|
+
</xsl:attribute-set> <!-- termnote-name-style -->
|
11093
11332
|
|
11094
11333
|
<xsl:template name="refine_termnote-name-style">
|
11095
11334
|
</xsl:template>
|
@@ -11098,6 +11337,9 @@
|
|
11098
11337
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
11099
11338
|
</xsl:attribute-set>
|
11100
11339
|
|
11340
|
+
<xsl:template name="refine_termnote-p-style">
|
11341
|
+
</xsl:template>
|
11342
|
+
|
11101
11343
|
<!-- ====== -->
|
11102
11344
|
<!-- note -->
|
11103
11345
|
<!-- termnote -->
|
@@ -11164,11 +11406,13 @@
|
|
11164
11406
|
<xsl:choose>
|
11165
11407
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
11166
11408
|
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
11409
|
+
<xsl:call-template name="refine_note-p-style"/>
|
11167
11410
|
<xsl:apply-templates/>
|
11168
11411
|
</fo:inline>
|
11169
11412
|
</xsl:when>
|
11170
11413
|
<xsl:otherwise>
|
11171
11414
|
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
11415
|
+
<xsl:call-template name="refine_note-p-style"/>
|
11172
11416
|
<xsl:apply-templates/>
|
11173
11417
|
</fo:block>
|
11174
11418
|
</xsl:otherwise>
|
@@ -11272,11 +11516,13 @@
|
|
11272
11516
|
<xsl:choose>
|
11273
11517
|
<xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
|
11274
11518
|
<fo:inline xsl:use-attribute-sets="termnote-p-style">
|
11519
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
11275
11520
|
<xsl:apply-templates/>
|
11276
11521
|
</fo:inline>
|
11277
11522
|
</xsl:when>
|
11278
11523
|
<xsl:otherwise>
|
11279
11524
|
<fo:block xsl:use-attribute-sets="termnote-p-style">
|
11525
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
11280
11526
|
<xsl:apply-templates/>
|
11281
11527
|
</fo:block>
|
11282
11528
|
</xsl:otherwise>
|
@@ -11289,7 +11535,7 @@
|
|
11289
11535
|
<xsl:attribute-set name="quote-style">
|
11290
11536
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
11291
11537
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
11292
|
-
</xsl:attribute-set>
|
11538
|
+
</xsl:attribute-set> <!-- quote-style -->
|
11293
11539
|
|
11294
11540
|
<xsl:template name="refine_quote-style">
|
11295
11541
|
</xsl:template>
|
@@ -11298,6 +11544,9 @@
|
|
11298
11544
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
11299
11545
|
</xsl:attribute-set>
|
11300
11546
|
|
11547
|
+
<xsl:template name="refine_quote-source-style">
|
11548
|
+
</xsl:template>
|
11549
|
+
|
11301
11550
|
<!-- ====== -->
|
11302
11551
|
<!-- quote -->
|
11303
11552
|
<!-- source -->
|
@@ -11326,6 +11575,7 @@
|
|
11326
11575
|
</fo:block-container>
|
11327
11576
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
11328
11577
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
11578
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
11329
11579
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
11330
11580
|
<xsl:apply-templates select="mn:author"/>
|
11331
11581
|
<xsl:apply-templates select="mn:fmt-source"/>
|
@@ -11390,6 +11640,9 @@
|
|
11390
11640
|
<xsl:attribute-set name="figure-style">
|
11391
11641
|
</xsl:attribute-set>
|
11392
11642
|
|
11643
|
+
<xsl:template name="refine_figure-style">
|
11644
|
+
</xsl:template>
|
11645
|
+
|
11393
11646
|
<xsl:attribute-set name="figure-name-style">
|
11394
11647
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
11395
11648
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
@@ -11397,7 +11650,7 @@
|
|
11397
11650
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
11398
11651
|
<xsl:attribute name="margin-left">19mm</xsl:attribute>
|
11399
11652
|
<xsl:attribute name="text-indent">-19mm</xsl:attribute>
|
11400
|
-
</xsl:attribute-set>
|
11653
|
+
</xsl:attribute-set> <!-- figure-name-style -->
|
11401
11654
|
|
11402
11655
|
<xsl:template name="refine_figure-name-style">
|
11403
11656
|
</xsl:template> <!-- refine_figure-name-style -->
|
@@ -11405,7 +11658,7 @@
|
|
11405
11658
|
<xsl:attribute-set name="image-style">
|
11406
11659
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
11407
11660
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
11408
|
-
</xsl:attribute-set>
|
11661
|
+
</xsl:attribute-set> <!-- image-style -->
|
11409
11662
|
|
11410
11663
|
<xsl:template name="refine_image-style">
|
11411
11664
|
</xsl:template>
|
@@ -11415,14 +11668,51 @@
|
|
11415
11668
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
11416
11669
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
11417
11670
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
11418
|
-
</xsl:attribute-set>
|
11671
|
+
</xsl:attribute-set> <!-- image-graphic-style -->
|
11672
|
+
|
11673
|
+
<xsl:template name="refine_image-graphic-style">
|
11674
|
+
</xsl:template>
|
11419
11675
|
|
11420
11676
|
<xsl:attribute-set name="figure-source-style">
|
11421
11677
|
</xsl:attribute-set>
|
11422
11678
|
|
11679
|
+
<xsl:template name="refine_figure-source-style">
|
11680
|
+
</xsl:template>
|
11681
|
+
|
11423
11682
|
<xsl:attribute-set name="figure-pseudocode-p-style">
|
11424
11683
|
</xsl:attribute-set>
|
11425
11684
|
|
11685
|
+
<xsl:template name="refine_figure-pseudocode-p-style">
|
11686
|
+
</xsl:template>
|
11687
|
+
|
11688
|
+
<xsl:attribute-set name="figure-fn-number-style">
|
11689
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
11690
|
+
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
11691
|
+
|
11692
|
+
<xsl:template name="refine_figure-fn-number-style">
|
11693
|
+
</xsl:template>
|
11694
|
+
|
11695
|
+
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
11696
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
11697
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
11698
|
+
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
11699
|
+
|
11700
|
+
<xsl:template name="refine_figure-fmt-fn-label-style">
|
11701
|
+
</xsl:template>
|
11702
|
+
|
11703
|
+
<xsl:attribute-set name="figure-fn-body-style">
|
11704
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
11705
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
11706
|
+
</xsl:attribute-set>
|
11707
|
+
|
11708
|
+
<xsl:template name="refine_figure-fn-body-style">
|
11709
|
+
<xsl:variable name="key_iso">
|
11710
|
+
</xsl:variable>
|
11711
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
11712
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
11713
|
+
</xsl:if>
|
11714
|
+
</xsl:template>
|
11715
|
+
|
11426
11716
|
<!-- ============================ -->
|
11427
11717
|
<!-- figure's footnotes rendering -->
|
11428
11718
|
<!-- ============================ -->
|
@@ -11535,9 +11825,8 @@
|
|
11535
11825
|
</fo:table-cell>
|
11536
11826
|
<fo:table-cell>
|
11537
11827
|
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
11538
|
-
<xsl:
|
11539
|
-
|
11540
|
-
</xsl:if>
|
11828
|
+
<xsl:call-template name="refine_figure-fn-body-style"/>
|
11829
|
+
|
11541
11830
|
<!-- <xsl:copy-of select="./node()"/> -->
|
11542
11831
|
<xsl:apply-templates/>
|
11543
11832
|
</fo:block>
|
@@ -11555,6 +11844,7 @@
|
|
11555
11844
|
<xsl:param name="process">false</xsl:param>
|
11556
11845
|
<xsl:if test="$process = 'true'">
|
11557
11846
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
|
11847
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
11558
11848
|
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
11559
11849
|
|
11560
11850
|
<!-- tab is padding-right -->
|
@@ -11592,6 +11882,7 @@
|
|
11592
11882
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
11593
11883
|
</xsl:if>
|
11594
11884
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
|
11885
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
11595
11886
|
<!-- <xsl:value-of select="@reference"/> -->
|
11596
11887
|
<xsl:apply-templates/>
|
11597
11888
|
</fo:inline>
|
@@ -11637,6 +11928,8 @@
|
|
11637
11928
|
|
11638
11929
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
11639
11930
|
|
11931
|
+
<xsl:call-template name="refine_figure-style"/>
|
11932
|
+
|
11640
11933
|
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
11641
11934
|
<xsl:call-template name="setIDforNamedDestination"/>
|
11642
11935
|
</xsl:for-each>
|
@@ -11680,6 +11973,7 @@
|
|
11680
11973
|
|
11681
11974
|
<xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
|
11682
11975
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
11976
|
+
<xsl:call-template name="refine_figure-pseudocode-p-style"/>
|
11683
11977
|
<xsl:apply-templates/>
|
11684
11978
|
</fo:block>
|
11685
11979
|
</xsl:template>
|
@@ -11809,6 +12103,8 @@
|
|
11809
12103
|
</xsl:variable>
|
11810
12104
|
<xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
|
11811
12105
|
|
12106
|
+
<xsl:call-template name="refine_image-graphic-style"/>
|
12107
|
+
|
11812
12108
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
|
11813
12109
|
<xsl:variable name="scale">
|
11814
12110
|
<xsl:call-template name="getImageScale">
|
@@ -12509,6 +12805,9 @@
|
|
12509
12805
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
12510
12806
|
</xsl:attribute-set> <!-- formula-style -->
|
12511
12807
|
|
12808
|
+
<xsl:template name="refine_formula-style">
|
12809
|
+
</xsl:template>
|
12810
|
+
|
12512
12811
|
<xsl:attribute-set name="formula-stem-block-style">
|
12513
12812
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
12514
12813
|
</xsl:attribute-set> <!-- formula-stem-block-style -->
|
@@ -12580,6 +12879,8 @@
|
|
12580
12879
|
<xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
|
12581
12880
|
<fo:block xsl:use-attribute-sets="formula-style">
|
12582
12881
|
|
12882
|
+
<xsl:call-template name="refine_formula-style"/>
|
12883
|
+
|
12583
12884
|
<fo:table table-layout="fixed" width="100%">
|
12584
12885
|
<fo:table-column column-width="95%"/>
|
12585
12886
|
<fo:table-column column-width="5%"/>
|
@@ -13029,6 +13330,9 @@
|
|
13029
13330
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
13030
13331
|
</xsl:attribute-set> <!-- list-name-style -->
|
13031
13332
|
|
13333
|
+
<xsl:template name="refine_list-name-style">
|
13334
|
+
</xsl:template>
|
13335
|
+
|
13032
13336
|
<xsl:attribute-set name="list-item-style">
|
13033
13337
|
</xsl:attribute-set>
|
13034
13338
|
|
@@ -13328,6 +13632,7 @@
|
|
13328
13632
|
<xsl:param name="process">false</xsl:param>
|
13329
13633
|
<xsl:if test="$process = 'true'">
|
13330
13634
|
<fo:block xsl:use-attribute-sets="list-name-style">
|
13635
|
+
<xsl:call-template name="refine_list-name-style"/>
|
13331
13636
|
<xsl:apply-templates/>
|
13332
13637
|
</fo:block>
|
13333
13638
|
</xsl:if>
|
@@ -13388,27 +13693,48 @@
|
|
13388
13693
|
<!-- END Lists processing -->
|
13389
13694
|
<!-- ===================================== -->
|
13390
13695
|
|
13696
|
+
<xsl:attribute-set name="footnote-separator-leader-style">
|
13697
|
+
</xsl:attribute-set>
|
13698
|
+
|
13699
|
+
<xsl:template name="refine_footnote-separator-leader-style">
|
13700
|
+
</xsl:template>
|
13701
|
+
|
13702
|
+
<xsl:attribute-set name="fn-container-body-style">
|
13703
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
13704
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
13705
|
+
</xsl:attribute-set>
|
13706
|
+
|
13707
|
+
<xsl:template name="refine_fn-container-body-style">
|
13708
|
+
</xsl:template>
|
13709
|
+
|
13391
13710
|
<xsl:attribute-set name="fn-reference-style">
|
13392
13711
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
13393
13712
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
13394
13713
|
<xsl:attribute name="font-size">70%</xsl:attribute>
|
13395
13714
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
13396
13715
|
<xsl:attribute name="font-style">italic</xsl:attribute>
|
13397
|
-
|
13398
|
-
</xsl:attribute-set>
|
13716
|
+
</xsl:attribute-set> <!-- fn-reference-style -->
|
13399
13717
|
|
13400
13718
|
<xsl:template name="refine_fn-reference-style">
|
13719
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
13720
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
13401
13721
|
</xsl:template> <!-- refine_fn-reference-style -->
|
13402
13722
|
|
13403
13723
|
<xsl:attribute-set name="fn-style">
|
13404
13724
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
13405
13725
|
</xsl:attribute-set>
|
13406
13726
|
|
13727
|
+
<xsl:template name="refine_fn-style">
|
13728
|
+
</xsl:template>
|
13729
|
+
|
13407
13730
|
<xsl:attribute-set name="fn-num-style">
|
13408
13731
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
13409
13732
|
<xsl:attribute name="font-size">65%</xsl:attribute>
|
13410
13733
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
13411
|
-
</xsl:attribute-set>
|
13734
|
+
</xsl:attribute-set> <!-- fn-num-style -->
|
13735
|
+
|
13736
|
+
<xsl:template name="refine_fn-num-style">
|
13737
|
+
</xsl:template>
|
13412
13738
|
|
13413
13739
|
<xsl:attribute-set name="fn-body-style">
|
13414
13740
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
@@ -13419,7 +13745,7 @@
|
|
13419
13745
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
13420
13746
|
<xsl:attribute name="line-height">124%</xsl:attribute>
|
13421
13747
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
13422
|
-
</xsl:attribute-set>
|
13748
|
+
</xsl:attribute-set> <!-- fn-body-style" -->
|
13423
13749
|
|
13424
13750
|
<xsl:template name="refine_fn-body-style">
|
13425
13751
|
</xsl:template> <!-- refine_fn-body-style -->
|
@@ -13484,10 +13810,12 @@
|
|
13484
13810
|
<xsl:choose>
|
13485
13811
|
<xsl:when test="ancestor::mn:bibitem">
|
13486
13812
|
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
13813
|
+
<xsl:call-template name="refine_bibitem-note-fn-style"/>
|
13487
13814
|
</fn_styles>
|
13488
13815
|
</xsl:when>
|
13489
13816
|
<xsl:otherwise>
|
13490
13817
|
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
13818
|
+
<xsl:call-template name="refine_fn-num-style"/>
|
13491
13819
|
</fn_styles>
|
13492
13820
|
</xsl:otherwise>
|
13493
13821
|
</xsl:choose>
|
@@ -13497,9 +13825,12 @@
|
|
13497
13825
|
<xsl:copy-of select="."/>
|
13498
13826
|
</xsl:for-each>
|
13499
13827
|
|
13500
|
-
|
13828
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
13829
|
+
<!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
|
13501
13830
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
13502
|
-
</xsl:if>
|
13831
|
+
</xsl:if> -->
|
13832
|
+
|
13833
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
13503
13834
|
|
13504
13835
|
<xsl:call-template name="insert_basic_link">
|
13505
13836
|
<xsl:with-param name="element">
|
@@ -13522,10 +13853,12 @@
|
|
13522
13853
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
13523
13854
|
|
13524
13855
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
13856
|
+
<xsl:call-template name="refine_fn-style"/>
|
13525
13857
|
<xsl:copy-of select="$footnote_inline"/>
|
13526
13858
|
<fo:footnote-body role="Note">
|
13527
13859
|
|
13528
13860
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
13861
|
+
<xsl:call-template name="refine_fn-container-body-style"/>
|
13529
13862
|
|
13530
13863
|
<xsl:variable name="fn_block">
|
13531
13864
|
<xsl:call-template name="refine_fn-body-style"/>
|
@@ -13626,6 +13959,9 @@
|
|
13626
13959
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
13627
13960
|
</xsl:attribute-set> <!-- admonition-style -->
|
13628
13961
|
|
13962
|
+
<xsl:template name="refine_admonition-style">
|
13963
|
+
</xsl:template>
|
13964
|
+
|
13629
13965
|
<xsl:attribute-set name="admonition-container-style">
|
13630
13966
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
13631
13967
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -13633,6 +13969,9 @@
|
|
13633
13969
|
<xsl:attribute name="padding-top">3mm</xsl:attribute>
|
13634
13970
|
</xsl:attribute-set> <!-- admonition-container-style -->
|
13635
13971
|
|
13972
|
+
<xsl:template name="refine_admonition-container-style">
|
13973
|
+
</xsl:template>
|
13974
|
+
|
13636
13975
|
<xsl:attribute-set name="admonition-name-style">
|
13637
13976
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
13638
13977
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
@@ -13642,9 +13981,16 @@
|
|
13642
13981
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
13643
13982
|
</xsl:attribute-set> <!-- admonition-name-style -->
|
13644
13983
|
|
13984
|
+
<xsl:template name="refine_admonition-name-style">
|
13985
|
+
</xsl:template>
|
13986
|
+
|
13645
13987
|
<xsl:attribute-set name="admonition-p-style">
|
13646
13988
|
<xsl:attribute name="font-style">italic</xsl:attribute>
|
13647
13989
|
</xsl:attribute-set> <!-- admonition-p-style -->
|
13990
|
+
|
13991
|
+
<xsl:template name="refine_admonition-p-style">
|
13992
|
+
</xsl:template>
|
13993
|
+
|
13648
13994
|
<!-- end admonition -->
|
13649
13995
|
|
13650
13996
|
<!-- ================ -->
|
@@ -13654,12 +14000,18 @@
|
|
13654
14000
|
<xsl:call-template name="setNamedDestination"/>
|
13655
14001
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
13656
14002
|
|
14003
|
+
<xsl:call-template name="refine_admonition-style"/>
|
14004
|
+
|
13657
14005
|
<xsl:call-template name="setBlockSpanAll"/>
|
13658
14006
|
<fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
|
14007
|
+
|
14008
|
+
<xsl:call-template name="refine_admonition-container-style"/>
|
13659
14009
|
<fo:block xsl:use-attribute-sets="admonition-name-style">
|
14010
|
+
<xsl:call-template name="refine_admonition-name-style"/>
|
13660
14011
|
<xsl:call-template name="displayAdmonitionName"/>
|
13661
14012
|
</fo:block>
|
13662
14013
|
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
14014
|
+
<xsl:call-template name="refine_admonition-p-style"/>
|
13663
14015
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
13664
14016
|
</fo:block>
|
13665
14017
|
|
@@ -13713,6 +14065,7 @@
|
|
13713
14065
|
|
13714
14066
|
<xsl:template match="mn:admonition/mn:p">
|
13715
14067
|
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
14068
|
+
<xsl:call-template name="refine_admonition-p-style"/>
|
13716
14069
|
|
13717
14070
|
<xsl:apply-templates/>
|
13718
14071
|
</fo:block>
|
@@ -13722,6 +14075,13 @@
|
|
13722
14075
|
<!-- END Admonition -->
|
13723
14076
|
<!-- ================ -->
|
13724
14077
|
|
14078
|
+
<xsl:attribute-set name="references-non-normative-title-style">
|
14079
|
+
</xsl:attribute-set>
|
14080
|
+
|
14081
|
+
<xsl:template name="refine_references-non-normative-title-style">
|
14082
|
+
|
14083
|
+
</xsl:template>
|
14084
|
+
|
13725
14085
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
13726
14086
|
<xsl:attribute-set name="bibitem-normative-style">
|
13727
14087
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -13730,6 +14090,9 @@
|
|
13730
14090
|
<xsl:attribute name="line-height">115%</xsl:attribute>
|
13731
14091
|
</xsl:attribute-set> <!-- bibitem-normative-style -->
|
13732
14092
|
|
14093
|
+
<xsl:template name="refine_bibitem-normative-style">
|
14094
|
+
</xsl:template>
|
14095
|
+
|
13733
14096
|
<!-- bibitem in Normative References (references/@normative="true"), renders as list -->
|
13734
14097
|
<xsl:attribute-set name="bibitem-normative-list-style">
|
13735
14098
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
@@ -13737,9 +14100,15 @@
|
|
13737
14100
|
<xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
|
13738
14101
|
</xsl:attribute-set> <!-- bibitem-normative-list-style -->
|
13739
14102
|
|
14103
|
+
<xsl:template name="refine_bibitem-normative-list-style">
|
14104
|
+
</xsl:template>
|
14105
|
+
|
13740
14106
|
<xsl:attribute-set name="bibitem-non-normative-style">
|
13741
14107
|
</xsl:attribute-set> <!-- bibitem-non-normative-style -->
|
13742
14108
|
|
14109
|
+
<xsl:template name="refine_bibitem-non-normative-style">
|
14110
|
+
</xsl:template>
|
14111
|
+
|
13743
14112
|
<!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
|
13744
14113
|
<xsl:attribute-set name="bibitem-non-normative-list-style">
|
13745
14114
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
@@ -13747,17 +14116,29 @@
|
|
13747
14116
|
<xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
|
13748
14117
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
|
13749
14118
|
|
14119
|
+
<xsl:template name="refine_bibitem-non-normative-list-style">
|
14120
|
+
</xsl:template>
|
14121
|
+
|
13750
14122
|
<xsl:attribute-set name="bibitem-non-normative-list-item-style">
|
13751
14123
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
13752
14124
|
</xsl:attribute-set>
|
13753
14125
|
|
14126
|
+
<xsl:template name="refine_bibitem-non-normative-list-item-style">
|
14127
|
+
</xsl:template>
|
14128
|
+
|
13754
14129
|
<!-- bibitem in bibliography section (references/@normative="false"), list body -->
|
13755
14130
|
<xsl:attribute-set name="bibitem-normative-list-body-style">
|
13756
14131
|
</xsl:attribute-set>
|
13757
14132
|
|
14133
|
+
<xsl:template name="refine_bibitem-normative-list-body-style">
|
14134
|
+
</xsl:template>
|
14135
|
+
|
13758
14136
|
<xsl:attribute-set name="bibitem-non-normative-list-body-style">
|
13759
14137
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
|
13760
14138
|
|
14139
|
+
<xsl:template name="refine_bibitem-non-normative-list-body-style">
|
14140
|
+
</xsl:template>
|
14141
|
+
|
13761
14142
|
<!-- footnote reference number for bibitem, in the text -->
|
13762
14143
|
<xsl:attribute-set name="bibitem-note-fn-style">
|
13763
14144
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
@@ -13765,6 +14146,9 @@
|
|
13765
14146
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
13766
14147
|
</xsl:attribute-set> <!-- bibitem-note-fn-style -->
|
13767
14148
|
|
14149
|
+
<xsl:template name="refine_bibitem-note-fn-style">
|
14150
|
+
</xsl:template>
|
14151
|
+
|
13768
14152
|
<!-- footnote number on the page bottom -->
|
13769
14153
|
<xsl:attribute-set name="bibitem-note-fn-number-style">
|
13770
14154
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
@@ -13783,6 +14167,9 @@
|
|
13783
14167
|
<xsl:attribute name="line-height">120%</xsl:attribute>
|
13784
14168
|
</xsl:attribute-set> <!-- references-non-normative-style -->
|
13785
14169
|
|
14170
|
+
<xsl:template name="refine_references-non-normative-style">
|
14171
|
+
</xsl:template>
|
14172
|
+
|
13786
14173
|
<!-- ======================= -->
|
13787
14174
|
<!-- Bibliography rendering -->
|
13788
14175
|
<!-- ======================= -->
|
@@ -13824,6 +14211,7 @@
|
|
13824
14211
|
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
13825
14212
|
|
13826
14213
|
<fo:block xsl:use-attribute-sets="references-non-normative-style">
|
14214
|
+
<xsl:call-template name="refine_references-non-normative-style"/>
|
13827
14215
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
13828
14216
|
</fo:block>
|
13829
14217
|
</xsl:template> <!-- references -->
|
@@ -13837,17 +14225,20 @@
|
|
13837
14225
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
13838
14226
|
<xsl:call-template name="setNamedDestination"/>
|
13839
14227
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
14228
|
+
<xsl:call-template name="refine_bibitem-normative-style"/>
|
14229
|
+
|
13840
14230
|
<xsl:call-template name="processBibitem"/>
|
13841
14231
|
</fo:block>
|
13842
14232
|
|
13843
14233
|
</xsl:template> <!-- bibitem -->
|
13844
14234
|
|
13845
14235
|
<!-- Bibliography (non-normative references) -->
|
13846
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem
|
14236
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
13847
14237
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
13848
14238
|
<!-- start BIPM bibitem processing -->
|
13849
14239
|
<xsl:call-template name="setNamedDestination"/>
|
13850
14240
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
14241
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-style"/>
|
13851
14242
|
<fo:list-item>
|
13852
14243
|
<fo:list-item-label end-indent="label-end()">
|
13853
14244
|
<fo:block>
|
@@ -13871,12 +14262,17 @@
|
|
13871
14262
|
|
13872
14263
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
13873
14264
|
|
14265
|
+
<!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
|
14266
|
+
<xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
|
14267
|
+
|
13874
14268
|
<xsl:template name="insertListItem_Bibitem">
|
13875
14269
|
<xsl:choose>
|
13876
14270
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
13877
14271
|
<xsl:otherwise>
|
13878
14272
|
<xsl:call-template name="setNamedDestination"/>
|
13879
14273
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
14274
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
|
14275
|
+
|
13880
14276
|
<fo:list-item-label end-indent="label-end()">
|
13881
14277
|
<fo:block role="SKIP">
|
13882
14278
|
<fo:inline role="SKIP">
|
@@ -13887,16 +14283,18 @@
|
|
13887
14283
|
</fo:block>
|
13888
14284
|
</fo:list-item-label>
|
13889
14285
|
<fo:list-item-body start-indent="body-start()">
|
13890
|
-
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP"
|
14286
|
+
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
|
14287
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
|
13891
14288
|
<xsl:call-template name="processBibitem">
|
13892
14289
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
13893
14290
|
</xsl:call-template>
|
13894
14291
|
</fo:block>
|
14292
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
13895
14293
|
</fo:list-item-body>
|
13896
14294
|
</fo:list-item>
|
13897
14295
|
</xsl:otherwise>
|
13898
14296
|
</xsl:choose>
|
13899
|
-
<xsl:apply-templates select="following-sibling::*[
|
14297
|
+
<xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
|
13900
14298
|
<xsl:with-param name="skip">false</xsl:with-param>
|
13901
14299
|
</xsl:apply-templates>
|
13902
14300
|
</xsl:template>
|
@@ -13912,25 +14310,16 @@
|
|
13912
14310
|
<xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
|
13913
14311
|
</xsl:apply-templates>
|
13914
14312
|
<xsl:apply-templates select="mn:formattedref"/>
|
14313
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
13915
14314
|
<!-- end bibitem processing -->
|
13916
|
-
|
13917
|
-
<xsl:call-template name="processBibliographyNote"/>
|
13918
14315
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
13919
14316
|
|
13920
|
-
<xsl:template name="
|
13921
|
-
|
13922
|
-
|
13923
|
-
|
13924
|
-
<xsl:copy> <!-- skip @id -->
|
13925
|
-
<xsl:copy-of select="node()"/>
|
13926
|
-
</xsl:copy>
|
13927
|
-
</xsl:element>
|
13928
|
-
</xsl:variable>
|
13929
|
-
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
13930
|
-
<xsl:call-template name="note"/>
|
13931
|
-
</xsl:for-each> -->
|
14317
|
+
<xsl:template name="processBibitemFollowingNotes">
|
14318
|
+
<!-- current context is bibitem element -->
|
14319
|
+
<xsl:variable name="bibitem_id" select="@id"/>
|
14320
|
+
<xsl:for-each select="following-sibling::mn:note[preceding-sibling::mn:bibitem[1][@id = $bibitem_id] and preceding-sibling::*[1][self::mn:note or self::mn:bibitem]]">
|
13932
14321
|
<xsl:call-template name="note"/>
|
13933
|
-
</xsl:
|
14322
|
+
</xsl:for-each>
|
13934
14323
|
</xsl:template>
|
13935
14324
|
|
13936
14325
|
<xsl:template match="mn:title" mode="title">
|
@@ -14134,14 +14523,20 @@
|
|
14134
14523
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
14135
14524
|
<xsl:attribute name="margin-bottom">84pt</xsl:attribute>
|
14136
14525
|
<xsl:attribute name="margin-left">-18mm</xsl:attribute>
|
14137
|
-
</xsl:attribute-set>
|
14526
|
+
</xsl:attribute-set> <!-- indexsect-title-style -->
|
14527
|
+
|
14528
|
+
<xsl:template name="refine_indexsect-title-style">
|
14529
|
+
</xsl:template>
|
14138
14530
|
|
14139
14531
|
<xsl:attribute-set name="indexsect-clause-title-style">
|
14140
14532
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
14141
14533
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
14142
14534
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
14143
14535
|
<xsl:attribute name="margin-bottom">3pt</xsl:attribute>
|
14144
|
-
</xsl:attribute-set>
|
14536
|
+
</xsl:attribute-set> <!-- indexsect-clause-title-style -->
|
14537
|
+
|
14538
|
+
<xsl:template name="refine_indexsect-clause-title-style">
|
14539
|
+
</xsl:template>
|
14145
14540
|
<!-- End Index section styles -->
|
14146
14541
|
|
14147
14542
|
<!-- =================== -->
|
@@ -14335,6 +14730,7 @@
|
|
14335
14730
|
|
14336
14731
|
<xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
|
14337
14732
|
<fo:block xsl:use-attribute-sets="indexsect-title-style">
|
14733
|
+
<xsl:call-template name="refine_indexsect-title-style"/>
|
14338
14734
|
<!-- Index -->
|
14339
14735
|
<xsl:apply-templates/>
|
14340
14736
|
</fo:block>
|
@@ -14343,6 +14739,7 @@
|
|
14343
14739
|
<xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
|
14344
14740
|
<!-- Letter A, B, C, ... -->
|
14345
14741
|
<fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
|
14742
|
+
<xsl:call-template name="refine_indexsect-clause-title-style"/>
|
14346
14743
|
<xsl:apply-templates/>
|
14347
14744
|
</fo:block>
|
14348
14745
|
</xsl:template>
|
@@ -14385,13 +14782,31 @@
|
|
14385
14782
|
<!-- skip here, see the template 'fmt-review-start' -->
|
14386
14783
|
</xsl:when>
|
14387
14784
|
<xsl:otherwise>
|
14388
|
-
|
14389
|
-
|
14390
|
-
|
14391
|
-
|
14785
|
+
<xsl:choose>
|
14786
|
+
<xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
|
14787
|
+
<fo:block font-size="1pt" line-height="0.1">
|
14788
|
+
<xsl:call-template name="fo_inline_bookmark">
|
14789
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
14790
|
+
</xsl:call-template>
|
14791
|
+
</fo:block>
|
14792
|
+
</xsl:when>
|
14793
|
+
<xsl:otherwise>
|
14794
|
+
<xsl:call-template name="fo_inline_bookmark">
|
14795
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
14796
|
+
</xsl:call-template>
|
14797
|
+
</xsl:otherwise>
|
14798
|
+
</xsl:choose>
|
14392
14799
|
</xsl:otherwise>
|
14393
14800
|
</xsl:choose>
|
14394
14801
|
</xsl:template>
|
14802
|
+
|
14803
|
+
<xsl:template name="fo_inline_bookmark">
|
14804
|
+
<xsl:param name="bookmark_id"/>
|
14805
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
14806
|
+
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
|
14807
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
14808
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
14809
|
+
</xsl:template>
|
14395
14810
|
<!-- =================== -->
|
14396
14811
|
<!-- End of Index processing -->
|
14397
14812
|
<!-- =================== -->
|
@@ -14557,12 +14972,18 @@
|
|
14557
14972
|
<xsl:attribute-set name="toc-leader-style">
|
14558
14973
|
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
14559
14974
|
|
14975
|
+
<xsl:template name="refine_toc-leader-style">
|
14976
|
+
</xsl:template>
|
14977
|
+
|
14560
14978
|
<xsl:attribute-set name="toc-pagenumber-style">
|
14561
14979
|
<xsl:attribute name="font-family">Arial</xsl:attribute>
|
14562
14980
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
14563
14981
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
14564
14982
|
</xsl:attribute-set>
|
14565
14983
|
|
14984
|
+
<xsl:template name="refine_toc-pagenumber-style">
|
14985
|
+
</xsl:template>
|
14986
|
+
|
14566
14987
|
<!-- List of Figures, Tables -->
|
14567
14988
|
<xsl:attribute-set name="toc-listof-title-style">
|
14568
14989
|
<xsl:attribute name="font-family">Arial</xsl:attribute>
|
@@ -14578,12 +14999,18 @@
|
|
14578
14999
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
14579
15000
|
</xsl:attribute-set>
|
14580
15001
|
|
15002
|
+
<xsl:template name="refine_toc-listof-item-block-style">
|
15003
|
+
</xsl:template>
|
15004
|
+
|
14581
15005
|
<xsl:attribute-set name="toc-listof-item-style">
|
14582
15006
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
14583
15007
|
<xsl:attribute name="font-size">10.5pt</xsl:attribute>
|
14584
15008
|
<xsl:attribute name="margin-left">8mm</xsl:attribute>
|
14585
15009
|
</xsl:attribute-set>
|
14586
15010
|
|
15011
|
+
<xsl:template name="refine_toc-listof-item-style">
|
15012
|
+
</xsl:template>
|
15013
|
+
|
14587
15014
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
14588
15015
|
<xsl:variable name="nodes_preface_">
|
14589
15016
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
@@ -15706,23 +16133,55 @@
|
|
15706
16133
|
<!-- Ruby text (CJK languages) rendering -->
|
15707
16134
|
<!-- ===================================== -->
|
15708
16135
|
<!-- ===================================== -->
|
16136
|
+
|
16137
|
+
<xsl:attribute-set name="ruby-style">
|
16138
|
+
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
16139
|
+
<xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
|
16140
|
+
</xsl:attribute-set>
|
16141
|
+
|
16142
|
+
<xsl:template name="refine_ruby-style">
|
16143
|
+
<xsl:if test="not(ancestor::mn:ruby)">
|
16144
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
16145
|
+
</xsl:if>
|
16146
|
+
<xsl:variable name="rt_text" select="mn:rt"/>
|
16147
|
+
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
16148
|
+
<!-- Example: width="2em" -->
|
16149
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
16150
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
16151
|
+
<xsl:variable name="text_width">
|
16152
|
+
<xsl:choose>
|
16153
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
16154
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
16155
|
+
</xsl:choose>
|
16156
|
+
</xsl:variable>
|
16157
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
16158
|
+
</xsl:template> <!-- refine_ruby-style -->
|
16159
|
+
|
16160
|
+
<xsl:attribute-set name="rb-style">
|
16161
|
+
<xsl:attribute name="line-height">1em</xsl:attribute>
|
16162
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
16163
|
+
</xsl:attribute-set>
|
16164
|
+
|
16165
|
+
<xsl:template name="refine_rb-style">
|
16166
|
+
</xsl:template>
|
16167
|
+
|
16168
|
+
<xsl:attribute-set name="rt-style">
|
16169
|
+
<xsl:attribute name="font-size">0.5em</xsl:attribute>
|
16170
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
16171
|
+
<xsl:attribute name="line-height">1.2em</xsl:attribute>
|
16172
|
+
<xsl:attribute name="space-before">-1.4em</xsl:attribute>
|
16173
|
+
<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
|
16174
|
+
</xsl:attribute-set>
|
16175
|
+
|
16176
|
+
<xsl:template name="refine_rt-style">
|
16177
|
+
<xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
|
16178
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
16179
|
+
</xsl:if>
|
16180
|
+
</xsl:template>
|
16181
|
+
|
15709
16182
|
<xsl:template match="mn:ruby">
|
15710
|
-
<fo:inline-container
|
15711
|
-
<xsl:
|
15712
|
-
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
15713
|
-
</xsl:if>
|
15714
|
-
<xsl:variable name="rt_text" select="mn:rt"/>
|
15715
|
-
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
15716
|
-
<!-- Example: width="2em" -->
|
15717
|
-
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
15718
|
-
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
15719
|
-
<xsl:variable name="text_width">
|
15720
|
-
<xsl:choose>
|
15721
|
-
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
15722
|
-
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
15723
|
-
</xsl:choose>
|
15724
|
-
</xsl:variable>
|
15725
|
-
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
16183
|
+
<fo:inline-container xsl:use-attribute-sets="ruby-style">
|
16184
|
+
<xsl:call-template name="refine_ruby-style"/>
|
15726
16185
|
|
15727
16186
|
<xsl:choose>
|
15728
16187
|
<xsl:when test="ancestor::mn:ruby">
|
@@ -15740,17 +16199,14 @@
|
|
15740
16199
|
</xsl:template>
|
15741
16200
|
|
15742
16201
|
<xsl:template match="mn:rb">
|
15743
|
-
<fo:block
|
16202
|
+
<fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
|
15744
16203
|
</xsl:template>
|
15745
16204
|
|
15746
16205
|
<xsl:template match="mn:rt">
|
15747
|
-
<fo:block
|
15748
|
-
<xsl:
|
15749
|
-
<xsl:attribute name="space-before">0em</xsl:attribute>
|
15750
|
-
</xsl:if>
|
16206
|
+
<fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
|
16207
|
+
<xsl:call-template name="refine_rt-style"/>
|
15751
16208
|
<xsl:apply-templates/>
|
15752
16209
|
</fo:block>
|
15753
|
-
|
15754
16210
|
</xsl:template>
|
15755
16211
|
|
15756
16212
|
<!-- ===================================== -->
|
@@ -15759,6 +16215,18 @@
|
|
15759
16215
|
<!-- ===================================== -->
|
15760
16216
|
<!-- ===================================== -->
|
15761
16217
|
|
16218
|
+
<xsl:attribute-set name="annex-title-style">
|
16219
|
+
</xsl:attribute-set>
|
16220
|
+
|
16221
|
+
<xsl:template name="refine_annex-title-style">
|
16222
|
+
</xsl:template>
|
16223
|
+
|
16224
|
+
<xsl:attribute-set name="p-zzSTDTitle1-style">
|
16225
|
+
</xsl:attribute-set>
|
16226
|
+
|
16227
|
+
<xsl:template name="refine_p-zzSTDTitle1-style">
|
16228
|
+
</xsl:template>
|
16229
|
+
|
15762
16230
|
<xsl:template name="processPrefaceSectionsDefault">
|
15763
16231
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
15764
16232
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -16315,11 +16783,35 @@
|
|
16315
16783
|
|
16316
16784
|
<xsl:template match="mn:svgmap"/>
|
16317
16785
|
|
16786
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
16787
|
+
|
16318
16788
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
16319
16789
|
<xsl:template match="*[local-name() = 'lang_none']">
|
16320
16790
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
16321
16791
|
</xsl:template>
|
16322
16792
|
|
16793
|
+
<xsl:template name="addTagElementT">
|
16794
|
+
<xsl:variable name="title_">
|
16795
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
16796
|
+
</xsl:variable>
|
16797
|
+
<xsl:variable name="title__">
|
16798
|
+
<xsl:for-each select="xalan:nodeset($title_)/*/node()">
|
16799
|
+
<xsl:choose>
|
16800
|
+
<xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
|
16801
|
+
<xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
|
16802
|
+
</xsl:choose>
|
16803
|
+
</xsl:for-each>
|
16804
|
+
</xsl:variable>
|
16805
|
+
<xsl:variable name="title" select="normalize-space($title__)"/>
|
16806
|
+
<xsl:if test="$title != ''">
|
16807
|
+
<xsl:attribute name="fox:title">
|
16808
|
+
<xsl:if test="ancestor::mn:sections">
|
16809
|
+
<xsl:text>Section </xsl:text>
|
16810
|
+
</xsl:if>
|
16811
|
+
<xsl:value-of select="$title"/></xsl:attribute>
|
16812
|
+
</xsl:if>
|
16813
|
+
</xsl:template>
|
16814
|
+
|
16323
16815
|
<xsl:template name="replaceChar">
|
16324
16816
|
<xsl:param name="text"/>
|
16325
16817
|
<xsl:param name="replace"/>
|
@@ -17110,6 +17602,13 @@
|
|
17110
17602
|
<xsl:with-param name="default" select="$text_align_default"/>
|
17111
17603
|
</xsl:call-template>
|
17112
17604
|
<xsl:call-template name="setKeepAttributes"/>
|
17605
|
+
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
17606
|
+
<xsl:variable name="styles">
|
17607
|
+
<xsl:apply-templates select="*[1]"/>
|
17608
|
+
</xsl:variable>
|
17609
|
+
<!-- move attribute line-height from inline to block -->
|
17610
|
+
<xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
|
17611
|
+
</xsl:if>
|
17113
17612
|
</xsl:template>
|
17114
17613
|
|
17115
17614
|
<xsl:template name="setKeepAttributes">
|
@@ -17135,34 +17634,41 @@
|
|
17135
17634
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
17136
17635
|
<fo:block>
|
17137
17636
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
17138
|
-
|
17139
|
-
|
17140
|
-
|
17141
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
17142
|
-
<xsl:call-template name="getSVG"/>
|
17143
|
-
</fo:instream-foreign-object>
|
17144
|
-
</xsl:when>
|
17145
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
17146
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
17147
|
-
</xsl:when>
|
17148
|
-
<xsl:otherwise> <!-- bitmap image -->
|
17149
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
17150
|
-
<xsl:if test="$coverimage_src != ''">
|
17151
|
-
<xsl:variable name="coverpage">
|
17152
|
-
<xsl:call-template name="getImageURL">
|
17153
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
17154
|
-
</xsl:call-template>
|
17155
|
-
</xsl:variable>
|
17156
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
17157
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
17158
|
-
</xsl:if>
|
17159
|
-
</xsl:otherwise>
|
17160
|
-
</xsl:choose>
|
17637
|
+
|
17638
|
+
<xsl:call-template name="insertPageImage"/>
|
17639
|
+
|
17161
17640
|
</xsl:for-each>
|
17162
17641
|
</fo:block>
|
17163
17642
|
</fo:block-container>
|
17164
17643
|
</xsl:template>
|
17165
17644
|
|
17645
|
+
<xsl:template name="insertPageImage">
|
17646
|
+
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
17647
|
+
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
17648
|
+
<xsl:choose>
|
17649
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
17650
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
17651
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
17652
|
+
<xsl:call-template name="getSVG"/>
|
17653
|
+
</fo:instream-foreign-object>
|
17654
|
+
</xsl:when>
|
17655
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
17656
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
17657
|
+
</xsl:when>
|
17658
|
+
<xsl:otherwise> <!-- bitmap image -->
|
17659
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
17660
|
+
<xsl:if test="$coverimage_src != ''">
|
17661
|
+
<xsl:variable name="coverpage">
|
17662
|
+
<xsl:call-template name="getImageURL">
|
17663
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
17664
|
+
</xsl:call-template>
|
17665
|
+
</xsl:variable>
|
17666
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
17667
|
+
</xsl:if>
|
17668
|
+
</xsl:otherwise>
|
17669
|
+
</xsl:choose>
|
17670
|
+
</xsl:template>
|
17671
|
+
|
17166
17672
|
<xsl:template name="getImageURL">
|
17167
17673
|
<xsl:param name="src"/>
|
17168
17674
|
<xsl:choose>
|
@@ -17590,6 +18096,14 @@
|
|
17590
18096
|
</xsl:attribute>
|
17591
18097
|
</xsl:template>
|
17592
18098
|
|
18099
|
+
<xsl:template name="getCharByCodePoint">
|
18100
|
+
<xsl:param name="codepoint"/>
|
18101
|
+
<xsl:param name="radix">16</xsl:param>
|
18102
|
+
<xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
|
18103
|
+
<xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
|
18104
|
+
<xsl:value-of select="java:java.lang.String.new($chars)"/>
|
18105
|
+
</xsl:template>
|
18106
|
+
|
17593
18107
|
<xsl:template name="substring-after-last">
|
17594
18108
|
<xsl:param name="value"/>
|
17595
18109
|
<xsl:param name="delimiter"/>
|