metanorma-ogc 1.2.9 → 1.2.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -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">
@@ -1291,6 +1291,7 @@
1291
1291
 
1292
1292
  </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1293
1293
 
1294
+
1294
1295
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1295
1296
 
1296
1297
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
@@ -2346,7 +2347,9 @@
2346
2347
  </xsl:template><xsl:template match="*[local-name()='dl']">
2347
2348
  <fo:block-container>
2348
2349
 
2349
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2350
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2351
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2352
+ </xsl:if>
2350
2353
 
2351
2354
 
2352
2355
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -2361,6 +2364,7 @@
2361
2364
  <fo:block-container>
2362
2365
 
2363
2366
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2367
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2364
2368
 
2365
2369
 
2366
2370
  <xsl:variable name="parent" select="local-name(..)"/>
@@ -2544,12 +2548,32 @@
2544
2548
  </xsl:otherwise>
2545
2549
  </xsl:choose>
2546
2550
  </xsl:template><xsl:template name="getMaxLength_dt">
2547
- <xsl:for-each select="*[local-name()='dt']">
2548
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
2549
- <xsl:if test="position() = 1">
2550
- <xsl:value-of select="string-length(normalize-space(.))"/>
2551
- </xsl:if>
2552
- </xsl:for-each>
2551
+ <xsl:variable name="lengths">
2552
+ <xsl:for-each select="*[local-name()='dt']">
2553
+ <xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
2554
+ <xsl:variable name="attributes">
2555
+ <xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
2556
+ <xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
2557
+ </xsl:variable>
2558
+ <length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
2559
+ </xsl:for-each>
2560
+ </xsl:variable>
2561
+ <xsl:variable name="maxLength">
2562
+ <!-- <xsl:for-each select="*[local-name()='dt']">
2563
+ <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
2564
+ <xsl:if test="position() = 1">
2565
+ <xsl:value-of select="string-length(normalize-space(.))"/>
2566
+ </xsl:if>
2567
+ </xsl:for-each> -->
2568
+ <xsl:for-each select="xalan:nodeset($lengths)/length">
2569
+ <xsl:sort select="." data-type="number" order="descending"/>
2570
+ <xsl:if test="position() = 1">
2571
+ <xsl:value-of select="."/>
2572
+ </xsl:if>
2573
+ </xsl:for-each>
2574
+ </xsl:variable>
2575
+ <!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
2576
+ <xsl:value-of select="$maxLength"/>
2553
2577
  </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
2554
2578
  <xsl:param name="key_iso"/>
2555
2579
 
@@ -3355,6 +3379,8 @@
3355
3379
  <xsl:variable name="bookmark-title_">
3356
3380
  <xsl:call-template name="getLangVersion">
3357
3381
  <xsl:with-param name="lang" select="@lang"/>
3382
+ <xsl:with-param name="doctype" select="@doctype"/>
3383
+ <xsl:with-param name="title" select="@title-part"/>
3358
3384
  </xsl:call-template>
3359
3385
  </xsl:variable>
3360
3386
  <xsl:choose>
@@ -3372,13 +3398,34 @@
3372
3398
  </xsl:choose>
3373
3399
  </fo:bookmark-title>
3374
3400
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
3401
+
3402
+ <xsl:call-template name="insertFigureBookmarks">
3403
+ <xsl:with-param name="contents" select="contents"/>
3404
+ </xsl:call-template>
3405
+
3406
+ <xsl:call-template name="insertTableBookmarks">
3407
+ <xsl:with-param name="contents" select="contents"/>
3408
+ <xsl:with-param name="lang" select="@lang"/>
3409
+ </xsl:call-template>
3410
+
3375
3411
  </fo:bookmark>
3376
3412
 
3377
3413
  </xsl:for-each>
3378
3414
  </xsl:when>
3379
3415
  <xsl:otherwise>
3380
3416
  <xsl:for-each select="xalan:nodeset($contents)/doc">
3417
+
3381
3418
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
3419
+
3420
+ <xsl:call-template name="insertFigureBookmarks">
3421
+ <xsl:with-param name="contents" select="contents"/>
3422
+ </xsl:call-template>
3423
+
3424
+ <xsl:call-template name="insertTableBookmarks">
3425
+ <xsl:with-param name="contents" select="contents"/>
3426
+ <xsl:with-param name="lang" select="@lang"/>
3427
+ </xsl:call-template>
3428
+
3382
3429
  </xsl:for-each>
3383
3430
  </xsl:otherwise>
3384
3431
  </xsl:choose>
@@ -3408,8 +3455,44 @@
3408
3455
 
3409
3456
  </fo:bookmark-tree>
3410
3457
  </xsl:if>
3458
+ </xsl:template><xsl:template name="insertFigureBookmarks">
3459
+ <xsl:param name="contents"/>
3460
+ <xsl:if test="xalan:nodeset($contents)/figure">
3461
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
3462
+ <fo:bookmark-title>Figures</fo:bookmark-title>
3463
+ <xsl:for-each select="xalan:nodeset($contents)/figure">
3464
+ <fo:bookmark internal-destination="{@id}">
3465
+ <fo:bookmark-title>
3466
+ <xsl:value-of select="normalize-space(title)"/>
3467
+ </fo:bookmark-title>
3468
+ </fo:bookmark>
3469
+ </xsl:for-each>
3470
+ </fo:bookmark>
3471
+ </xsl:if>
3472
+ </xsl:template><xsl:template name="insertTableBookmarks">
3473
+ <xsl:param name="contents"/>
3474
+ <xsl:param name="lang"/>
3475
+ <xsl:if test="xalan:nodeset($contents)/table">
3476
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
3477
+ <fo:bookmark-title>
3478
+ <xsl:choose>
3479
+ <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
3480
+ <xsl:otherwise>Tables</xsl:otherwise>
3481
+ </xsl:choose>
3482
+ </fo:bookmark-title>
3483
+ <xsl:for-each select="xalan:nodeset($contents)/table">
3484
+ <fo:bookmark internal-destination="{@id}">
3485
+ <fo:bookmark-title>
3486
+ <xsl:value-of select="normalize-space(title)"/>
3487
+ </fo:bookmark-title>
3488
+ </fo:bookmark>
3489
+ </xsl:for-each>
3490
+ </fo:bookmark>
3491
+ </xsl:if>
3411
3492
  </xsl:template><xsl:template name="getLangVersion">
3412
3493
  <xsl:param name="lang"/>
3494
+ <xsl:param name="doctype" select="''"/>
3495
+ <xsl:param name="title" select="''"/>
3413
3496
  <xsl:choose>
3414
3497
  <xsl:when test="$lang = 'en'">
3415
3498
 
@@ -3913,7 +3996,8 @@
3913
3996
  <fo:block-container margin-left="0mm">
3914
3997
 
3915
3998
  <fo:block xsl:use-attribute-sets="quote-style">
3916
- <xsl:apply-templates select=".//*[local-name() = 'p']"/>
3999
+ <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
4000
+ <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
3917
4001
  </fo:block>
3918
4002
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3919
4003
  <fo:block xsl:use-attribute-sets="quote-source-style">