metanorma-ogc 2.5.5 → 2.5.7
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 +298 -70
- data/lib/isodoc/ogc/ogc.best-practice.xsl +298 -70
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +298 -70
- data/lib/isodoc/ogc/ogc.community-practice.xsl +298 -70
- data/lib/isodoc/ogc/ogc.community-standard.xsl +298 -70
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +298 -70
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +298 -70
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +298 -70
- data/lib/isodoc/ogc/ogc.other.xsl +298 -70
- data/lib/isodoc/ogc/ogc.policy.xsl +298 -70
- data/lib/isodoc/ogc/ogc.reference-model.xsl +298 -70
- data/lib/isodoc/ogc/ogc.release-notes.xsl +298 -70
- data/lib/isodoc/ogc/ogc.standard.xsl +298 -70
- data/lib/isodoc/ogc/ogc.test-suite.xsl +298 -70
- data/lib/isodoc/ogc/ogc.user-guide.xsl +298 -70
- data/lib/isodoc/ogc/ogc.white-paper.xsl +220 -53
- data/lib/isodoc/ogc/word_convert.rb +0 -3
- data/lib/metanorma/ogc/biblio.rng +22 -23
- data/lib/metanorma/ogc/isodoc.rng +37 -116
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
@@ -660,17 +660,30 @@
|
|
660
660
|
<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 -->
|
661
661
|
|
662
662
|
<xsl:param name="table_if">false</xsl:param> <!-- generate extended table in IF for autolayout-algorithm -->
|
663
|
-
<xsl:param name="table_widths"/> <!-- path to xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
663
|
+
<xsl:param name="table_widths"/> <!-- (debug: path to) xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
664
664
|
<!-- Example: <tables>
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
665
|
+
<table page-width="509103" id="table1" width_max="223561" width_min="223560">
|
666
|
+
<column width_max="39354" width_min="39354"/>
|
667
|
+
<column width_max="75394" width_min="75394"/>
|
668
|
+
<column width_max="108813" width_min="108813"/>
|
669
|
+
<tbody>
|
670
|
+
<tr>
|
671
|
+
<td width_max="39354" width_min="39354">
|
672
|
+
<p_len>39354</p_len>
|
673
|
+
<word_len>39354</word_len>
|
674
|
+
</td>
|
675
|
+
|
676
|
+
OLD:
|
677
|
+
<tables>
|
678
|
+
<table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
|
679
|
+
<tbody>
|
680
|
+
<tr>
|
681
|
+
<td id="tab-symdu_1_1">
|
682
|
+
<p_len>6</p_len>
|
683
|
+
<p_len>100</p_len> for 2nd paragraph
|
684
|
+
<word_len>6</word_len>
|
685
|
+
<word_len>20</word_len>
|
686
|
+
...
|
674
687
|
-->
|
675
688
|
|
676
689
|
<!-- for command line debug: <xsl:variable name="table_widths_from_if" select="document($table_widths)"/> -->
|
@@ -890,6 +903,9 @@
|
|
890
903
|
<xsl:variable name="hair_space"> </xsl:variable>
|
891
904
|
<xsl:variable name="en_dash">–</xsl:variable>
|
892
905
|
<xsl:variable name="em_dash">—</xsl:variable>
|
906
|
+
<xsl:variable name="cr"> </xsl:variable>
|
907
|
+
<xsl:variable name="lf">
|
908
|
+
</xsl:variable>
|
893
909
|
|
894
910
|
<xsl:template name="getTitle">
|
895
911
|
<xsl:param name="name"/>
|
@@ -2663,6 +2679,20 @@
|
|
2663
2679
|
</xsl:for-each>
|
2664
2680
|
</xsl:template>
|
2665
2681
|
|
2682
|
+
<xsl:param name="table_only_with_id"/><!-- Example: table1, for table auto-layout algorithm -->
|
2683
|
+
|
2684
|
+
<xsl:template match="*[local-name()='table']" priority="2">
|
2685
|
+
<xsl:choose>
|
2686
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
2687
|
+
<xsl:call-template name="table"/>
|
2688
|
+
</xsl:when>
|
2689
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
2690
|
+
<xsl:otherwise>
|
2691
|
+
<xsl:call-template name="table"/>
|
2692
|
+
</xsl:otherwise>
|
2693
|
+
</xsl:choose>
|
2694
|
+
</xsl:template>
|
2695
|
+
|
2666
2696
|
<xsl:template match="*[local-name()='table']" name="table">
|
2667
2697
|
|
2668
2698
|
<xsl:variable name="table-preamble">
|
@@ -2672,9 +2702,11 @@
|
|
2672
2702
|
<xsl:variable name="table">
|
2673
2703
|
|
2674
2704
|
<xsl:variable name="simple-table">
|
2675
|
-
<xsl:
|
2676
|
-
<xsl:
|
2677
|
-
|
2705
|
+
<xsl:if test="$isGenerateTableIF = 'true' and $isApplyAutolayoutAlgorithm = 'true'">
|
2706
|
+
<xsl:call-template name="getSimpleTable">
|
2707
|
+
<xsl:with-param name="id" select="@id"/>
|
2708
|
+
</xsl:call-template>
|
2709
|
+
</xsl:if>
|
2678
2710
|
</xsl:variable>
|
2679
2711
|
<!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
|
2680
2712
|
|
@@ -2774,9 +2806,9 @@
|
|
2774
2806
|
</xsl:attribute>
|
2775
2807
|
</xsl:for-each>
|
2776
2808
|
|
2777
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
2809
|
+
<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']"/>
|
2778
2810
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2779
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute
|
2811
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
|
2780
2812
|
</xsl:if>
|
2781
2813
|
|
2782
2814
|
<xsl:choose>
|
@@ -2927,9 +2959,28 @@
|
|
2927
2959
|
|
2928
2960
|
</fo:block>
|
2929
2961
|
|
2962
|
+
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
2963
|
+
<xsl:if test="$continued = 'true'">
|
2964
|
+
<fo:block text-align="right">
|
2965
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
2966
|
+
</fo:block>
|
2967
|
+
</xsl:if>
|
2968
|
+
<!-- </xsl:if> -->
|
2969
|
+
|
2930
2970
|
</xsl:if>
|
2931
2971
|
</xsl:template> <!-- table/name -->
|
2932
2972
|
|
2973
|
+
<!-- workaround solution for https://github.com/metanorma/metanorma-iso/issues/1151#issuecomment-2033087938 -->
|
2974
|
+
<xsl:template match="*[local-name()='table']/*[local-name() = 'note'][@type = 'units']/*[local-name() = 'p']/text()" priority="4">
|
2975
|
+
<xsl:choose>
|
2976
|
+
<xsl:when test="preceding-sibling::*[local-name() = 'br']">
|
2977
|
+
<!-- remove CR or LF at start -->
|
2978
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'^( | | )', '')"/>
|
2979
|
+
</xsl:when>
|
2980
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
2981
|
+
</xsl:choose>
|
2982
|
+
</xsl:template>
|
2983
|
+
|
2933
2984
|
<!-- SOURCE: ... -->
|
2934
2985
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
|
2935
2986
|
<xsl:call-template name="termsource"/>
|
@@ -3340,7 +3391,7 @@
|
|
3340
3391
|
<xsl:param name="colwidths"/>
|
3341
3392
|
<xsl:param name="colgroup"/>
|
3342
3393
|
|
3343
|
-
<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']"/>
|
3394
|
+
<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']"/>
|
3344
3395
|
|
3345
3396
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
3346
3397
|
|
@@ -3412,7 +3463,7 @@
|
|
3412
3463
|
|
3413
3464
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
3414
3465
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
3415
|
-
<xsl:apply-templates select="../*[local-name()='note']"/>
|
3466
|
+
<xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
|
3416
3467
|
<xsl:apply-templates select="../*[local-name()='example']"/>
|
3417
3468
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
3418
3469
|
|
@@ -3422,7 +3473,7 @@
|
|
3422
3473
|
|
3423
3474
|
<!-- horizontal row separator -->
|
3424
3475
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
3425
|
-
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
3476
|
+
<xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
3426
3477
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
3427
3478
|
|
3428
3479
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -4098,7 +4149,20 @@
|
|
4098
4149
|
<!-- Definition List -->
|
4099
4150
|
<!-- ===================== -->
|
4100
4151
|
|
4101
|
-
|
4152
|
+
<!-- for table auto-layout algorithm -->
|
4153
|
+
<xsl:template match="*[local-name()='dl']" priority="2">
|
4154
|
+
<xsl:choose>
|
4155
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
4156
|
+
<xsl:call-template name="dl"/>
|
4157
|
+
</xsl:when>
|
4158
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
4159
|
+
<xsl:otherwise>
|
4160
|
+
<xsl:call-template name="dl"/>
|
4161
|
+
</xsl:otherwise>
|
4162
|
+
</xsl:choose>
|
4163
|
+
</xsl:template>
|
4164
|
+
|
4165
|
+
<xsl:template match="*[local-name()='dl']" name="dl">
|
4102
4166
|
<xsl:variable name="isAdded" select="@added"/>
|
4103
4167
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
4104
4168
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
@@ -6032,7 +6096,13 @@
|
|
6032
6096
|
<xsl:value-of select="$language_current_2"/>
|
6033
6097
|
</xsl:when>
|
6034
6098
|
<xsl:otherwise>
|
6035
|
-
<xsl:
|
6099
|
+
<xsl:variable name="language_current_3" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'])"/>
|
6100
|
+
<xsl:choose>
|
6101
|
+
<xsl:when test="$language_current_3 != ''">
|
6102
|
+
<xsl:value-of select="$language_current_3"/>
|
6103
|
+
</xsl:when>
|
6104
|
+
<xsl:otherwise>en</xsl:otherwise>
|
6105
|
+
</xsl:choose>
|
6036
6106
|
</xsl:otherwise>
|
6037
6107
|
</xsl:choose>
|
6038
6108
|
</xsl:otherwise>
|
@@ -6896,10 +6966,11 @@
|
|
6896
6966
|
</xsl:template>
|
6897
6967
|
|
6898
6968
|
<xsl:template match="*[local-name() = 'image']">
|
6969
|
+
<xsl:param name="indent">0</xsl:param>
|
6899
6970
|
<xsl:variable name="isAdded" select="../@added"/>
|
6900
6971
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
6901
6972
|
<xsl:choose>
|
6902
|
-
<xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
6973
|
+
<xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']"> <!-- inline image ( 'image:path' in adoc, with one colon after image) -->
|
6903
6974
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
6904
6975
|
<xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
6905
6976
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -6908,7 +6979,43 @@
|
|
6908
6979
|
<xsl:variable name="src">
|
6909
6980
|
<xsl:call-template name="image_src"/>
|
6910
6981
|
</xsl:variable>
|
6911
|
-
|
6982
|
+
|
6983
|
+
<xsl:variable name="scale">
|
6984
|
+
<xsl:call-template name="getImageScale">
|
6985
|
+
<xsl:with-param name="indent" select="$indent"/>
|
6986
|
+
</xsl:call-template>
|
6987
|
+
</xsl:variable>
|
6988
|
+
|
6989
|
+
<!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
|
6990
|
+
|
6991
|
+
<!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
|
6992
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
|
6993
|
+
|
6994
|
+
<xsl:variable name="width">
|
6995
|
+
<xsl:call-template name="setImageWidth"/>
|
6996
|
+
</xsl:variable>
|
6997
|
+
<xsl:if test="$width != ''">
|
6998
|
+
<xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
|
6999
|
+
</xsl:if>
|
7000
|
+
<xsl:variable name="height">
|
7001
|
+
<xsl:call-template name="setImageHeight"/>
|
7002
|
+
</xsl:variable>
|
7003
|
+
<xsl:if test="$height != ''">
|
7004
|
+
<xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
|
7005
|
+
</xsl:if>
|
7006
|
+
|
7007
|
+
<xsl:if test="$width = '' and $height = ''">
|
7008
|
+
<xsl:if test="number($scale) < 100">
|
7009
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale)"/>%</xsl:attribute>
|
7010
|
+
<!-- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
7011
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
7012
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
7013
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute> -->
|
7014
|
+
</xsl:if>
|
7015
|
+
</xsl:if>
|
7016
|
+
|
7017
|
+
</fo:external-graphic>
|
7018
|
+
|
6912
7019
|
</fo:inline>
|
6913
7020
|
</xsl:when>
|
6914
7021
|
<xsl:otherwise>
|
@@ -6929,25 +7036,23 @@
|
|
6929
7036
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
6930
7037
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
6931
7038
|
|
6932
|
-
|
7039
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
6933
7040
|
|
6934
7041
|
</fo:instream-foreign-object>
|
6935
7042
|
</xsl:when>
|
6936
7043
|
<xsl:otherwise>
|
7044
|
+
<!-- <fo:block>debug block image:
|
7045
|
+
<xsl:variable name="scale">
|
7046
|
+
<xsl:call-template name="getImageScale">
|
7047
|
+
<xsl:with-param name="indent" select="$indent"/>
|
7048
|
+
</xsl:call-template>
|
7049
|
+
</xsl:variable>
|
7050
|
+
<xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
|
7051
|
+
</fo:block> -->
|
6937
7052
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
6938
|
-
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
6939
|
-
|
6940
|
-
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
6941
|
-
<xsl:attribute name="width">
|
6942
|
-
<xsl:value-of select="@width"/>
|
6943
|
-
</xsl:attribute>
|
6944
|
-
</xsl:if>
|
7053
|
+
<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'])">
|
6945
7054
|
|
6946
|
-
<xsl:
|
6947
|
-
<xsl:attribute name="height">
|
6948
|
-
<xsl:value-of select="@height"/>
|
6949
|
-
</xsl:attribute>
|
6950
|
-
</xsl:if>
|
7055
|
+
<xsl:call-template name="setImageWidthHeight"/>
|
6951
7056
|
|
6952
7057
|
<xsl:choose>
|
6953
7058
|
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
@@ -6955,24 +7060,18 @@
|
|
6955
7060
|
</xsl:when>
|
6956
7061
|
<xsl:otherwise>
|
6957
7062
|
|
6958
|
-
<xsl:variable name="
|
6959
|
-
<xsl:
|
6960
|
-
<xsl:
|
6961
|
-
|
6962
|
-
</xsl:choose>
|
7063
|
+
<xsl:variable name="scale">
|
7064
|
+
<xsl:call-template name="getImageScale">
|
7065
|
+
<xsl:with-param name="indent" select="$indent"/>
|
7066
|
+
</xsl:call-template>
|
6963
7067
|
</xsl:variable>
|
6964
7068
|
|
6965
|
-
<xsl:variable name="
|
6966
|
-
|
6967
|
-
<xsl:value-of select="$width_effective"/>
|
6968
|
-
|
7069
|
+
<xsl:variable name="scaleRatio">
|
7070
|
+
1
|
6969
7071
|
</xsl:variable>
|
6970
7072
|
|
6971
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
6972
7073
|
<xsl:if test="number($scale) < 100">
|
6973
|
-
|
6974
|
-
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
6975
|
-
|
7074
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale) * number($scaleRatio)"/>%</xsl:attribute>
|
6976
7075
|
</xsl:if>
|
6977
7076
|
</xsl:otherwise>
|
6978
7077
|
</xsl:choose>
|
@@ -6988,6 +7087,62 @@
|
|
6988
7087
|
</xsl:choose>
|
6989
7088
|
</xsl:template>
|
6990
7089
|
|
7090
|
+
<xsl:template name="setImageWidth">
|
7091
|
+
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
7092
|
+
<xsl:value-of select="@width"/>
|
7093
|
+
</xsl:if>
|
7094
|
+
</xsl:template>
|
7095
|
+
<xsl:template name="setImageHeight">
|
7096
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
7097
|
+
<xsl:value-of select="@height"/>
|
7098
|
+
</xsl:if>
|
7099
|
+
</xsl:template>
|
7100
|
+
<xsl:template name="setImageWidthHeight">
|
7101
|
+
<xsl:variable name="width">
|
7102
|
+
<xsl:call-template name="setImageWidth"/>
|
7103
|
+
</xsl:variable>
|
7104
|
+
<xsl:if test="$width != ''">
|
7105
|
+
<xsl:attribute name="width">
|
7106
|
+
<xsl:value-of select="$width"/>
|
7107
|
+
</xsl:attribute>
|
7108
|
+
</xsl:if>
|
7109
|
+
<xsl:variable name="height">
|
7110
|
+
<xsl:call-template name="setImageHeight"/>
|
7111
|
+
</xsl:variable>
|
7112
|
+
<xsl:if test="$height != ''">
|
7113
|
+
<xsl:attribute name="height">
|
7114
|
+
<xsl:value-of select="$height"/>
|
7115
|
+
</xsl:attribute>
|
7116
|
+
</xsl:if>
|
7117
|
+
</xsl:template>
|
7118
|
+
|
7119
|
+
<xsl:template name="getImageScale">
|
7120
|
+
<xsl:param name="indent"/>
|
7121
|
+
<xsl:variable name="indent_left">
|
7122
|
+
<xsl:choose>
|
7123
|
+
<xsl:when test="$indent != ''"><xsl:value-of select="$indent"/></xsl:when>
|
7124
|
+
<xsl:otherwise>0</xsl:otherwise>
|
7125
|
+
</xsl:choose>
|
7126
|
+
</xsl:variable>
|
7127
|
+
<xsl:variable name="img_src">
|
7128
|
+
<xsl:choose>
|
7129
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
7130
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
7131
|
+
</xsl:choose>
|
7132
|
+
</xsl:variable>
|
7133
|
+
|
7134
|
+
<xsl:variable name="image_width_effective">
|
7135
|
+
|
7136
|
+
<xsl:value-of select="$width_effective - number($indent_left)"/>
|
7137
|
+
|
7138
|
+
</xsl:variable>
|
7139
|
+
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
7140
|
+
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
7141
|
+
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
7142
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
7143
|
+
<xsl:value-of select="$scale"/>
|
7144
|
+
</xsl:template>
|
7145
|
+
|
6991
7146
|
<xsl:template name="image_src">
|
6992
7147
|
<xsl:choose>
|
6993
7148
|
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
@@ -9695,6 +9850,7 @@
|
|
9695
9850
|
</xsl:template>
|
9696
9851
|
|
9697
9852
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
9853
|
+
<xsl:param name="indent">0</xsl:param>
|
9698
9854
|
<xsl:choose>
|
9699
9855
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
9700
9856
|
<fo:block-container role="SKIP">
|
@@ -9709,7 +9865,9 @@
|
|
9709
9865
|
|
9710
9866
|
<fo:block-container margin-left="0mm" role="SKIP">
|
9711
9867
|
<fo:block>
|
9712
|
-
<xsl:apply-templates select="." mode="list"
|
9868
|
+
<xsl:apply-templates select="." mode="list">
|
9869
|
+
<xsl:with-param name="indent" select="$indent"/>
|
9870
|
+
</xsl:apply-templates>
|
9713
9871
|
</fo:block>
|
9714
9872
|
</fo:block-container>
|
9715
9873
|
</fo:block-container>
|
@@ -9717,7 +9875,9 @@
|
|
9717
9875
|
<xsl:otherwise>
|
9718
9876
|
|
9719
9877
|
<fo:block role="SKIP">
|
9720
|
-
<xsl:apply-templates select="." mode="list"
|
9878
|
+
<xsl:apply-templates select="." mode="list">
|
9879
|
+
<xsl:with-param name="indent" select="$indent"/>
|
9880
|
+
</xsl:apply-templates>
|
9721
9881
|
</fo:block>
|
9722
9882
|
|
9723
9883
|
</xsl:otherwise>
|
@@ -9802,6 +9962,13 @@
|
|
9802
9962
|
</xsl:template>
|
9803
9963
|
|
9804
9964
|
<xsl:template match="*[local-name()='li']">
|
9965
|
+
<xsl:param name="indent">0</xsl:param>
|
9966
|
+
<!-- <fo:list-item xsl:use-attribute-sets="list-item-style">
|
9967
|
+
<fo:list-item-label end-indent="label-end()"><fo:block>x</fo:block></fo:list-item-label>
|
9968
|
+
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
9969
|
+
<fo:block>debug li indent=<xsl:value-of select="$indent"/></fo:block>
|
9970
|
+
</fo:list-item-body>
|
9971
|
+
</fo:list-item> -->
|
9805
9972
|
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
9806
9973
|
<xsl:copy-of select="@id"/>
|
9807
9974
|
|
@@ -9826,7 +9993,9 @@
|
|
9826
9993
|
|
9827
9994
|
<xsl:call-template name="refine_list-item-body-style"/>
|
9828
9995
|
|
9829
|
-
<xsl:apply-templates
|
9996
|
+
<xsl:apply-templates>
|
9997
|
+
<xsl:with-param name="indent" select="$indent"/>
|
9998
|
+
</xsl:apply-templates>
|
9830
9999
|
|
9831
10000
|
<!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
|
9832
10001
|
|
@@ -11987,6 +12156,4 @@
|
|
11987
12156
|
</xsl:if>
|
11988
12157
|
</xsl:template>
|
11989
12158
|
|
11990
|
-
<!-- update -->
|
11991
|
-
|
11992
12159
|
</xsl:stylesheet>
|
@@ -139,9 +139,6 @@ module IsoDoc
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def toWord(result, filename, dir, header)
|
142
|
-
result = from_xhtml(word_cleanup(to_xhtml(result)))
|
143
|
-
.gsub("-DOUBLE_HYPHEN_ESCAPE-", "--")
|
144
|
-
@wordstylesheet = wordstylesheet_update
|
145
142
|
Html2Doc.new(
|
146
143
|
filename: filename, imagedir: @localdir,
|
147
144
|
stylesheet: @wordstylesheet&.path,
|
@@ -95,7 +95,7 @@
|
|
95
95
|
<text/>
|
96
96
|
</element>
|
97
97
|
</define>
|
98
|
-
<define name="
|
98
|
+
<define name="LocalizedStringAttrs">
|
99
99
|
<optional>
|
100
100
|
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
101
101
|
<attribute name="language"/>
|
@@ -106,6 +106,10 @@
|
|
106
106
|
<optional>
|
107
107
|
<attribute name="script"/>
|
108
108
|
</optional>
|
109
|
+
</define>
|
110
|
+
<define name="LocalizedString1">
|
111
|
+
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
112
|
+
<ref name="LocalizedStringAttrs"/>
|
109
113
|
<text/>
|
110
114
|
</define>
|
111
115
|
<define name="LocalizedString">
|
@@ -142,16 +146,8 @@
|
|
142
146
|
<ref name="LocalizedStringOrXsAny"/>
|
143
147
|
</define>
|
144
148
|
<define name="LocalizedStringOrXsAny1">
|
145
|
-
|
146
|
-
|
147
|
-
<attribute name="language"/>
|
148
|
-
</optional>
|
149
|
-
<optional>
|
150
|
-
<attribute name="locale"/>
|
151
|
-
</optional>
|
152
|
-
<optional>
|
153
|
-
<attribute name="script"/>
|
154
|
-
</optional>
|
149
|
+
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
150
|
+
<ref name="LocalizedStringAttrs"/>
|
155
151
|
<oneOrMore>
|
156
152
|
<choice>
|
157
153
|
<text/>
|
@@ -208,6 +204,7 @@
|
|
208
204
|
</define>
|
209
205
|
<define name="roledescription">
|
210
206
|
<element name="description">
|
207
|
+
<ref name="LocalizedStringAttrs"/>
|
211
208
|
<oneOrMore>
|
212
209
|
<ref name="TextElement"/>
|
213
210
|
</oneOrMore>
|
@@ -335,6 +332,7 @@
|
|
335
332
|
</define>
|
336
333
|
<define name="affiliationdescription">
|
337
334
|
<element name="description">
|
335
|
+
<ref name="LocalizedStringAttrs"/>
|
338
336
|
<oneOrMore>
|
339
337
|
<ref name="TextElement"/>
|
340
338
|
</oneOrMore>
|
@@ -948,6 +946,7 @@
|
|
948
946
|
<optional>
|
949
947
|
<attribute name="type"/>
|
950
948
|
</optional>
|
949
|
+
<ref name="LocalizedStringAttrs"/>
|
951
950
|
<zeroOrMore>
|
952
951
|
<ref name="TextElement"/>
|
953
952
|
</zeroOrMore>
|
@@ -1041,15 +1040,7 @@
|
|
1041
1040
|
<data type="boolean"/>
|
1042
1041
|
</attribute>
|
1043
1042
|
</optional>
|
1044
|
-
<
|
1045
|
-
<attribute name="language"/>
|
1046
|
-
</optional>
|
1047
|
-
<optional>
|
1048
|
-
<attribute name="locale"/>
|
1049
|
-
</optional>
|
1050
|
-
<optional>
|
1051
|
-
<attribute name="script"/>
|
1052
|
-
</optional>
|
1043
|
+
<ref name="LocalizedStringAttrs"/>
|
1053
1044
|
<oneOrMore>
|
1054
1045
|
<ref name="TextElement"/>
|
1055
1046
|
</oneOrMore>
|
@@ -1277,6 +1268,7 @@
|
|
1277
1268
|
<optional>
|
1278
1269
|
<attribute name="type"/>
|
1279
1270
|
</optional>
|
1271
|
+
<ref name="LocalizedStringAttrs"/>
|
1280
1272
|
<oneOrMore>
|
1281
1273
|
<ref name="TextElement"/>
|
1282
1274
|
</oneOrMore>
|
@@ -1284,9 +1276,15 @@
|
|
1284
1276
|
</define>
|
1285
1277
|
<define name="bibabstract">
|
1286
1278
|
<element name="abstract">
|
1287
|
-
<
|
1288
|
-
|
1289
|
-
|
1279
|
+
<ref name="LocalizedStringAttrs"/>
|
1280
|
+
<choice>
|
1281
|
+
<oneOrMore>
|
1282
|
+
<ref name="BasicBlock"/>
|
1283
|
+
</oneOrMore>
|
1284
|
+
<oneOrMore>
|
1285
|
+
<ref name="TextElement"/>
|
1286
|
+
</oneOrMore>
|
1287
|
+
</choice>
|
1290
1288
|
</element>
|
1291
1289
|
</define>
|
1292
1290
|
<define name="copyright">
|
@@ -1391,6 +1389,7 @@
|
|
1391
1389
|
</attribute>
|
1392
1390
|
<optional>
|
1393
1391
|
<element name="description">
|
1392
|
+
<ref name="LocalizedStringAttrs"/>
|
1394
1393
|
<oneOrMore>
|
1395
1394
|
<ref name="TextElement"/>
|
1396
1395
|
</oneOrMore>
|