metanorma-ogc 2.5.5 → 2.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +91 -23
- data/lib/isodoc/ogc/ogc.best-practice.xsl +91 -23
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +91 -23
- data/lib/isodoc/ogc/ogc.community-practice.xsl +91 -23
- data/lib/isodoc/ogc/ogc.community-standard.xsl +91 -23
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +91 -23
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +91 -23
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +91 -23
- data/lib/isodoc/ogc/ogc.other.xsl +91 -23
- data/lib/isodoc/ogc/ogc.policy.xsl +91 -23
- data/lib/isodoc/ogc/ogc.reference-model.xsl +91 -23
- data/lib/isodoc/ogc/ogc.release-notes.xsl +91 -23
- data/lib/isodoc/ogc/ogc.standard.xsl +91 -23
- data/lib/isodoc/ogc/ogc.test-suite.xsl +91 -23
- data/lib/isodoc/ogc/ogc.user-guide.xsl +91 -23
- data/lib/isodoc/ogc/ogc.white-paper.xsl +91 -23
- data/lib/isodoc/ogc/word_convert.rb +0 -3
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca80c97889bdc2c43a706f834caf35693f6c6f2a789797afb9268885c47a720b
|
4
|
+
data.tar.gz: ba0626cf42e0560689c37703d91c2a9adc5bb4365a8b52eca2b4a81e11f77fcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2853ec998528476a1f21431937912e84e7d9ff8dfc06b9d0808073ec60f9343140120514a6e33167ad8c9808b556fe6ec9f05afc9a56b4e767ed54233867904
|
7
|
+
data.tar.gz: 077c34f9347e7d6b0c0415e509655846455b257455bc3fb34c7710f7cc178520e00c462e802ebf1ded673dcc7e2f26cf104090f2e530d3e35ac65b94e4f28478
|
@@ -1584,17 +1584,30 @@
|
|
1584
1584
|
<xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
|
1585
1585
|
|
1586
1586
|
<xsl:param name="table_if">false</xsl:param> <!-- generate extended table in IF for autolayout-algorithm -->
|
1587
|
-
<xsl:param name="table_widths"/> <!-- path to xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
1587
|
+
<xsl:param name="table_widths"/> <!-- (debug: path to) xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
1588
1588
|
<!-- Example: <tables>
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1589
|
+
<table page-width="509103" id="table1" width_max="223561" width_min="223560">
|
1590
|
+
<column width_max="39354" width_min="39354"/>
|
1591
|
+
<column width_max="75394" width_min="75394"/>
|
1592
|
+
<column width_max="108813" width_min="108813"/>
|
1593
|
+
<tbody>
|
1594
|
+
<tr>
|
1595
|
+
<td width_max="39354" width_min="39354">
|
1596
|
+
<p_len>39354</p_len>
|
1597
|
+
<word_len>39354</word_len>
|
1598
|
+
</td>
|
1599
|
+
|
1600
|
+
OLD:
|
1601
|
+
<tables>
|
1602
|
+
<table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
|
1603
|
+
<tbody>
|
1604
|
+
<tr>
|
1605
|
+
<td id="tab-symdu_1_1">
|
1606
|
+
<p_len>6</p_len>
|
1607
|
+
<p_len>100</p_len> for 2nd paragraph
|
1608
|
+
<word_len>6</word_len>
|
1609
|
+
<word_len>20</word_len>
|
1610
|
+
...
|
1598
1611
|
-->
|
1599
1612
|
|
1600
1613
|
<!-- for command line debug: <xsl:variable name="table_widths_from_if" select="document($table_widths)"/> -->
|
@@ -1814,6 +1827,9 @@
|
|
1814
1827
|
<xsl:variable name="hair_space"> </xsl:variable>
|
1815
1828
|
<xsl:variable name="en_dash">–</xsl:variable>
|
1816
1829
|
<xsl:variable name="em_dash">—</xsl:variable>
|
1830
|
+
<xsl:variable name="cr"> </xsl:variable>
|
1831
|
+
<xsl:variable name="lf">
|
1832
|
+
</xsl:variable>
|
1817
1833
|
|
1818
1834
|
<xsl:template name="getTitle">
|
1819
1835
|
<xsl:param name="name"/>
|
@@ -3617,6 +3633,20 @@
|
|
3617
3633
|
</xsl:for-each>
|
3618
3634
|
</xsl:template>
|
3619
3635
|
|
3636
|
+
<xsl:param name="table_only_with_id"/><!-- Example: table1, for table auto-layout algorithm -->
|
3637
|
+
|
3638
|
+
<xsl:template match="*[local-name()='table']" priority="2">
|
3639
|
+
<xsl:choose>
|
3640
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
3641
|
+
<xsl:call-template name="table"/>
|
3642
|
+
</xsl:when>
|
3643
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
3644
|
+
<xsl:otherwise>
|
3645
|
+
<xsl:call-template name="table"/>
|
3646
|
+
</xsl:otherwise>
|
3647
|
+
</xsl:choose>
|
3648
|
+
</xsl:template>
|
3649
|
+
|
3620
3650
|
<xsl:template match="*[local-name()='table']" name="table">
|
3621
3651
|
|
3622
3652
|
<xsl:variable name="table-preamble">
|
@@ -3628,9 +3658,11 @@
|
|
3628
3658
|
<xsl:variable name="table">
|
3629
3659
|
|
3630
3660
|
<xsl:variable name="simple-table">
|
3631
|
-
<xsl:
|
3632
|
-
<xsl:
|
3633
|
-
|
3661
|
+
<xsl:if test="$isGenerateTableIF = 'true' and $isApplyAutolayoutAlgorithm = 'true'">
|
3662
|
+
<xsl:call-template name="getSimpleTable">
|
3663
|
+
<xsl:with-param name="id" select="@id"/>
|
3664
|
+
</xsl:call-template>
|
3665
|
+
</xsl:if>
|
3634
3666
|
</xsl:variable>
|
3635
3667
|
<!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
|
3636
3668
|
|
@@ -3732,9 +3764,9 @@
|
|
3732
3764
|
</xsl:attribute>
|
3733
3765
|
</xsl:for-each>
|
3734
3766
|
|
3735
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3767
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'][not(@type = 'units')] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3736
3768
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3737
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute
|
3769
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
|
3738
3770
|
</xsl:if>
|
3739
3771
|
|
3740
3772
|
<xsl:choose>
|
@@ -3883,9 +3915,28 @@
|
|
3883
3915
|
|
3884
3916
|
</fo:block>
|
3885
3917
|
|
3918
|
+
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
3919
|
+
<xsl:if test="$continued = 'true'">
|
3920
|
+
<fo:block text-align="right">
|
3921
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
3922
|
+
</fo:block>
|
3923
|
+
</xsl:if>
|
3924
|
+
<!-- </xsl:if> -->
|
3925
|
+
|
3886
3926
|
</xsl:if>
|
3887
3927
|
</xsl:template> <!-- table/name -->
|
3888
3928
|
|
3929
|
+
<!-- workaround solution for https://github.com/metanorma/metanorma-iso/issues/1151#issuecomment-2033087938 -->
|
3930
|
+
<xsl:template match="*[local-name()='table']/*[local-name() = 'note'][@type = 'units']/*[local-name() = 'p']/text()" priority="4">
|
3931
|
+
<xsl:choose>
|
3932
|
+
<xsl:when test="preceding-sibling::*[local-name() = 'br']">
|
3933
|
+
<!-- remove CR or LF at start -->
|
3934
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'^( | | )', '')"/>
|
3935
|
+
</xsl:when>
|
3936
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
3937
|
+
</xsl:choose>
|
3938
|
+
</xsl:template>
|
3939
|
+
|
3889
3940
|
<!-- SOURCE: ... -->
|
3890
3941
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
|
3891
3942
|
<xsl:call-template name="termsource"/>
|
@@ -4296,7 +4347,7 @@
|
|
4296
4347
|
<xsl:param name="colwidths"/>
|
4297
4348
|
<xsl:param name="colgroup"/>
|
4298
4349
|
|
4299
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
4350
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
4300
4351
|
|
4301
4352
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
4302
4353
|
|
@@ -4368,7 +4419,7 @@
|
|
4368
4419
|
|
4369
4420
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
4370
4421
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
4371
|
-
<xsl:apply-templates select="../*[local-name()='note']"/>
|
4422
|
+
<xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
|
4372
4423
|
<xsl:apply-templates select="../*[local-name()='example']"/>
|
4373
4424
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
4374
4425
|
|
@@ -4378,7 +4429,7 @@
|
|
4378
4429
|
|
4379
4430
|
<!-- horizontal row separator -->
|
4380
4431
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
4381
|
-
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
4432
|
+
<xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
4382
4433
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
4383
4434
|
|
4384
4435
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -5054,7 +5105,20 @@
|
|
5054
5105
|
<!-- Definition List -->
|
5055
5106
|
<!-- ===================== -->
|
5056
5107
|
|
5057
|
-
|
5108
|
+
<!-- for table auto-layout algorithm -->
|
5109
|
+
<xsl:template match="*[local-name()='dl']" priority="2">
|
5110
|
+
<xsl:choose>
|
5111
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
5112
|
+
<xsl:call-template name="dl"/>
|
5113
|
+
</xsl:when>
|
5114
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
5115
|
+
<xsl:otherwise>
|
5116
|
+
<xsl:call-template name="dl"/>
|
5117
|
+
</xsl:otherwise>
|
5118
|
+
</xsl:choose>
|
5119
|
+
</xsl:template>
|
5120
|
+
|
5121
|
+
<xsl:template match="*[local-name()='dl']" name="dl">
|
5058
5122
|
<xsl:variable name="isAdded" select="@added"/>
|
5059
5123
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
5060
5124
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
@@ -6995,7 +7059,13 @@
|
|
6995
7059
|
<xsl:value-of select="$language_current_2"/>
|
6996
7060
|
</xsl:when>
|
6997
7061
|
<xsl:otherwise>
|
6998
|
-
<xsl:
|
7062
|
+
<xsl:variable name="language_current_3" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'])"/>
|
7063
|
+
<xsl:choose>
|
7064
|
+
<xsl:when test="$language_current_3 != ''">
|
7065
|
+
<xsl:value-of select="$language_current_3"/>
|
7066
|
+
</xsl:when>
|
7067
|
+
<xsl:otherwise>en</xsl:otherwise>
|
7068
|
+
</xsl:choose>
|
6999
7069
|
</xsl:otherwise>
|
7000
7070
|
</xsl:choose>
|
7001
7071
|
</xsl:otherwise>
|
@@ -7904,7 +7974,7 @@
|
|
7904
7974
|
</xsl:when>
|
7905
7975
|
<xsl:otherwise>
|
7906
7976
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
7907
|
-
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
7977
|
+
<xsl:if test="not(@mimetype = 'image/svg+xml') and (../*[local-name() = 'name'] or parent::*[local-name() = 'figure'][@unnumbered = 'true']) and not(ancestor::*[local-name() = 'table'])">
|
7908
7978
|
|
7909
7979
|
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
7910
7980
|
<xsl:attribute name="width">
|
@@ -12975,6 +13045,4 @@
|
|
12975
13045
|
</xsl:if>
|
12976
13046
|
</xsl:template>
|
12977
13047
|
|
12978
|
-
<!-- update -->
|
12979
|
-
|
12980
13048
|
</xsl:stylesheet>
|
@@ -1584,17 +1584,30 @@
|
|
1584
1584
|
<xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
|
1585
1585
|
|
1586
1586
|
<xsl:param name="table_if">false</xsl:param> <!-- generate extended table in IF for autolayout-algorithm -->
|
1587
|
-
<xsl:param name="table_widths"/> <!-- path to xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
1587
|
+
<xsl:param name="table_widths"/> <!-- (debug: path to) xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
1588
1588
|
<!-- Example: <tables>
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1589
|
+
<table page-width="509103" id="table1" width_max="223561" width_min="223560">
|
1590
|
+
<column width_max="39354" width_min="39354"/>
|
1591
|
+
<column width_max="75394" width_min="75394"/>
|
1592
|
+
<column width_max="108813" width_min="108813"/>
|
1593
|
+
<tbody>
|
1594
|
+
<tr>
|
1595
|
+
<td width_max="39354" width_min="39354">
|
1596
|
+
<p_len>39354</p_len>
|
1597
|
+
<word_len>39354</word_len>
|
1598
|
+
</td>
|
1599
|
+
|
1600
|
+
OLD:
|
1601
|
+
<tables>
|
1602
|
+
<table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
|
1603
|
+
<tbody>
|
1604
|
+
<tr>
|
1605
|
+
<td id="tab-symdu_1_1">
|
1606
|
+
<p_len>6</p_len>
|
1607
|
+
<p_len>100</p_len> for 2nd paragraph
|
1608
|
+
<word_len>6</word_len>
|
1609
|
+
<word_len>20</word_len>
|
1610
|
+
...
|
1598
1611
|
-->
|
1599
1612
|
|
1600
1613
|
<!-- for command line debug: <xsl:variable name="table_widths_from_if" select="document($table_widths)"/> -->
|
@@ -1814,6 +1827,9 @@
|
|
1814
1827
|
<xsl:variable name="hair_space"> </xsl:variable>
|
1815
1828
|
<xsl:variable name="en_dash">–</xsl:variable>
|
1816
1829
|
<xsl:variable name="em_dash">—</xsl:variable>
|
1830
|
+
<xsl:variable name="cr"> </xsl:variable>
|
1831
|
+
<xsl:variable name="lf">
|
1832
|
+
</xsl:variable>
|
1817
1833
|
|
1818
1834
|
<xsl:template name="getTitle">
|
1819
1835
|
<xsl:param name="name"/>
|
@@ -3617,6 +3633,20 @@
|
|
3617
3633
|
</xsl:for-each>
|
3618
3634
|
</xsl:template>
|
3619
3635
|
|
3636
|
+
<xsl:param name="table_only_with_id"/><!-- Example: table1, for table auto-layout algorithm -->
|
3637
|
+
|
3638
|
+
<xsl:template match="*[local-name()='table']" priority="2">
|
3639
|
+
<xsl:choose>
|
3640
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
3641
|
+
<xsl:call-template name="table"/>
|
3642
|
+
</xsl:when>
|
3643
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
3644
|
+
<xsl:otherwise>
|
3645
|
+
<xsl:call-template name="table"/>
|
3646
|
+
</xsl:otherwise>
|
3647
|
+
</xsl:choose>
|
3648
|
+
</xsl:template>
|
3649
|
+
|
3620
3650
|
<xsl:template match="*[local-name()='table']" name="table">
|
3621
3651
|
|
3622
3652
|
<xsl:variable name="table-preamble">
|
@@ -3628,9 +3658,11 @@
|
|
3628
3658
|
<xsl:variable name="table">
|
3629
3659
|
|
3630
3660
|
<xsl:variable name="simple-table">
|
3631
|
-
<xsl:
|
3632
|
-
<xsl:
|
3633
|
-
|
3661
|
+
<xsl:if test="$isGenerateTableIF = 'true' and $isApplyAutolayoutAlgorithm = 'true'">
|
3662
|
+
<xsl:call-template name="getSimpleTable">
|
3663
|
+
<xsl:with-param name="id" select="@id"/>
|
3664
|
+
</xsl:call-template>
|
3665
|
+
</xsl:if>
|
3634
3666
|
</xsl:variable>
|
3635
3667
|
<!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
|
3636
3668
|
|
@@ -3732,9 +3764,9 @@
|
|
3732
3764
|
</xsl:attribute>
|
3733
3765
|
</xsl:for-each>
|
3734
3766
|
|
3735
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3767
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'][not(@type = 'units')] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3736
3768
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3737
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute
|
3769
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
|
3738
3770
|
</xsl:if>
|
3739
3771
|
|
3740
3772
|
<xsl:choose>
|
@@ -3883,9 +3915,28 @@
|
|
3883
3915
|
|
3884
3916
|
</fo:block>
|
3885
3917
|
|
3918
|
+
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
3919
|
+
<xsl:if test="$continued = 'true'">
|
3920
|
+
<fo:block text-align="right">
|
3921
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
3922
|
+
</fo:block>
|
3923
|
+
</xsl:if>
|
3924
|
+
<!-- </xsl:if> -->
|
3925
|
+
|
3886
3926
|
</xsl:if>
|
3887
3927
|
</xsl:template> <!-- table/name -->
|
3888
3928
|
|
3929
|
+
<!-- workaround solution for https://github.com/metanorma/metanorma-iso/issues/1151#issuecomment-2033087938 -->
|
3930
|
+
<xsl:template match="*[local-name()='table']/*[local-name() = 'note'][@type = 'units']/*[local-name() = 'p']/text()" priority="4">
|
3931
|
+
<xsl:choose>
|
3932
|
+
<xsl:when test="preceding-sibling::*[local-name() = 'br']">
|
3933
|
+
<!-- remove CR or LF at start -->
|
3934
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'^( | | )', '')"/>
|
3935
|
+
</xsl:when>
|
3936
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
3937
|
+
</xsl:choose>
|
3938
|
+
</xsl:template>
|
3939
|
+
|
3889
3940
|
<!-- SOURCE: ... -->
|
3890
3941
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
|
3891
3942
|
<xsl:call-template name="termsource"/>
|
@@ -4296,7 +4347,7 @@
|
|
4296
4347
|
<xsl:param name="colwidths"/>
|
4297
4348
|
<xsl:param name="colgroup"/>
|
4298
4349
|
|
4299
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
4350
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
4300
4351
|
|
4301
4352
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
4302
4353
|
|
@@ -4368,7 +4419,7 @@
|
|
4368
4419
|
|
4369
4420
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
4370
4421
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
4371
|
-
<xsl:apply-templates select="../*[local-name()='note']"/>
|
4422
|
+
<xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
|
4372
4423
|
<xsl:apply-templates select="../*[local-name()='example']"/>
|
4373
4424
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
4374
4425
|
|
@@ -4378,7 +4429,7 @@
|
|
4378
4429
|
|
4379
4430
|
<!-- horizontal row separator -->
|
4380
4431
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
4381
|
-
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
4432
|
+
<xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
4382
4433
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
4383
4434
|
|
4384
4435
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -5054,7 +5105,20 @@
|
|
5054
5105
|
<!-- Definition List -->
|
5055
5106
|
<!-- ===================== -->
|
5056
5107
|
|
5057
|
-
|
5108
|
+
<!-- for table auto-layout algorithm -->
|
5109
|
+
<xsl:template match="*[local-name()='dl']" priority="2">
|
5110
|
+
<xsl:choose>
|
5111
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
5112
|
+
<xsl:call-template name="dl"/>
|
5113
|
+
</xsl:when>
|
5114
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
5115
|
+
<xsl:otherwise>
|
5116
|
+
<xsl:call-template name="dl"/>
|
5117
|
+
</xsl:otherwise>
|
5118
|
+
</xsl:choose>
|
5119
|
+
</xsl:template>
|
5120
|
+
|
5121
|
+
<xsl:template match="*[local-name()='dl']" name="dl">
|
5058
5122
|
<xsl:variable name="isAdded" select="@added"/>
|
5059
5123
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
5060
5124
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
@@ -6995,7 +7059,13 @@
|
|
6995
7059
|
<xsl:value-of select="$language_current_2"/>
|
6996
7060
|
</xsl:when>
|
6997
7061
|
<xsl:otherwise>
|
6998
|
-
<xsl:
|
7062
|
+
<xsl:variable name="language_current_3" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'])"/>
|
7063
|
+
<xsl:choose>
|
7064
|
+
<xsl:when test="$language_current_3 != ''">
|
7065
|
+
<xsl:value-of select="$language_current_3"/>
|
7066
|
+
</xsl:when>
|
7067
|
+
<xsl:otherwise>en</xsl:otherwise>
|
7068
|
+
</xsl:choose>
|
6999
7069
|
</xsl:otherwise>
|
7000
7070
|
</xsl:choose>
|
7001
7071
|
</xsl:otherwise>
|
@@ -7904,7 +7974,7 @@
|
|
7904
7974
|
</xsl:when>
|
7905
7975
|
<xsl:otherwise>
|
7906
7976
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
7907
|
-
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
7977
|
+
<xsl:if test="not(@mimetype = 'image/svg+xml') and (../*[local-name() = 'name'] or parent::*[local-name() = 'figure'][@unnumbered = 'true']) and not(ancestor::*[local-name() = 'table'])">
|
7908
7978
|
|
7909
7979
|
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
7910
7980
|
<xsl:attribute name="width">
|
@@ -12975,6 +13045,4 @@
|
|
12975
13045
|
</xsl:if>
|
12976
13046
|
</xsl:template>
|
12977
13047
|
|
12978
|
-
<!-- update -->
|
12979
|
-
|
12980
13048
|
</xsl:stylesheet>
|
@@ -1584,17 +1584,30 @@
|
|
1584
1584
|
<xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
|
1585
1585
|
|
1586
1586
|
<xsl:param name="table_if">false</xsl:param> <!-- generate extended table in IF for autolayout-algorithm -->
|
1587
|
-
<xsl:param name="table_widths"/> <!-- path to xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
1587
|
+
<xsl:param name="table_widths"/> <!-- (debug: path to) xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
1588
1588
|
<!-- Example: <tables>
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1589
|
+
<table page-width="509103" id="table1" width_max="223561" width_min="223560">
|
1590
|
+
<column width_max="39354" width_min="39354"/>
|
1591
|
+
<column width_max="75394" width_min="75394"/>
|
1592
|
+
<column width_max="108813" width_min="108813"/>
|
1593
|
+
<tbody>
|
1594
|
+
<tr>
|
1595
|
+
<td width_max="39354" width_min="39354">
|
1596
|
+
<p_len>39354</p_len>
|
1597
|
+
<word_len>39354</word_len>
|
1598
|
+
</td>
|
1599
|
+
|
1600
|
+
OLD:
|
1601
|
+
<tables>
|
1602
|
+
<table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
|
1603
|
+
<tbody>
|
1604
|
+
<tr>
|
1605
|
+
<td id="tab-symdu_1_1">
|
1606
|
+
<p_len>6</p_len>
|
1607
|
+
<p_len>100</p_len> for 2nd paragraph
|
1608
|
+
<word_len>6</word_len>
|
1609
|
+
<word_len>20</word_len>
|
1610
|
+
...
|
1598
1611
|
-->
|
1599
1612
|
|
1600
1613
|
<!-- for command line debug: <xsl:variable name="table_widths_from_if" select="document($table_widths)"/> -->
|
@@ -1814,6 +1827,9 @@
|
|
1814
1827
|
<xsl:variable name="hair_space"> </xsl:variable>
|
1815
1828
|
<xsl:variable name="en_dash">–</xsl:variable>
|
1816
1829
|
<xsl:variable name="em_dash">—</xsl:variable>
|
1830
|
+
<xsl:variable name="cr"> </xsl:variable>
|
1831
|
+
<xsl:variable name="lf">
|
1832
|
+
</xsl:variable>
|
1817
1833
|
|
1818
1834
|
<xsl:template name="getTitle">
|
1819
1835
|
<xsl:param name="name"/>
|
@@ -3617,6 +3633,20 @@
|
|
3617
3633
|
</xsl:for-each>
|
3618
3634
|
</xsl:template>
|
3619
3635
|
|
3636
|
+
<xsl:param name="table_only_with_id"/><!-- Example: table1, for table auto-layout algorithm -->
|
3637
|
+
|
3638
|
+
<xsl:template match="*[local-name()='table']" priority="2">
|
3639
|
+
<xsl:choose>
|
3640
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
3641
|
+
<xsl:call-template name="table"/>
|
3642
|
+
</xsl:when>
|
3643
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
3644
|
+
<xsl:otherwise>
|
3645
|
+
<xsl:call-template name="table"/>
|
3646
|
+
</xsl:otherwise>
|
3647
|
+
</xsl:choose>
|
3648
|
+
</xsl:template>
|
3649
|
+
|
3620
3650
|
<xsl:template match="*[local-name()='table']" name="table">
|
3621
3651
|
|
3622
3652
|
<xsl:variable name="table-preamble">
|
@@ -3628,9 +3658,11 @@
|
|
3628
3658
|
<xsl:variable name="table">
|
3629
3659
|
|
3630
3660
|
<xsl:variable name="simple-table">
|
3631
|
-
<xsl:
|
3632
|
-
<xsl:
|
3633
|
-
|
3661
|
+
<xsl:if test="$isGenerateTableIF = 'true' and $isApplyAutolayoutAlgorithm = 'true'">
|
3662
|
+
<xsl:call-template name="getSimpleTable">
|
3663
|
+
<xsl:with-param name="id" select="@id"/>
|
3664
|
+
</xsl:call-template>
|
3665
|
+
</xsl:if>
|
3634
3666
|
</xsl:variable>
|
3635
3667
|
<!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
|
3636
3668
|
|
@@ -3732,9 +3764,9 @@
|
|
3732
3764
|
</xsl:attribute>
|
3733
3765
|
</xsl:for-each>
|
3734
3766
|
|
3735
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3767
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'][not(@type = 'units')] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3736
3768
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3737
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute
|
3769
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
|
3738
3770
|
</xsl:if>
|
3739
3771
|
|
3740
3772
|
<xsl:choose>
|
@@ -3883,9 +3915,28 @@
|
|
3883
3915
|
|
3884
3916
|
</fo:block>
|
3885
3917
|
|
3918
|
+
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
3919
|
+
<xsl:if test="$continued = 'true'">
|
3920
|
+
<fo:block text-align="right">
|
3921
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
3922
|
+
</fo:block>
|
3923
|
+
</xsl:if>
|
3924
|
+
<!-- </xsl:if> -->
|
3925
|
+
|
3886
3926
|
</xsl:if>
|
3887
3927
|
</xsl:template> <!-- table/name -->
|
3888
3928
|
|
3929
|
+
<!-- workaround solution for https://github.com/metanorma/metanorma-iso/issues/1151#issuecomment-2033087938 -->
|
3930
|
+
<xsl:template match="*[local-name()='table']/*[local-name() = 'note'][@type = 'units']/*[local-name() = 'p']/text()" priority="4">
|
3931
|
+
<xsl:choose>
|
3932
|
+
<xsl:when test="preceding-sibling::*[local-name() = 'br']">
|
3933
|
+
<!-- remove CR or LF at start -->
|
3934
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'^( | | )', '')"/>
|
3935
|
+
</xsl:when>
|
3936
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
3937
|
+
</xsl:choose>
|
3938
|
+
</xsl:template>
|
3939
|
+
|
3889
3940
|
<!-- SOURCE: ... -->
|
3890
3941
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
|
3891
3942
|
<xsl:call-template name="termsource"/>
|
@@ -4296,7 +4347,7 @@
|
|
4296
4347
|
<xsl:param name="colwidths"/>
|
4297
4348
|
<xsl:param name="colgroup"/>
|
4298
4349
|
|
4299
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
4350
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
4300
4351
|
|
4301
4352
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
4302
4353
|
|
@@ -4368,7 +4419,7 @@
|
|
4368
4419
|
|
4369
4420
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
4370
4421
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
4371
|
-
<xsl:apply-templates select="../*[local-name()='note']"/>
|
4422
|
+
<xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
|
4372
4423
|
<xsl:apply-templates select="../*[local-name()='example']"/>
|
4373
4424
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
4374
4425
|
|
@@ -4378,7 +4429,7 @@
|
|
4378
4429
|
|
4379
4430
|
<!-- horizontal row separator -->
|
4380
4431
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
4381
|
-
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
4432
|
+
<xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
4382
4433
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
4383
4434
|
|
4384
4435
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -5054,7 +5105,20 @@
|
|
5054
5105
|
<!-- Definition List -->
|
5055
5106
|
<!-- ===================== -->
|
5056
5107
|
|
5057
|
-
|
5108
|
+
<!-- for table auto-layout algorithm -->
|
5109
|
+
<xsl:template match="*[local-name()='dl']" priority="2">
|
5110
|
+
<xsl:choose>
|
5111
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
5112
|
+
<xsl:call-template name="dl"/>
|
5113
|
+
</xsl:when>
|
5114
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
5115
|
+
<xsl:otherwise>
|
5116
|
+
<xsl:call-template name="dl"/>
|
5117
|
+
</xsl:otherwise>
|
5118
|
+
</xsl:choose>
|
5119
|
+
</xsl:template>
|
5120
|
+
|
5121
|
+
<xsl:template match="*[local-name()='dl']" name="dl">
|
5058
5122
|
<xsl:variable name="isAdded" select="@added"/>
|
5059
5123
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
5060
5124
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
@@ -6995,7 +7059,13 @@
|
|
6995
7059
|
<xsl:value-of select="$language_current_2"/>
|
6996
7060
|
</xsl:when>
|
6997
7061
|
<xsl:otherwise>
|
6998
|
-
<xsl:
|
7062
|
+
<xsl:variable name="language_current_3" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'])"/>
|
7063
|
+
<xsl:choose>
|
7064
|
+
<xsl:when test="$language_current_3 != ''">
|
7065
|
+
<xsl:value-of select="$language_current_3"/>
|
7066
|
+
</xsl:when>
|
7067
|
+
<xsl:otherwise>en</xsl:otherwise>
|
7068
|
+
</xsl:choose>
|
6999
7069
|
</xsl:otherwise>
|
7000
7070
|
</xsl:choose>
|
7001
7071
|
</xsl:otherwise>
|
@@ -7904,7 +7974,7 @@
|
|
7904
7974
|
</xsl:when>
|
7905
7975
|
<xsl:otherwise>
|
7906
7976
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
7907
|
-
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
7977
|
+
<xsl:if test="not(@mimetype = 'image/svg+xml') and (../*[local-name() = 'name'] or parent::*[local-name() = 'figure'][@unnumbered = 'true']) and not(ancestor::*[local-name() = 'table'])">
|
7908
7978
|
|
7909
7979
|
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
7910
7980
|
<xsl:attribute name="width">
|
@@ -12975,6 +13045,4 @@
|
|
12975
13045
|
</xsl:if>
|
12976
13046
|
</xsl:template>
|
12977
13047
|
|
12978
|
-
<!-- update -->
|
12979
|
-
|
12980
13048
|
</xsl:stylesheet>
|