metanorma-ogc 1.2.9 → 1.2.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76f90019c544dd20c528d3e2f57d15793329886d62b98bcba60f969430c87fdf
4
- data.tar.gz: 720a263164977814ab6fa7008563a082d6ebce3d514323efc5cba5abf9ab9695
3
+ metadata.gz: 49726d7c0950f413729cf06730b9008a44c0eda95363d5cd8ec76893bc598a88
4
+ data.tar.gz: 7c1c880b5da6f7c17de035019674a1f9f73cb6829ff4c514a98b82877c06cf00
5
5
  SHA512:
6
- metadata.gz: dce09236dbe9a502c134fbe243fbb9d18eb0d8c1c1ced88af0c7644ba665a054b8e2701b7cfe7a9e4e5cb9ef9f35308165a302858b8771990c046168fadef155
7
- data.tar.gz: 5311eba244989127179285767469d09aa16f00745d814c9b7963ae5eb349fb95932d51489a0e140912585fc424045b6d964a30c851f17d254a7e5e80b8c027da
6
+ metadata.gz: f32b78708d5ade331175eaea35863c95d1f55d14b69967de4269dc9bb404d1c64ab74a1075b849329bfd6dcd8beb20dbc2c1bfa0bb60d739df839e3caf419da9
7
+ data.tar.gz: 6569b56a99419e1ddd1c480ccd5ebbca9b426ee00fca9b1c31895473f627adee8c00048e9eba45f553479ca3ee87dc7bbe275b9253ada88e3be973d2f258c251
@@ -729,12 +729,27 @@
729
729
  </define>
730
730
  <define name="index">
731
731
  <element name="index">
732
- <attribute name="primary"/>
732
+ <attribute name="to">
733
+ <data type="IDREF"/>
734
+ </attribute>
735
+ <element name="primary">
736
+ <oneOrMore>
737
+ <ref name="PureTextElement"/>
738
+ </oneOrMore>
739
+ </element>
733
740
  <optional>
734
- <attribute name="secondary"/>
741
+ <element name="secondary">
742
+ <oneOrMore>
743
+ <ref name="PureTextElement"/>
744
+ </oneOrMore>
745
+ </element>
735
746
  </optional>
736
747
  <optional>
737
- <attribute name="tertiary"/>
748
+ <element name="tertiary">
749
+ <oneOrMore>
750
+ <ref name="PureTextElement"/>
751
+ </oneOrMore>
752
+ </element>
738
753
  </optional>
739
754
  </element>
740
755
  </define>
@@ -127,7 +127,6 @@ module Asciidoctor
127
127
  end
128
128
 
129
129
  def termdef_boilerplate_cleanup(xmldoc)
130
- return
131
130
  end
132
131
 
133
132
  def bibdata_cleanup(xmldoc)
@@ -55,6 +55,13 @@
55
55
  <param name="pattern">\i\c*|\c+#\c+</param>
56
56
  </data>
57
57
  </attribute>
58
+ <optional>
59
+ <attribute name="to">
60
+ <data type="string">
61
+ <param name="pattern">\i\c*|\c+#\c+</param>
62
+ </data>
63
+ </attribute>
64
+ </optional>
58
65
  <optional>
59
66
  <attribute name="type">
60
67
  <ref name="ReferenceFormat"/>
@@ -35,7 +35,7 @@ module IsoDoc
35
35
  end
36
36
  end
37
37
 
38
- def middle_clause
38
+ def middle_clause(_docxml)
39
39
  "//clause[parent::sections][not(@type = 'scope' or "\
40
40
  "@type = 'conformance')][not(descendant::terms)]"
41
41
  end
@@ -1887,6 +1887,7 @@
1887
1887
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1888
1888
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1889
1889
 
1890
+
1890
1891
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1891
1892
 
1892
1893
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
@@ -2946,7 +2947,9 @@
2946
2947
  </xsl:template><xsl:template match="*[local-name()='dl']">
2947
2948
  <fo:block-container>
2948
2949
 
2949
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2950
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2951
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2952
+ </xsl:if>
2950
2953
 
2951
2954
 
2952
2955
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -2961,6 +2964,7 @@
2961
2964
  <fo:block-container>
2962
2965
 
2963
2966
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2967
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2964
2968
 
2965
2969
 
2966
2970
  <xsl:variable name="parent" select="local-name(..)"/>
@@ -3144,12 +3148,32 @@
3144
3148
  </xsl:otherwise>
3145
3149
  </xsl:choose>
3146
3150
  </xsl:template><xsl:template name="getMaxLength_dt">
3147
- <xsl:for-each select="*[local-name()='dt']">
3148
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
3149
- <xsl:if test="position() = 1">
3150
- <xsl:value-of select="string-length(normalize-space(.))"/>
3151
- </xsl:if>
3152
- </xsl:for-each>
3151
+ <xsl:variable name="lengths">
3152
+ <xsl:for-each select="*[local-name()='dt']">
3153
+ <xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
3154
+ <xsl:variable name="attributes">
3155
+ <xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
3156
+ <xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
3157
+ </xsl:variable>
3158
+ <length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
3159
+ </xsl:for-each>
3160
+ </xsl:variable>
3161
+ <xsl:variable name="maxLength">
3162
+ <!-- <xsl:for-each select="*[local-name()='dt']">
3163
+ <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
3164
+ <xsl:if test="position() = 1">
3165
+ <xsl:value-of select="string-length(normalize-space(.))"/>
3166
+ </xsl:if>
3167
+ </xsl:for-each> -->
3168
+ <xsl:for-each select="xalan:nodeset($lengths)/length">
3169
+ <xsl:sort select="." data-type="number" order="descending"/>
3170
+ <xsl:if test="position() = 1">
3171
+ <xsl:value-of select="."/>
3172
+ </xsl:if>
3173
+ </xsl:for-each>
3174
+ </xsl:variable>
3175
+ <!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
3176
+ <xsl:value-of select="$maxLength"/>
3153
3177
  </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
3154
3178
  <xsl:param name="key_iso"/>
3155
3179
 
@@ -3959,6 +3983,8 @@
3959
3983
  <xsl:variable name="bookmark-title_">
3960
3984
  <xsl:call-template name="getLangVersion">
3961
3985
  <xsl:with-param name="lang" select="@lang"/>
3986
+ <xsl:with-param name="doctype" select="@doctype"/>
3987
+ <xsl:with-param name="title" select="@title-part"/>
3962
3988
  </xsl:call-template>
3963
3989
  </xsl:variable>
3964
3990
  <xsl:choose>
@@ -3976,13 +4002,34 @@
3976
4002
  </xsl:choose>
3977
4003
  </fo:bookmark-title>
3978
4004
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
4005
+
4006
+ <xsl:call-template name="insertFigureBookmarks">
4007
+ <xsl:with-param name="contents" select="contents"/>
4008
+ </xsl:call-template>
4009
+
4010
+ <xsl:call-template name="insertTableBookmarks">
4011
+ <xsl:with-param name="contents" select="contents"/>
4012
+ <xsl:with-param name="lang" select="@lang"/>
4013
+ </xsl:call-template>
4014
+
3979
4015
  </fo:bookmark>
3980
4016
 
3981
4017
  </xsl:for-each>
3982
4018
  </xsl:when>
3983
4019
  <xsl:otherwise>
3984
4020
  <xsl:for-each select="xalan:nodeset($contents)/doc">
4021
+
3985
4022
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
4023
+
4024
+ <xsl:call-template name="insertFigureBookmarks">
4025
+ <xsl:with-param name="contents" select="contents"/>
4026
+ </xsl:call-template>
4027
+
4028
+ <xsl:call-template name="insertTableBookmarks">
4029
+ <xsl:with-param name="contents" select="contents"/>
4030
+ <xsl:with-param name="lang" select="@lang"/>
4031
+ </xsl:call-template>
4032
+
3986
4033
  </xsl:for-each>
3987
4034
  </xsl:otherwise>
3988
4035
  </xsl:choose>
@@ -4044,8 +4091,44 @@
4044
4091
 
4045
4092
  </fo:bookmark-tree>
4046
4093
  </xsl:if>
4094
+ </xsl:template><xsl:template name="insertFigureBookmarks">
4095
+ <xsl:param name="contents"/>
4096
+ <xsl:if test="xalan:nodeset($contents)/figure">
4097
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
4098
+ <fo:bookmark-title>Figures</fo:bookmark-title>
4099
+ <xsl:for-each select="xalan:nodeset($contents)/figure">
4100
+ <fo:bookmark internal-destination="{@id}">
4101
+ <fo:bookmark-title>
4102
+ <xsl:value-of select="normalize-space(title)"/>
4103
+ </fo:bookmark-title>
4104
+ </fo:bookmark>
4105
+ </xsl:for-each>
4106
+ </fo:bookmark>
4107
+ </xsl:if>
4108
+ </xsl:template><xsl:template name="insertTableBookmarks">
4109
+ <xsl:param name="contents"/>
4110
+ <xsl:param name="lang"/>
4111
+ <xsl:if test="xalan:nodeset($contents)/table">
4112
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
4113
+ <fo:bookmark-title>
4114
+ <xsl:choose>
4115
+ <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
4116
+ <xsl:otherwise>Tables</xsl:otherwise>
4117
+ </xsl:choose>
4118
+ </fo:bookmark-title>
4119
+ <xsl:for-each select="xalan:nodeset($contents)/table">
4120
+ <fo:bookmark internal-destination="{@id}">
4121
+ <fo:bookmark-title>
4122
+ <xsl:value-of select="normalize-space(title)"/>
4123
+ </fo:bookmark-title>
4124
+ </fo:bookmark>
4125
+ </xsl:for-each>
4126
+ </fo:bookmark>
4127
+ </xsl:if>
4047
4128
  </xsl:template><xsl:template name="getLangVersion">
4048
4129
  <xsl:param name="lang"/>
4130
+ <xsl:param name="doctype" select="''"/>
4131
+ <xsl:param name="title" select="''"/>
4049
4132
  <xsl:choose>
4050
4133
  <xsl:when test="$lang = 'en'">
4051
4134
 
@@ -4548,7 +4631,8 @@
4548
4631
  <fo:block-container margin-left="0mm">
4549
4632
 
4550
4633
  <fo:block xsl:use-attribute-sets="quote-style">
4551
- <xsl:apply-templates select=".//*[local-name() = 'p']"/>
4634
+ <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
4635
+ <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
4552
4636
  </fo:block>
4553
4637
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
4554
4638
  <fo:block xsl:use-attribute-sets="quote-source-style">
@@ -1887,6 +1887,7 @@
1887
1887
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1888
1888
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1889
1889
 
1890
+
1890
1891
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1891
1892
 
1892
1893
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
@@ -2946,7 +2947,9 @@
2946
2947
  </xsl:template><xsl:template match="*[local-name()='dl']">
2947
2948
  <fo:block-container>
2948
2949
 
2949
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2950
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2951
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2952
+ </xsl:if>
2950
2953
 
2951
2954
 
2952
2955
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -2961,6 +2964,7 @@
2961
2964
  <fo:block-container>
2962
2965
 
2963
2966
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2967
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2964
2968
 
2965
2969
 
2966
2970
  <xsl:variable name="parent" select="local-name(..)"/>
@@ -3144,12 +3148,32 @@
3144
3148
  </xsl:otherwise>
3145
3149
  </xsl:choose>
3146
3150
  </xsl:template><xsl:template name="getMaxLength_dt">
3147
- <xsl:for-each select="*[local-name()='dt']">
3148
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
3149
- <xsl:if test="position() = 1">
3150
- <xsl:value-of select="string-length(normalize-space(.))"/>
3151
- </xsl:if>
3152
- </xsl:for-each>
3151
+ <xsl:variable name="lengths">
3152
+ <xsl:for-each select="*[local-name()='dt']">
3153
+ <xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
3154
+ <xsl:variable name="attributes">
3155
+ <xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
3156
+ <xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
3157
+ </xsl:variable>
3158
+ <length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
3159
+ </xsl:for-each>
3160
+ </xsl:variable>
3161
+ <xsl:variable name="maxLength">
3162
+ <!-- <xsl:for-each select="*[local-name()='dt']">
3163
+ <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
3164
+ <xsl:if test="position() = 1">
3165
+ <xsl:value-of select="string-length(normalize-space(.))"/>
3166
+ </xsl:if>
3167
+ </xsl:for-each> -->
3168
+ <xsl:for-each select="xalan:nodeset($lengths)/length">
3169
+ <xsl:sort select="." data-type="number" order="descending"/>
3170
+ <xsl:if test="position() = 1">
3171
+ <xsl:value-of select="."/>
3172
+ </xsl:if>
3173
+ </xsl:for-each>
3174
+ </xsl:variable>
3175
+ <!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
3176
+ <xsl:value-of select="$maxLength"/>
3153
3177
  </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
3154
3178
  <xsl:param name="key_iso"/>
3155
3179
 
@@ -3959,6 +3983,8 @@
3959
3983
  <xsl:variable name="bookmark-title_">
3960
3984
  <xsl:call-template name="getLangVersion">
3961
3985
  <xsl:with-param name="lang" select="@lang"/>
3986
+ <xsl:with-param name="doctype" select="@doctype"/>
3987
+ <xsl:with-param name="title" select="@title-part"/>
3962
3988
  </xsl:call-template>
3963
3989
  </xsl:variable>
3964
3990
  <xsl:choose>
@@ -3976,13 +4002,34 @@
3976
4002
  </xsl:choose>
3977
4003
  </fo:bookmark-title>
3978
4004
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
4005
+
4006
+ <xsl:call-template name="insertFigureBookmarks">
4007
+ <xsl:with-param name="contents" select="contents"/>
4008
+ </xsl:call-template>
4009
+
4010
+ <xsl:call-template name="insertTableBookmarks">
4011
+ <xsl:with-param name="contents" select="contents"/>
4012
+ <xsl:with-param name="lang" select="@lang"/>
4013
+ </xsl:call-template>
4014
+
3979
4015
  </fo:bookmark>
3980
4016
 
3981
4017
  </xsl:for-each>
3982
4018
  </xsl:when>
3983
4019
  <xsl:otherwise>
3984
4020
  <xsl:for-each select="xalan:nodeset($contents)/doc">
4021
+
3985
4022
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
4023
+
4024
+ <xsl:call-template name="insertFigureBookmarks">
4025
+ <xsl:with-param name="contents" select="contents"/>
4026
+ </xsl:call-template>
4027
+
4028
+ <xsl:call-template name="insertTableBookmarks">
4029
+ <xsl:with-param name="contents" select="contents"/>
4030
+ <xsl:with-param name="lang" select="@lang"/>
4031
+ </xsl:call-template>
4032
+
3986
4033
  </xsl:for-each>
3987
4034
  </xsl:otherwise>
3988
4035
  </xsl:choose>
@@ -4044,8 +4091,44 @@
4044
4091
 
4045
4092
  </fo:bookmark-tree>
4046
4093
  </xsl:if>
4094
+ </xsl:template><xsl:template name="insertFigureBookmarks">
4095
+ <xsl:param name="contents"/>
4096
+ <xsl:if test="xalan:nodeset($contents)/figure">
4097
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
4098
+ <fo:bookmark-title>Figures</fo:bookmark-title>
4099
+ <xsl:for-each select="xalan:nodeset($contents)/figure">
4100
+ <fo:bookmark internal-destination="{@id}">
4101
+ <fo:bookmark-title>
4102
+ <xsl:value-of select="normalize-space(title)"/>
4103
+ </fo:bookmark-title>
4104
+ </fo:bookmark>
4105
+ </xsl:for-each>
4106
+ </fo:bookmark>
4107
+ </xsl:if>
4108
+ </xsl:template><xsl:template name="insertTableBookmarks">
4109
+ <xsl:param name="contents"/>
4110
+ <xsl:param name="lang"/>
4111
+ <xsl:if test="xalan:nodeset($contents)/table">
4112
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
4113
+ <fo:bookmark-title>
4114
+ <xsl:choose>
4115
+ <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
4116
+ <xsl:otherwise>Tables</xsl:otherwise>
4117
+ </xsl:choose>
4118
+ </fo:bookmark-title>
4119
+ <xsl:for-each select="xalan:nodeset($contents)/table">
4120
+ <fo:bookmark internal-destination="{@id}">
4121
+ <fo:bookmark-title>
4122
+ <xsl:value-of select="normalize-space(title)"/>
4123
+ </fo:bookmark-title>
4124
+ </fo:bookmark>
4125
+ </xsl:for-each>
4126
+ </fo:bookmark>
4127
+ </xsl:if>
4047
4128
  </xsl:template><xsl:template name="getLangVersion">
4048
4129
  <xsl:param name="lang"/>
4130
+ <xsl:param name="doctype" select="''"/>
4131
+ <xsl:param name="title" select="''"/>
4049
4132
  <xsl:choose>
4050
4133
  <xsl:when test="$lang = 'en'">
4051
4134
 
@@ -4548,7 +4631,8 @@
4548
4631
  <fo:block-container margin-left="0mm">
4549
4632
 
4550
4633
  <fo:block xsl:use-attribute-sets="quote-style">
4551
- <xsl:apply-templates select=".//*[local-name() = 'p']"/>
4634
+ <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
4635
+ <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
4552
4636
  </fo:block>
4553
4637
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
4554
4638
  <fo:block xsl:use-attribute-sets="quote-source-style">
@@ -1887,6 +1887,7 @@
1887
1887
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1888
1888
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1889
1889
 
1890
+
1890
1891
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1891
1892
 
1892
1893
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
@@ -2946,7 +2947,9 @@
2946
2947
  </xsl:template><xsl:template match="*[local-name()='dl']">
2947
2948
  <fo:block-container>
2948
2949
 
2949
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2950
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2951
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2952
+ </xsl:if>
2950
2953
 
2951
2954
 
2952
2955
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -2961,6 +2964,7 @@
2961
2964
  <fo:block-container>
2962
2965
 
2963
2966
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2967
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2964
2968
 
2965
2969
 
2966
2970
  <xsl:variable name="parent" select="local-name(..)"/>
@@ -3144,12 +3148,32 @@
3144
3148
  </xsl:otherwise>
3145
3149
  </xsl:choose>
3146
3150
  </xsl:template><xsl:template name="getMaxLength_dt">
3147
- <xsl:for-each select="*[local-name()='dt']">
3148
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
3149
- <xsl:if test="position() = 1">
3150
- <xsl:value-of select="string-length(normalize-space(.))"/>
3151
- </xsl:if>
3152
- </xsl:for-each>
3151
+ <xsl:variable name="lengths">
3152
+ <xsl:for-each select="*[local-name()='dt']">
3153
+ <xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
3154
+ <xsl:variable name="attributes">
3155
+ <xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
3156
+ <xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
3157
+ </xsl:variable>
3158
+ <length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
3159
+ </xsl:for-each>
3160
+ </xsl:variable>
3161
+ <xsl:variable name="maxLength">
3162
+ <!-- <xsl:for-each select="*[local-name()='dt']">
3163
+ <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
3164
+ <xsl:if test="position() = 1">
3165
+ <xsl:value-of select="string-length(normalize-space(.))"/>
3166
+ </xsl:if>
3167
+ </xsl:for-each> -->
3168
+ <xsl:for-each select="xalan:nodeset($lengths)/length">
3169
+ <xsl:sort select="." data-type="number" order="descending"/>
3170
+ <xsl:if test="position() = 1">
3171
+ <xsl:value-of select="."/>
3172
+ </xsl:if>
3173
+ </xsl:for-each>
3174
+ </xsl:variable>
3175
+ <!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
3176
+ <xsl:value-of select="$maxLength"/>
3153
3177
  </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
3154
3178
  <xsl:param name="key_iso"/>
3155
3179
 
@@ -3959,6 +3983,8 @@
3959
3983
  <xsl:variable name="bookmark-title_">
3960
3984
  <xsl:call-template name="getLangVersion">
3961
3985
  <xsl:with-param name="lang" select="@lang"/>
3986
+ <xsl:with-param name="doctype" select="@doctype"/>
3987
+ <xsl:with-param name="title" select="@title-part"/>
3962
3988
  </xsl:call-template>
3963
3989
  </xsl:variable>
3964
3990
  <xsl:choose>
@@ -3976,13 +4002,34 @@
3976
4002
  </xsl:choose>
3977
4003
  </fo:bookmark-title>
3978
4004
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
4005
+
4006
+ <xsl:call-template name="insertFigureBookmarks">
4007
+ <xsl:with-param name="contents" select="contents"/>
4008
+ </xsl:call-template>
4009
+
4010
+ <xsl:call-template name="insertTableBookmarks">
4011
+ <xsl:with-param name="contents" select="contents"/>
4012
+ <xsl:with-param name="lang" select="@lang"/>
4013
+ </xsl:call-template>
4014
+
3979
4015
  </fo:bookmark>
3980
4016
 
3981
4017
  </xsl:for-each>
3982
4018
  </xsl:when>
3983
4019
  <xsl:otherwise>
3984
4020
  <xsl:for-each select="xalan:nodeset($contents)/doc">
4021
+
3985
4022
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
4023
+
4024
+ <xsl:call-template name="insertFigureBookmarks">
4025
+ <xsl:with-param name="contents" select="contents"/>
4026
+ </xsl:call-template>
4027
+
4028
+ <xsl:call-template name="insertTableBookmarks">
4029
+ <xsl:with-param name="contents" select="contents"/>
4030
+ <xsl:with-param name="lang" select="@lang"/>
4031
+ </xsl:call-template>
4032
+
3986
4033
  </xsl:for-each>
3987
4034
  </xsl:otherwise>
3988
4035
  </xsl:choose>
@@ -4044,8 +4091,44 @@
4044
4091
 
4045
4092
  </fo:bookmark-tree>
4046
4093
  </xsl:if>
4094
+ </xsl:template><xsl:template name="insertFigureBookmarks">
4095
+ <xsl:param name="contents"/>
4096
+ <xsl:if test="xalan:nodeset($contents)/figure">
4097
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
4098
+ <fo:bookmark-title>Figures</fo:bookmark-title>
4099
+ <xsl:for-each select="xalan:nodeset($contents)/figure">
4100
+ <fo:bookmark internal-destination="{@id}">
4101
+ <fo:bookmark-title>
4102
+ <xsl:value-of select="normalize-space(title)"/>
4103
+ </fo:bookmark-title>
4104
+ </fo:bookmark>
4105
+ </xsl:for-each>
4106
+ </fo:bookmark>
4107
+ </xsl:if>
4108
+ </xsl:template><xsl:template name="insertTableBookmarks">
4109
+ <xsl:param name="contents"/>
4110
+ <xsl:param name="lang"/>
4111
+ <xsl:if test="xalan:nodeset($contents)/table">
4112
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
4113
+ <fo:bookmark-title>
4114
+ <xsl:choose>
4115
+ <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
4116
+ <xsl:otherwise>Tables</xsl:otherwise>
4117
+ </xsl:choose>
4118
+ </fo:bookmark-title>
4119
+ <xsl:for-each select="xalan:nodeset($contents)/table">
4120
+ <fo:bookmark internal-destination="{@id}">
4121
+ <fo:bookmark-title>
4122
+ <xsl:value-of select="normalize-space(title)"/>
4123
+ </fo:bookmark-title>
4124
+ </fo:bookmark>
4125
+ </xsl:for-each>
4126
+ </fo:bookmark>
4127
+ </xsl:if>
4047
4128
  </xsl:template><xsl:template name="getLangVersion">
4048
4129
  <xsl:param name="lang"/>
4130
+ <xsl:param name="doctype" select="''"/>
4131
+ <xsl:param name="title" select="''"/>
4049
4132
  <xsl:choose>
4050
4133
  <xsl:when test="$lang = 'en'">
4051
4134
 
@@ -4548,7 +4631,8 @@
4548
4631
  <fo:block-container margin-left="0mm">
4549
4632
 
4550
4633
  <fo:block xsl:use-attribute-sets="quote-style">
4551
- <xsl:apply-templates select=".//*[local-name() = 'p']"/>
4634
+ <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
4635
+ <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
4552
4636
  </fo:block>
4553
4637
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
4554
4638
  <fo:block xsl:use-attribute-sets="quote-source-style">