metanorma-ogc 2.2.7 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +55 -12
- data/lib/isodoc/ogc/ogc.best-practice.xsl +55 -12
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +55 -12
- data/lib/isodoc/ogc/ogc.community-practice.xsl +55 -12
- data/lib/isodoc/ogc/ogc.community-standard.xsl +55 -12
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +55 -12
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +55 -12
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +55 -12
- data/lib/isodoc/ogc/ogc.other.xsl +55 -12
- data/lib/isodoc/ogc/ogc.policy.xsl +55 -12
- data/lib/isodoc/ogc/ogc.reference-model.xsl +55 -12
- data/lib/isodoc/ogc/ogc.release-notes.xsl +55 -12
- data/lib/isodoc/ogc/ogc.standard.xsl +55 -12
- data/lib/isodoc/ogc/ogc.test-suite.xsl +55 -12
- data/lib/isodoc/ogc/ogc.user-guide.xsl +55 -12
- data/lib/isodoc/ogc/ogc.white-paper.xsl +55 -12
- data/lib/isodoc/ogc/presentation_xml_convert.rb +3 -3
- data/lib/metanorma/ogc/basicdoc.rng +3 -0
- data/lib/metanorma/ogc/biblio-standoc.rng +1 -1
- data/lib/metanorma/ogc/isodoc.rng +1 -0
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +5 -5
@@ -4162,6 +4162,10 @@
|
|
4162
4162
|
<xsl:variable name="footnote_inline">
|
4163
4163
|
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
4164
4164
|
|
4165
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'fn']">
|
4166
|
+
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
4167
|
+
</xsl:if>
|
4168
|
+
|
4165
4169
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
4166
4170
|
<xsl:value-of select="$current_fn_number_text"/>
|
4167
4171
|
</fo:basic-link>
|
@@ -5326,6 +5330,23 @@
|
|
5326
5330
|
<xsl:apply-templates/>
|
5327
5331
|
</xsl:template>
|
5328
5332
|
|
5333
|
+
<!-- Don't break standard's numbers -->
|
5334
|
+
<!-- Example : <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
5335
|
+
<xsl:template match="*[local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']" priority="2">
|
5336
|
+
<xsl:choose>
|
5337
|
+
<xsl:when test="ancestor::*[local-name() = 'table']"><xsl:apply-templates/></xsl:when>
|
5338
|
+
<xsl:when test="following-sibling::*[2][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']">
|
5339
|
+
<fo:inline keep-with-next.within-line="always"><xsl:apply-templates/></fo:inline>
|
5340
|
+
</xsl:when>
|
5341
|
+
<xsl:otherwise>
|
5342
|
+
<xsl:apply-templates/>
|
5343
|
+
</xsl:otherwise>
|
5344
|
+
</xsl:choose>
|
5345
|
+
</xsl:template>
|
5346
|
+
<xsl:template match="text()[not(ancestor::*[local-name() = 'table']) and preceding-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear'] and following-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']]" priority="2">
|
5347
|
+
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
5348
|
+
</xsl:template>
|
5349
|
+
|
5329
5350
|
<!-- ========================= -->
|
5330
5351
|
<!-- END Rich text formatting -->
|
5331
5352
|
<!-- ========================= -->
|
@@ -5721,7 +5742,7 @@
|
|
5721
5742
|
<xsl:choose>
|
5722
5743
|
<xsl:when test="@colspan">
|
5723
5744
|
<xsl:variable name="td">
|
5724
|
-
<xsl:element name="
|
5745
|
+
<xsl:element name="{local-name()}">
|
5725
5746
|
<xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
|
5726
5747
|
<xsl:if test="local-name()='th'">
|
5727
5748
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -5736,7 +5757,7 @@
|
|
5736
5757
|
</xsl:call-template>
|
5737
5758
|
</xsl:when>
|
5738
5759
|
<xsl:otherwise>
|
5739
|
-
<xsl:element name="
|
5760
|
+
<xsl:element name="{local-name()}">
|
5740
5761
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
5741
5762
|
<xsl:if test="local-name()='th'">
|
5742
5763
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -5803,7 +5824,7 @@
|
|
5803
5824
|
<xsl:variable name="currentRow" select="."/>
|
5804
5825
|
|
5805
5826
|
<xsl:variable name="normalizedTDs">
|
5806
|
-
<xsl:for-each select="xalan:nodeset($previousRow)
|
5827
|
+
<xsl:for-each select="xalan:nodeset($previousRow)//*[self::td or self::th]">
|
5807
5828
|
<xsl:choose>
|
5808
5829
|
<xsl:when test="@rowspan > 1">
|
5809
5830
|
<xsl:copy>
|
@@ -5815,7 +5836,7 @@
|
|
5815
5836
|
</xsl:copy>
|
5816
5837
|
</xsl:when>
|
5817
5838
|
<xsl:otherwise>
|
5818
|
-
<xsl:copy-of select="$currentRow
|
5839
|
+
<xsl:copy-of select="$currentRow/*[self::td or self::th][1 + count(current()/preceding-sibling::*[self::td or self::th][not(@rowspan) or (@rowspan = 1)])]"/>
|
5819
5840
|
</xsl:otherwise>
|
5820
5841
|
</xsl:choose>
|
5821
5842
|
</xsl:for-each>
|
@@ -6489,12 +6510,6 @@
|
|
6489
6510
|
|
6490
6511
|
<fo:block-container margin-left="0mm">
|
6491
6512
|
|
6492
|
-
<!-- <xsl:if test="$namespace = 'iho'">
|
6493
|
-
<xsl:if test="ancestor::iho:td">
|
6494
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
6495
|
-
</xsl:if>
|
6496
|
-
</xsl:if> -->
|
6497
|
-
|
6498
6513
|
<fo:block>
|
6499
6514
|
|
6500
6515
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
@@ -7002,6 +7017,31 @@
|
|
7002
7017
|
<xsl:apply-templates mode="svg_update"/>
|
7003
7018
|
</xsl:copy>
|
7004
7019
|
</xsl:template>
|
7020
|
+
|
7021
|
+
<!-- regex for 'display: inline-block;' -->
|
7022
|
+
<xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
|
7023
|
+
<xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
|
7024
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), $regex_svg_style_notsupported, '')"/>
|
7025
|
+
</xsl:template>
|
7026
|
+
|
7027
|
+
<!-- replace
|
7028
|
+
stroke="rgba(r, g, b, alpha)" to
|
7029
|
+
stroke="rgb(r,g,b)" stroke-opacity="alpha", and
|
7030
|
+
fill="rgba(r, g, b, alpha)" to
|
7031
|
+
fill="rgb(r,g,b)" fill-opacity="alpha" -->
|
7032
|
+
<xsl:template match="@*[local-name() = 'stroke' or local-name() = 'fill'][starts-with(normalize-space(.), 'rgba')]" mode="svg_update">
|
7033
|
+
<xsl:variable name="components_">
|
7034
|
+
<xsl:call-template name="split">
|
7035
|
+
<xsl:with-param name="pText" select="substring-before(substring-after(., '('), ')')"/>
|
7036
|
+
<xsl:with-param name="sep" select="','"/>
|
7037
|
+
</xsl:call-template>
|
7038
|
+
</xsl:variable>
|
7039
|
+
<xsl:variable name="components" select="xalan:nodeset($components_)"/>
|
7040
|
+
<xsl:variable name="att_name" select="local-name()"/>
|
7041
|
+
<xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/item[1], ',', $components/item[2], ',', $components/item[3], ')')"/></xsl:attribute>
|
7042
|
+
<xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/item[4]"/></xsl:attribute>
|
7043
|
+
</xsl:template>
|
7044
|
+
|
7005
7045
|
<!-- ============== -->
|
7006
7046
|
<!-- END: svg_update -->
|
7007
7047
|
<!-- ============== -->
|
@@ -9982,7 +10022,9 @@
|
|
9982
10022
|
<!-- Update xml -->
|
9983
10023
|
<!-- ===================================== -->
|
9984
10024
|
<!-- =========================================================================== -->
|
9985
|
-
<!-- STEP1:
|
10025
|
+
<!-- STEP1: -->
|
10026
|
+
<!-- - Re-order elements in 'preface', 'sections' based on @displayorder -->
|
10027
|
+
<!-- - Ignore 'span' without style -->
|
9986
10028
|
<!-- =========================================================================== -->
|
9987
10029
|
<xsl:template match="@*|node()" mode="update_xml_step1">
|
9988
10030
|
<xsl:copy>
|
@@ -10065,7 +10107,8 @@
|
|
10065
10107
|
</xsl:copy>
|
10066
10108
|
</xsl:template>
|
10067
10109
|
|
10068
|
-
|
10110
|
+
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
10111
|
+
<xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']" mode="update_xml_step1" priority="2">
|
10069
10112
|
<xsl:copy>
|
10070
10113
|
<xsl:copy-of select="@*"/>
|
10071
10114
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -4162,6 +4162,10 @@
|
|
4162
4162
|
<xsl:variable name="footnote_inline">
|
4163
4163
|
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
4164
4164
|
|
4165
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'fn']">
|
4166
|
+
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
4167
|
+
</xsl:if>
|
4168
|
+
|
4165
4169
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
4166
4170
|
<xsl:value-of select="$current_fn_number_text"/>
|
4167
4171
|
</fo:basic-link>
|
@@ -5326,6 +5330,23 @@
|
|
5326
5330
|
<xsl:apply-templates/>
|
5327
5331
|
</xsl:template>
|
5328
5332
|
|
5333
|
+
<!-- Don't break standard's numbers -->
|
5334
|
+
<!-- Example : <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
5335
|
+
<xsl:template match="*[local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']" priority="2">
|
5336
|
+
<xsl:choose>
|
5337
|
+
<xsl:when test="ancestor::*[local-name() = 'table']"><xsl:apply-templates/></xsl:when>
|
5338
|
+
<xsl:when test="following-sibling::*[2][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']">
|
5339
|
+
<fo:inline keep-with-next.within-line="always"><xsl:apply-templates/></fo:inline>
|
5340
|
+
</xsl:when>
|
5341
|
+
<xsl:otherwise>
|
5342
|
+
<xsl:apply-templates/>
|
5343
|
+
</xsl:otherwise>
|
5344
|
+
</xsl:choose>
|
5345
|
+
</xsl:template>
|
5346
|
+
<xsl:template match="text()[not(ancestor::*[local-name() = 'table']) and preceding-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear'] and following-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']]" priority="2">
|
5347
|
+
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
5348
|
+
</xsl:template>
|
5349
|
+
|
5329
5350
|
<!-- ========================= -->
|
5330
5351
|
<!-- END Rich text formatting -->
|
5331
5352
|
<!-- ========================= -->
|
@@ -5721,7 +5742,7 @@
|
|
5721
5742
|
<xsl:choose>
|
5722
5743
|
<xsl:when test="@colspan">
|
5723
5744
|
<xsl:variable name="td">
|
5724
|
-
<xsl:element name="
|
5745
|
+
<xsl:element name="{local-name()}">
|
5725
5746
|
<xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
|
5726
5747
|
<xsl:if test="local-name()='th'">
|
5727
5748
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -5736,7 +5757,7 @@
|
|
5736
5757
|
</xsl:call-template>
|
5737
5758
|
</xsl:when>
|
5738
5759
|
<xsl:otherwise>
|
5739
|
-
<xsl:element name="
|
5760
|
+
<xsl:element name="{local-name()}">
|
5740
5761
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
5741
5762
|
<xsl:if test="local-name()='th'">
|
5742
5763
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -5803,7 +5824,7 @@
|
|
5803
5824
|
<xsl:variable name="currentRow" select="."/>
|
5804
5825
|
|
5805
5826
|
<xsl:variable name="normalizedTDs">
|
5806
|
-
<xsl:for-each select="xalan:nodeset($previousRow)
|
5827
|
+
<xsl:for-each select="xalan:nodeset($previousRow)//*[self::td or self::th]">
|
5807
5828
|
<xsl:choose>
|
5808
5829
|
<xsl:when test="@rowspan > 1">
|
5809
5830
|
<xsl:copy>
|
@@ -5815,7 +5836,7 @@
|
|
5815
5836
|
</xsl:copy>
|
5816
5837
|
</xsl:when>
|
5817
5838
|
<xsl:otherwise>
|
5818
|
-
<xsl:copy-of select="$currentRow
|
5839
|
+
<xsl:copy-of select="$currentRow/*[self::td or self::th][1 + count(current()/preceding-sibling::*[self::td or self::th][not(@rowspan) or (@rowspan = 1)])]"/>
|
5819
5840
|
</xsl:otherwise>
|
5820
5841
|
</xsl:choose>
|
5821
5842
|
</xsl:for-each>
|
@@ -6489,12 +6510,6 @@
|
|
6489
6510
|
|
6490
6511
|
<fo:block-container margin-left="0mm">
|
6491
6512
|
|
6492
|
-
<!-- <xsl:if test="$namespace = 'iho'">
|
6493
|
-
<xsl:if test="ancestor::iho:td">
|
6494
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
6495
|
-
</xsl:if>
|
6496
|
-
</xsl:if> -->
|
6497
|
-
|
6498
6513
|
<fo:block>
|
6499
6514
|
|
6500
6515
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
@@ -7002,6 +7017,31 @@
|
|
7002
7017
|
<xsl:apply-templates mode="svg_update"/>
|
7003
7018
|
</xsl:copy>
|
7004
7019
|
</xsl:template>
|
7020
|
+
|
7021
|
+
<!-- regex for 'display: inline-block;' -->
|
7022
|
+
<xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
|
7023
|
+
<xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
|
7024
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), $regex_svg_style_notsupported, '')"/>
|
7025
|
+
</xsl:template>
|
7026
|
+
|
7027
|
+
<!-- replace
|
7028
|
+
stroke="rgba(r, g, b, alpha)" to
|
7029
|
+
stroke="rgb(r,g,b)" stroke-opacity="alpha", and
|
7030
|
+
fill="rgba(r, g, b, alpha)" to
|
7031
|
+
fill="rgb(r,g,b)" fill-opacity="alpha" -->
|
7032
|
+
<xsl:template match="@*[local-name() = 'stroke' or local-name() = 'fill'][starts-with(normalize-space(.), 'rgba')]" mode="svg_update">
|
7033
|
+
<xsl:variable name="components_">
|
7034
|
+
<xsl:call-template name="split">
|
7035
|
+
<xsl:with-param name="pText" select="substring-before(substring-after(., '('), ')')"/>
|
7036
|
+
<xsl:with-param name="sep" select="','"/>
|
7037
|
+
</xsl:call-template>
|
7038
|
+
</xsl:variable>
|
7039
|
+
<xsl:variable name="components" select="xalan:nodeset($components_)"/>
|
7040
|
+
<xsl:variable name="att_name" select="local-name()"/>
|
7041
|
+
<xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/item[1], ',', $components/item[2], ',', $components/item[3], ')')"/></xsl:attribute>
|
7042
|
+
<xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/item[4]"/></xsl:attribute>
|
7043
|
+
</xsl:template>
|
7044
|
+
|
7005
7045
|
<!-- ============== -->
|
7006
7046
|
<!-- END: svg_update -->
|
7007
7047
|
<!-- ============== -->
|
@@ -9982,7 +10022,9 @@
|
|
9982
10022
|
<!-- Update xml -->
|
9983
10023
|
<!-- ===================================== -->
|
9984
10024
|
<!-- =========================================================================== -->
|
9985
|
-
<!-- STEP1:
|
10025
|
+
<!-- STEP1: -->
|
10026
|
+
<!-- - Re-order elements in 'preface', 'sections' based on @displayorder -->
|
10027
|
+
<!-- - Ignore 'span' without style -->
|
9986
10028
|
<!-- =========================================================================== -->
|
9987
10029
|
<xsl:template match="@*|node()" mode="update_xml_step1">
|
9988
10030
|
<xsl:copy>
|
@@ -10065,7 +10107,8 @@
|
|
10065
10107
|
</xsl:copy>
|
10066
10108
|
</xsl:template>
|
10067
10109
|
|
10068
|
-
|
10110
|
+
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
10111
|
+
<xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']" mode="update_xml_step1" priority="2">
|
10069
10112
|
<xsl:copy>
|
10070
10113
|
<xsl:copy-of select="@*"/>
|
10071
10114
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -4162,6 +4162,10 @@
|
|
4162
4162
|
<xsl:variable name="footnote_inline">
|
4163
4163
|
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
4164
4164
|
|
4165
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'fn']">
|
4166
|
+
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
4167
|
+
</xsl:if>
|
4168
|
+
|
4165
4169
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
4166
4170
|
<xsl:value-of select="$current_fn_number_text"/>
|
4167
4171
|
</fo:basic-link>
|
@@ -5326,6 +5330,23 @@
|
|
5326
5330
|
<xsl:apply-templates/>
|
5327
5331
|
</xsl:template>
|
5328
5332
|
|
5333
|
+
<!-- Don't break standard's numbers -->
|
5334
|
+
<!-- Example : <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
5335
|
+
<xsl:template match="*[local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']" priority="2">
|
5336
|
+
<xsl:choose>
|
5337
|
+
<xsl:when test="ancestor::*[local-name() = 'table']"><xsl:apply-templates/></xsl:when>
|
5338
|
+
<xsl:when test="following-sibling::*[2][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']">
|
5339
|
+
<fo:inline keep-with-next.within-line="always"><xsl:apply-templates/></fo:inline>
|
5340
|
+
</xsl:when>
|
5341
|
+
<xsl:otherwise>
|
5342
|
+
<xsl:apply-templates/>
|
5343
|
+
</xsl:otherwise>
|
5344
|
+
</xsl:choose>
|
5345
|
+
</xsl:template>
|
5346
|
+
<xsl:template match="text()[not(ancestor::*[local-name() = 'table']) and preceding-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear'] and following-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']]" priority="2">
|
5347
|
+
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
5348
|
+
</xsl:template>
|
5349
|
+
|
5329
5350
|
<!-- ========================= -->
|
5330
5351
|
<!-- END Rich text formatting -->
|
5331
5352
|
<!-- ========================= -->
|
@@ -5721,7 +5742,7 @@
|
|
5721
5742
|
<xsl:choose>
|
5722
5743
|
<xsl:when test="@colspan">
|
5723
5744
|
<xsl:variable name="td">
|
5724
|
-
<xsl:element name="
|
5745
|
+
<xsl:element name="{local-name()}">
|
5725
5746
|
<xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
|
5726
5747
|
<xsl:if test="local-name()='th'">
|
5727
5748
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -5736,7 +5757,7 @@
|
|
5736
5757
|
</xsl:call-template>
|
5737
5758
|
</xsl:when>
|
5738
5759
|
<xsl:otherwise>
|
5739
|
-
<xsl:element name="
|
5760
|
+
<xsl:element name="{local-name()}">
|
5740
5761
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
5741
5762
|
<xsl:if test="local-name()='th'">
|
5742
5763
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -5803,7 +5824,7 @@
|
|
5803
5824
|
<xsl:variable name="currentRow" select="."/>
|
5804
5825
|
|
5805
5826
|
<xsl:variable name="normalizedTDs">
|
5806
|
-
<xsl:for-each select="xalan:nodeset($previousRow)
|
5827
|
+
<xsl:for-each select="xalan:nodeset($previousRow)//*[self::td or self::th]">
|
5807
5828
|
<xsl:choose>
|
5808
5829
|
<xsl:when test="@rowspan > 1">
|
5809
5830
|
<xsl:copy>
|
@@ -5815,7 +5836,7 @@
|
|
5815
5836
|
</xsl:copy>
|
5816
5837
|
</xsl:when>
|
5817
5838
|
<xsl:otherwise>
|
5818
|
-
<xsl:copy-of select="$currentRow
|
5839
|
+
<xsl:copy-of select="$currentRow/*[self::td or self::th][1 + count(current()/preceding-sibling::*[self::td or self::th][not(@rowspan) or (@rowspan = 1)])]"/>
|
5819
5840
|
</xsl:otherwise>
|
5820
5841
|
</xsl:choose>
|
5821
5842
|
</xsl:for-each>
|
@@ -6489,12 +6510,6 @@
|
|
6489
6510
|
|
6490
6511
|
<fo:block-container margin-left="0mm">
|
6491
6512
|
|
6492
|
-
<!-- <xsl:if test="$namespace = 'iho'">
|
6493
|
-
<xsl:if test="ancestor::iho:td">
|
6494
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
6495
|
-
</xsl:if>
|
6496
|
-
</xsl:if> -->
|
6497
|
-
|
6498
6513
|
<fo:block>
|
6499
6514
|
|
6500
6515
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
@@ -7002,6 +7017,31 @@
|
|
7002
7017
|
<xsl:apply-templates mode="svg_update"/>
|
7003
7018
|
</xsl:copy>
|
7004
7019
|
</xsl:template>
|
7020
|
+
|
7021
|
+
<!-- regex for 'display: inline-block;' -->
|
7022
|
+
<xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
|
7023
|
+
<xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
|
7024
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), $regex_svg_style_notsupported, '')"/>
|
7025
|
+
</xsl:template>
|
7026
|
+
|
7027
|
+
<!-- replace
|
7028
|
+
stroke="rgba(r, g, b, alpha)" to
|
7029
|
+
stroke="rgb(r,g,b)" stroke-opacity="alpha", and
|
7030
|
+
fill="rgba(r, g, b, alpha)" to
|
7031
|
+
fill="rgb(r,g,b)" fill-opacity="alpha" -->
|
7032
|
+
<xsl:template match="@*[local-name() = 'stroke' or local-name() = 'fill'][starts-with(normalize-space(.), 'rgba')]" mode="svg_update">
|
7033
|
+
<xsl:variable name="components_">
|
7034
|
+
<xsl:call-template name="split">
|
7035
|
+
<xsl:with-param name="pText" select="substring-before(substring-after(., '('), ')')"/>
|
7036
|
+
<xsl:with-param name="sep" select="','"/>
|
7037
|
+
</xsl:call-template>
|
7038
|
+
</xsl:variable>
|
7039
|
+
<xsl:variable name="components" select="xalan:nodeset($components_)"/>
|
7040
|
+
<xsl:variable name="att_name" select="local-name()"/>
|
7041
|
+
<xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/item[1], ',', $components/item[2], ',', $components/item[3], ')')"/></xsl:attribute>
|
7042
|
+
<xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/item[4]"/></xsl:attribute>
|
7043
|
+
</xsl:template>
|
7044
|
+
|
7005
7045
|
<!-- ============== -->
|
7006
7046
|
<!-- END: svg_update -->
|
7007
7047
|
<!-- ============== -->
|
@@ -9982,7 +10022,9 @@
|
|
9982
10022
|
<!-- Update xml -->
|
9983
10023
|
<!-- ===================================== -->
|
9984
10024
|
<!-- =========================================================================== -->
|
9985
|
-
<!-- STEP1:
|
10025
|
+
<!-- STEP1: -->
|
10026
|
+
<!-- - Re-order elements in 'preface', 'sections' based on @displayorder -->
|
10027
|
+
<!-- - Ignore 'span' without style -->
|
9986
10028
|
<!-- =========================================================================== -->
|
9987
10029
|
<xsl:template match="@*|node()" mode="update_xml_step1">
|
9988
10030
|
<xsl:copy>
|
@@ -10065,7 +10107,8 @@
|
|
10065
10107
|
</xsl:copy>
|
10066
10108
|
</xsl:template>
|
10067
10109
|
|
10068
|
-
|
10110
|
+
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
10111
|
+
<xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']" mode="update_xml_step1" priority="2">
|
10069
10112
|
<xsl:copy>
|
10070
10113
|
<xsl:copy-of select="@*"/>
|
10071
10114
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -4162,6 +4162,10 @@
|
|
4162
4162
|
<xsl:variable name="footnote_inline">
|
4163
4163
|
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
4164
4164
|
|
4165
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'fn']">
|
4166
|
+
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
4167
|
+
</xsl:if>
|
4168
|
+
|
4165
4169
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
4166
4170
|
<xsl:value-of select="$current_fn_number_text"/>
|
4167
4171
|
</fo:basic-link>
|
@@ -5326,6 +5330,23 @@
|
|
5326
5330
|
<xsl:apply-templates/>
|
5327
5331
|
</xsl:template>
|
5328
5332
|
|
5333
|
+
<!-- Don't break standard's numbers -->
|
5334
|
+
<!-- Example : <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
5335
|
+
<xsl:template match="*[local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']" priority="2">
|
5336
|
+
<xsl:choose>
|
5337
|
+
<xsl:when test="ancestor::*[local-name() = 'table']"><xsl:apply-templates/></xsl:when>
|
5338
|
+
<xsl:when test="following-sibling::*[2][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']">
|
5339
|
+
<fo:inline keep-with-next.within-line="always"><xsl:apply-templates/></fo:inline>
|
5340
|
+
</xsl:when>
|
5341
|
+
<xsl:otherwise>
|
5342
|
+
<xsl:apply-templates/>
|
5343
|
+
</xsl:otherwise>
|
5344
|
+
</xsl:choose>
|
5345
|
+
</xsl:template>
|
5346
|
+
<xsl:template match="text()[not(ancestor::*[local-name() = 'table']) and preceding-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear'] and following-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']]" priority="2">
|
5347
|
+
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
5348
|
+
</xsl:template>
|
5349
|
+
|
5329
5350
|
<!-- ========================= -->
|
5330
5351
|
<!-- END Rich text formatting -->
|
5331
5352
|
<!-- ========================= -->
|
@@ -5721,7 +5742,7 @@
|
|
5721
5742
|
<xsl:choose>
|
5722
5743
|
<xsl:when test="@colspan">
|
5723
5744
|
<xsl:variable name="td">
|
5724
|
-
<xsl:element name="
|
5745
|
+
<xsl:element name="{local-name()}">
|
5725
5746
|
<xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
|
5726
5747
|
<xsl:if test="local-name()='th'">
|
5727
5748
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -5736,7 +5757,7 @@
|
|
5736
5757
|
</xsl:call-template>
|
5737
5758
|
</xsl:when>
|
5738
5759
|
<xsl:otherwise>
|
5739
|
-
<xsl:element name="
|
5760
|
+
<xsl:element name="{local-name()}">
|
5740
5761
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
5741
5762
|
<xsl:if test="local-name()='th'">
|
5742
5763
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -5803,7 +5824,7 @@
|
|
5803
5824
|
<xsl:variable name="currentRow" select="."/>
|
5804
5825
|
|
5805
5826
|
<xsl:variable name="normalizedTDs">
|
5806
|
-
<xsl:for-each select="xalan:nodeset($previousRow)
|
5827
|
+
<xsl:for-each select="xalan:nodeset($previousRow)//*[self::td or self::th]">
|
5807
5828
|
<xsl:choose>
|
5808
5829
|
<xsl:when test="@rowspan > 1">
|
5809
5830
|
<xsl:copy>
|
@@ -5815,7 +5836,7 @@
|
|
5815
5836
|
</xsl:copy>
|
5816
5837
|
</xsl:when>
|
5817
5838
|
<xsl:otherwise>
|
5818
|
-
<xsl:copy-of select="$currentRow
|
5839
|
+
<xsl:copy-of select="$currentRow/*[self::td or self::th][1 + count(current()/preceding-sibling::*[self::td or self::th][not(@rowspan) or (@rowspan = 1)])]"/>
|
5819
5840
|
</xsl:otherwise>
|
5820
5841
|
</xsl:choose>
|
5821
5842
|
</xsl:for-each>
|
@@ -6489,12 +6510,6 @@
|
|
6489
6510
|
|
6490
6511
|
<fo:block-container margin-left="0mm">
|
6491
6512
|
|
6492
|
-
<!-- <xsl:if test="$namespace = 'iho'">
|
6493
|
-
<xsl:if test="ancestor::iho:td">
|
6494
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
6495
|
-
</xsl:if>
|
6496
|
-
</xsl:if> -->
|
6497
|
-
|
6498
6513
|
<fo:block>
|
6499
6514
|
|
6500
6515
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
@@ -7002,6 +7017,31 @@
|
|
7002
7017
|
<xsl:apply-templates mode="svg_update"/>
|
7003
7018
|
</xsl:copy>
|
7004
7019
|
</xsl:template>
|
7020
|
+
|
7021
|
+
<!-- regex for 'display: inline-block;' -->
|
7022
|
+
<xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
|
7023
|
+
<xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
|
7024
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), $regex_svg_style_notsupported, '')"/>
|
7025
|
+
</xsl:template>
|
7026
|
+
|
7027
|
+
<!-- replace
|
7028
|
+
stroke="rgba(r, g, b, alpha)" to
|
7029
|
+
stroke="rgb(r,g,b)" stroke-opacity="alpha", and
|
7030
|
+
fill="rgba(r, g, b, alpha)" to
|
7031
|
+
fill="rgb(r,g,b)" fill-opacity="alpha" -->
|
7032
|
+
<xsl:template match="@*[local-name() = 'stroke' or local-name() = 'fill'][starts-with(normalize-space(.), 'rgba')]" mode="svg_update">
|
7033
|
+
<xsl:variable name="components_">
|
7034
|
+
<xsl:call-template name="split">
|
7035
|
+
<xsl:with-param name="pText" select="substring-before(substring-after(., '('), ')')"/>
|
7036
|
+
<xsl:with-param name="sep" select="','"/>
|
7037
|
+
</xsl:call-template>
|
7038
|
+
</xsl:variable>
|
7039
|
+
<xsl:variable name="components" select="xalan:nodeset($components_)"/>
|
7040
|
+
<xsl:variable name="att_name" select="local-name()"/>
|
7041
|
+
<xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/item[1], ',', $components/item[2], ',', $components/item[3], ')')"/></xsl:attribute>
|
7042
|
+
<xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/item[4]"/></xsl:attribute>
|
7043
|
+
</xsl:template>
|
7044
|
+
|
7005
7045
|
<!-- ============== -->
|
7006
7046
|
<!-- END: svg_update -->
|
7007
7047
|
<!-- ============== -->
|
@@ -9982,7 +10022,9 @@
|
|
9982
10022
|
<!-- Update xml -->
|
9983
10023
|
<!-- ===================================== -->
|
9984
10024
|
<!-- =========================================================================== -->
|
9985
|
-
<!-- STEP1:
|
10025
|
+
<!-- STEP1: -->
|
10026
|
+
<!-- - Re-order elements in 'preface', 'sections' based on @displayorder -->
|
10027
|
+
<!-- - Ignore 'span' without style -->
|
9986
10028
|
<!-- =========================================================================== -->
|
9987
10029
|
<xsl:template match="@*|node()" mode="update_xml_step1">
|
9988
10030
|
<xsl:copy>
|
@@ -10065,7 +10107,8 @@
|
|
10065
10107
|
</xsl:copy>
|
10066
10108
|
</xsl:template>
|
10067
10109
|
|
10068
|
-
|
10110
|
+
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
10111
|
+
<xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']" mode="update_xml_step1" priority="2">
|
10069
10112
|
<xsl:copy>
|
10070
10113
|
<xsl:copy-of select="@*"/>
|
10071
10114
|
<xsl:apply-templates mode="update_xml_step1"/>
|