metanorma-ogc 1.3.5 → 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,8 +7,12 @@
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
8
  <xsl:param name="basepath"/>
9
9
 
10
- <xsl:variable name="pageWidth" select="'215.9mm'"/>
11
- <xsl:variable name="pageHeight" select="'279.4mm'"/>
10
+ <xsl:variable name="pageWidth" select="215.9"/>
11
+ <xsl:variable name="pageHeight" select="279.4"/>
12
+ <xsl:variable name="marginLeftRight1" select="25.4"/>
13
+ <xsl:variable name="marginLeftRight2" select="25.4"/>
14
+ <xsl:variable name="marginTop" select="25.4"/>
15
+ <xsl:variable name="marginBottom" select="25.4"/>
12
16
 
13
17
 
14
18
 
@@ -97,12 +101,12 @@
97
101
  <fo:layout-master-set>
98
102
 
99
103
  <!-- Document pages -->
100
- <fo:simple-page-master master-name="document" page-width="{$pageWidth}" page-height="{$pageHeight}">
101
- <fo:region-body margin-top="1in" margin-bottom="1in" margin-left="1in" margin-right="1in"/>
102
- <fo:region-before region-name="header" extent="1in" precedence="true"/>
103
- <fo:region-after region-name="footer" extent="1in" precedence="true"/>
104
- <fo:region-start region-name="left" extent="1in"/>
105
- <fo:region-end region-name="right" extent="1in"/>
104
+ <fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
105
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
106
+ <fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
107
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm" precedence="true"/>
108
+ <fo:region-start region-name="left" extent="{$marginLeftRight1}mm"/>
109
+ <fo:region-end region-name="right" extent="{$marginLeftRight2}mm"/>
106
110
  </fo:simple-page-master>
107
111
 
108
112
  </fo:layout-master-set>
@@ -1280,6 +1284,7 @@
1280
1284
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1281
1285
 
1282
1286
 
1287
+
1283
1288
  <xsl:attribute name="color">blue</xsl:attribute>
1284
1289
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1285
1290
 
@@ -1513,14 +1518,15 @@
1513
1518
  <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
1514
1519
 
1515
1520
  <!-- Normative references -->
1516
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
1521
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]" mode="contents"/>
1517
1522
  <!-- Terms and definitions -->
1518
1523
  <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
1519
1524
  <!-- Another main sections -->
1520
1525
  <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
1521
1526
  <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
1522
1527
  <!-- Bibliography -->
1523
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
1528
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
1529
+
1524
1530
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1525
1531
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
1526
1532
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
@@ -2302,6 +2308,7 @@
2302
2308
 
2303
2309
 
2304
2310
 
2311
+
2305
2312
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
2306
2313
  <xsl:attribute name="border">solid 0.5pt rgb(153, 153, 153)</xsl:attribute>
2307
2314
  <xsl:attribute name="height">5mm</xsl:attribute>
@@ -2342,6 +2349,7 @@
2342
2349
 
2343
2350
 
2344
2351
 
2352
+
2345
2353
  <fo:inline padding-right="2mm">
2346
2354
 
2347
2355
 
@@ -2391,6 +2399,7 @@
2391
2399
 
2392
2400
 
2393
2401
 
2402
+
2394
2403
  <xsl:value-of select="@reference"/>
2395
2404
 
2396
2405
 
@@ -2532,6 +2541,9 @@
2532
2541
 
2533
2542
 
2534
2543
 
2544
+
2545
+
2546
+
2535
2547
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2536
2548
  <xsl:attribute name="color">blue</xsl:attribute>
2537
2549
 
@@ -3447,6 +3459,7 @@
3447
3459
  <fo:inline xsl:use-attribute-sets="link-style">
3448
3460
 
3449
3461
 
3462
+
3450
3463
  <xsl:choose>
3451
3464
  <xsl:when test="$target_text = ''">
3452
3465
  <xsl:apply-templates/>
@@ -3801,6 +3814,234 @@
3801
3814
  <xsl:param name="height"/>
3802
3815
  <line xmlns="http://www.w3.org/2000/svg" x1="0" y1="0" x2="{$width}" y2="{$height}" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
3803
3816
  <line xmlns="http://www.w3.org/2000/svg" x1="0" y1="{$height}" x2="{$width}" y2="0" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
3817
+ </xsl:template><xsl:variable name="figure_name_height">14</xsl:variable><xsl:variable name="width_effective" select="$pageWidth - $marginLeftRight1 - $marginLeftRight2"/><xsl:variable name="height_effective" select="$pageHeight - $marginTop - $marginBottom - $figure_name_height"/><xsl:variable name="image_dpi" select="96"/><xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/><xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/><xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image']) and *[local-name() = 'svg']]/*[local-name() = 'name']/*[local-name() = 'bookmark']" priority="2"/><xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image'])]/*[local-name() = 'svg']" priority="2" name="image_svg">
3818
+ <xsl:param name="name"/>
3819
+
3820
+ <xsl:variable name="svg_content">
3821
+ <xsl:apply-templates select="." mode="svg_update"/>
3822
+ </xsl:variable>
3823
+
3824
+ <xsl:variable name="alt-text">
3825
+ <xsl:choose>
3826
+ <xsl:when test="normalize-space(../*[local-name() = 'name']) != ''">
3827
+ <xsl:value-of select="../*[local-name() = 'name']"/>
3828
+ </xsl:when>
3829
+ <xsl:when test="normalize-space($name) != ''">
3830
+ <xsl:value-of select="$name"/>
3831
+ </xsl:when>
3832
+ <xsl:otherwise>Figure</xsl:otherwise>
3833
+ </xsl:choose>
3834
+ </xsl:variable>
3835
+
3836
+ <xsl:choose>
3837
+ <xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
3838
+ <fo:block>
3839
+ <xsl:variable name="width" select="@width"/>
3840
+ <xsl:variable name="height" select="@height"/>
3841
+
3842
+ <xsl:variable name="scale_x">
3843
+ <xsl:choose>
3844
+ <xsl:when test="$width &gt; $width_effective_px">
3845
+ <xsl:value-of select="$width_effective_px div $width"/>
3846
+ </xsl:when>
3847
+ <xsl:otherwise>1</xsl:otherwise>
3848
+ </xsl:choose>
3849
+ </xsl:variable>
3850
+
3851
+ <xsl:variable name="scale_y">
3852
+ <xsl:choose>
3853
+ <xsl:when test="$height * $scale_x &gt; $height_effective_px">
3854
+ <xsl:value-of select="$height_effective_px div ($height * $scale_x)"/>
3855
+ </xsl:when>
3856
+ <xsl:otherwise>1</xsl:otherwise>
3857
+ </xsl:choose>
3858
+ </xsl:variable>
3859
+
3860
+ <xsl:variable name="scale">
3861
+ <xsl:choose>
3862
+ <xsl:when test="$scale_y != 1">
3863
+ <xsl:value-of select="$scale_x * $scale_y"/>
3864
+ </xsl:when>
3865
+ <xsl:otherwise>
3866
+ <xsl:value-of select="$scale_x"/>
3867
+ </xsl:otherwise>
3868
+ </xsl:choose>
3869
+ </xsl:variable>
3870
+
3871
+ <xsl:variable name="width_scale" select="round($width * $scale)"/>
3872
+ <xsl:variable name="height_scale" select="round($height * $scale)"/>
3873
+
3874
+ <fo:table table-layout="fixed" width="100%">
3875
+ <fo:table-column column-width="proportional-column-width(1)"/>
3876
+ <fo:table-column column-width="{$width_scale}px"/>
3877
+ <fo:table-column column-width="proportional-column-width(1)"/>
3878
+ <fo:table-body>
3879
+ <fo:table-row>
3880
+ <fo:table-cell column-number="2">
3881
+ <fo:block>
3882
+ <fo:block-container width="{$width_scale}px" height="{$height_scale}px">
3883
+ <xsl:if test="../*[local-name() = 'name']/*[local-name() = 'bookmark']">
3884
+ <fo:block line-height="0" font-size="0">
3885
+ <xsl:for-each select="../*[local-name() = 'name']/*[local-name() = 'bookmark']">
3886
+ <xsl:call-template name="bookmark"/>
3887
+ </xsl:for-each>
3888
+ </fo:block>
3889
+ </xsl:if>
3890
+ <fo:block text-depth="0" line-height="0" font-size="0">
3891
+
3892
+ <fo:instream-foreign-object fox:alt-text="{$alt-text}">
3893
+ <xsl:attribute name="width">100%</xsl:attribute>
3894
+ <xsl:attribute name="content-height">100%</xsl:attribute>
3895
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
3896
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
3897
+
3898
+ <xsl:apply-templates select="xalan:nodeset($svg_content)" mode="svg_remove_a"/>
3899
+ </fo:instream-foreign-object>
3900
+ </fo:block>
3901
+
3902
+ <xsl:apply-templates select=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]" mode="svg_imagemap_links">
3903
+ <xsl:with-param name="scale" select="$scale"/>
3904
+ </xsl:apply-templates>
3905
+ </fo:block-container>
3906
+ </fo:block>
3907
+ </fo:table-cell>
3908
+ </fo:table-row>
3909
+ </fo:table-body>
3910
+ </fo:table>
3911
+ </fo:block>
3912
+
3913
+ </xsl:when>
3914
+ <xsl:otherwise>
3915
+ <fo:block xsl:use-attribute-sets="image-style">
3916
+ <fo:instream-foreign-object fox:alt-text="{$alt-text}">
3917
+ <xsl:attribute name="width">100%</xsl:attribute>
3918
+ <xsl:attribute name="content-height">100%</xsl:attribute>
3919
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
3920
+ <!-- effective height 297 - 27.4 - 13 = 256.6 -->
3921
+ <!-- effective width 210 - 12.5 - 25 = 172.5 -->
3922
+ <!-- effective height / width = 1.48, 1.4 - with title -->
3923
+ <xsl:if test="@height &gt; (@width * 1.4)"> <!-- for images with big height -->
3924
+ <xsl:variable name="width" select="((@width * 1.4) div @height) * 100"/>
3925
+ <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
3926
+ </xsl:if>
3927
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
3928
+ <xsl:copy-of select="$svg_content"/>
3929
+ </fo:instream-foreign-object>
3930
+ </fo:block>
3931
+ </xsl:otherwise>
3932
+ </xsl:choose>
3933
+ </xsl:template><xsl:template match="@*|node()" mode="svg_update">
3934
+ <xsl:copy>
3935
+ <xsl:apply-templates select="@*|node()" mode="svg_update"/>
3936
+ </xsl:copy>
3937
+ </xsl:template><xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
3938
+ <xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
3939
+ <xsl:value-of select="."/>
3940
+ </xsl:attribute>
3941
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
3942
+ <xsl:variable name="svg_content" select="document(@src)"/>
3943
+ <xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
3944
+ <xsl:for-each select="xalan:nodeset($svg_content)/node()">
3945
+ <xsl:call-template name="image_svg">
3946
+ <xsl:with-param name="name" select="$name"/>
3947
+ </xsl:call-template>
3948
+ </xsl:for-each>
3949
+ </xsl:template><xsl:template match="@*|node()" mode="svg_remove_a">
3950
+ <xsl:copy>
3951
+ <xsl:apply-templates select="@*|node()" mode="svg_remove_a"/>
3952
+ </xsl:copy>
3953
+ </xsl:template><xsl:template match="*[local-name() = 'a']" mode="svg_remove_a">
3954
+ <xsl:apply-templates mode="svg_remove_a"/>
3955
+ </xsl:template><xsl:template match="*[local-name() = 'a']" mode="svg_imagemap_links">
3956
+ <xsl:param name="scale"/>
3957
+ <xsl:variable name="dest">
3958
+ <xsl:choose>
3959
+ <xsl:when test="starts-with(@href, '#')">
3960
+ <xsl:value-of select="substring-after(@href, '#')"/>
3961
+ </xsl:when>
3962
+ <xsl:otherwise>
3963
+ <xsl:value-of select="@href"/>
3964
+ </xsl:otherwise>
3965
+ </xsl:choose>
3966
+ </xsl:variable>
3967
+ <xsl:for-each select="./*[local-name() = 'rect']">
3968
+ <xsl:call-template name="insertSVGMapLink">
3969
+ <xsl:with-param name="left" select="floor(@x * $scale)"/>
3970
+ <xsl:with-param name="top" select="floor(@y * $scale)"/>
3971
+ <xsl:with-param name="width" select="floor(@width * $scale)"/>
3972
+ <xsl:with-param name="height" select="floor(@height * $scale)"/>
3973
+ <xsl:with-param name="dest" select="$dest"/>
3974
+ </xsl:call-template>
3975
+ </xsl:for-each>
3976
+
3977
+ <xsl:for-each select="./*[local-name() = 'polygon']">
3978
+ <xsl:variable name="points">
3979
+ <xsl:call-template name="split">
3980
+ <xsl:with-param name="pText" select="@points"/>
3981
+ </xsl:call-template>
3982
+ </xsl:variable>
3983
+ <xsl:variable name="x_coords">
3984
+ <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 1]">
3985
+ <xsl:sort select="." data-type="number"/>
3986
+ <x><xsl:value-of select="."/></x>
3987
+ </xsl:for-each>
3988
+ </xsl:variable>
3989
+ <xsl:variable name="y_coords">
3990
+ <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 0]">
3991
+ <xsl:sort select="." data-type="number"/>
3992
+ <y><xsl:value-of select="."/></y>
3993
+ </xsl:for-each>
3994
+ </xsl:variable>
3995
+ <xsl:variable name="x" select="xalan:nodeset($x_coords)//x[1]"/>
3996
+ <xsl:variable name="y" select="xalan:nodeset($y_coords)//y[1]"/>
3997
+ <xsl:variable name="width" select="xalan:nodeset($x_coords)//x[last()] - $x"/>
3998
+ <xsl:variable name="height" select="xalan:nodeset($y_coords)//y[last()] - $y"/>
3999
+ <xsl:call-template name="insertSVGMapLink">
4000
+ <xsl:with-param name="left" select="floor($x * $scale)"/>
4001
+ <xsl:with-param name="top" select="floor($y * $scale)"/>
4002
+ <xsl:with-param name="width" select="floor($width * $scale)"/>
4003
+ <xsl:with-param name="height" select="floor($height * $scale)"/>
4004
+ <xsl:with-param name="dest" select="$dest"/>
4005
+ </xsl:call-template>
4006
+ </xsl:for-each>
4007
+
4008
+ <xsl:for-each select="./*[local-name() = 'circle']">
4009
+ <xsl:call-template name="insertSVGMapLink">
4010
+ <xsl:with-param name="left" select="floor((@cx - @r) * $scale)"/>
4011
+ <xsl:with-param name="top" select="floor((@cy - @r) * $scale)"/>
4012
+ <xsl:with-param name="width" select="floor(@r * 2 * $scale)"/>
4013
+ <xsl:with-param name="height" select="floor(@r * 2 * $scale)"/>
4014
+ <xsl:with-param name="dest" select="$dest"/>
4015
+ </xsl:call-template>
4016
+ </xsl:for-each>
4017
+ <xsl:for-each select="./*[local-name() = 'ellipse']">
4018
+ <xsl:call-template name="insertSVGMapLink">
4019
+ <xsl:with-param name="left" select="floor((@cx - @rx) * $scale)"/>
4020
+ <xsl:with-param name="top" select="floor((@cy - @ry) * $scale)"/>
4021
+ <xsl:with-param name="width" select="floor(@rx * 2 * $scale)"/>
4022
+ <xsl:with-param name="height" select="floor(@ry * 2 * $scale)"/>
4023
+ <xsl:with-param name="dest" select="$dest"/>
4024
+ </xsl:call-template>
4025
+ </xsl:for-each>
4026
+ </xsl:template><xsl:template name="insertSVGMapLink">
4027
+ <xsl:param name="left"/>
4028
+ <xsl:param name="top"/>
4029
+ <xsl:param name="width"/>
4030
+ <xsl:param name="height"/>
4031
+ <xsl:param name="dest"/>
4032
+ <fo:block-container position="absolute" left="{$left}px" top="{$top}px" width="{$width}px" height="{$height}px">
4033
+ <fo:block font-size="1pt">
4034
+ <fo:basic-link internal-destination="{$dest}" fox:alt-text="svg link">
4035
+ <fo:inline-container inline-progression-dimension="100%">
4036
+ <fo:block-container height="{$height - 1}px" width="100%">
4037
+ <!-- DEBUG <xsl:if test="local-name()='polygon'">
4038
+ <xsl:attribute name="background-color">magenta</xsl:attribute>
4039
+ </xsl:if> -->
4040
+ <fo:block> </fo:block></fo:block-container>
4041
+ </fo:inline-container>
4042
+ </fo:basic-link>
4043
+ </fo:block>
4044
+ </fo:block-container>
3804
4045
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
3805
4046
  <xsl:apply-templates mode="contents"/>
3806
4047
  <xsl:text> </xsl:text>
@@ -3829,28 +4070,39 @@
3829
4070
  <xsl:when test="count(xalan:nodeset($contents)/doc) &gt; 1">
3830
4071
  <xsl:for-each select="xalan:nodeset($contents)/doc">
3831
4072
  <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
4073
+ <xsl:if test="@bundle = 'true'">
4074
+ <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
4075
+ </xsl:if>
3832
4076
  <fo:bookmark-title>
3833
- <xsl:variable name="bookmark-title_">
3834
- <xsl:call-template name="getLangVersion">
3835
- <xsl:with-param name="lang" select="@lang"/>
3836
- <xsl:with-param name="doctype" select="@doctype"/>
3837
- <xsl:with-param name="title" select="@title-part"/>
3838
- </xsl:call-template>
3839
- </xsl:variable>
3840
4077
  <xsl:choose>
3841
- <xsl:when test="normalize-space($bookmark-title_) != ''">
3842
- <xsl:value-of select="normalize-space($bookmark-title_)"/>
3843
- </xsl:when>
3844
- <xsl:otherwise>
4078
+ <xsl:when test="not(normalize-space(@bundle) = 'true')"> <!-- 'bundle' means several different documents (not language versions) in one xml -->
4079
+ <xsl:variable name="bookmark-title_">
4080
+ <xsl:call-template name="getLangVersion">
4081
+ <xsl:with-param name="lang" select="@lang"/>
4082
+ <xsl:with-param name="doctype" select="@doctype"/>
4083
+ <xsl:with-param name="title" select="@title-part"/>
4084
+ </xsl:call-template>
4085
+ </xsl:variable>
3845
4086
  <xsl:choose>
3846
- <xsl:when test="@lang = 'en'">English</xsl:when>
3847
- <xsl:when test="@lang = 'fr'">Français</xsl:when>
3848
- <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3849
- <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
4087
+ <xsl:when test="normalize-space($bookmark-title_) != ''">
4088
+ <xsl:value-of select="normalize-space($bookmark-title_)"/>
4089
+ </xsl:when>
4090
+ <xsl:otherwise>
4091
+ <xsl:choose>
4092
+ <xsl:when test="@lang = 'en'">English</xsl:when>
4093
+ <xsl:when test="@lang = 'fr'">Français</xsl:when>
4094
+ <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
4095
+ <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
4096
+ </xsl:choose>
4097
+ </xsl:otherwise>
3850
4098
  </xsl:choose>
4099
+ </xsl:when>
4100
+ <xsl:otherwise>
4101
+ <xsl:value-of select="@title-part"/>
3851
4102
  </xsl:otherwise>
3852
4103
  </xsl:choose>
3853
4104
  </fo:bookmark-title>
4105
+
3854
4106
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
3855
4107
 
3856
4108
  <xsl:call-template name="insertFigureBookmarks">
@@ -3960,16 +4212,23 @@
3960
4212
  <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
3961
4213
  </xsl:choose>
3962
4214
  </xsl:template><xsl:template match="item" mode="bookmark">
3963
- <fo:bookmark internal-destination="{@id}" starting-state="hide">
3964
- <fo:bookmark-title>
3965
- <xsl:if test="@section != ''">
3966
- <xsl:value-of select="@section"/>
3967
- <xsl:text> </xsl:text>
3968
- </xsl:if>
3969
- <xsl:value-of select="normalize-space(title)"/>
3970
- </fo:bookmark-title>
3971
- <xsl:apply-templates mode="bookmark"/>
3972
- </fo:bookmark>
4215
+ <xsl:choose>
4216
+ <xsl:when test="@id != ''">
4217
+ <fo:bookmark internal-destination="{@id}" starting-state="hide">
4218
+ <fo:bookmark-title>
4219
+ <xsl:if test="@section != ''">
4220
+ <xsl:value-of select="@section"/>
4221
+ <xsl:text> </xsl:text>
4222
+ </xsl:if>
4223
+ <xsl:value-of select="normalize-space(title)"/>
4224
+ </fo:bookmark-title>
4225
+ <xsl:apply-templates mode="bookmark"/>
4226
+ </fo:bookmark>
4227
+ </xsl:when>
4228
+ <xsl:otherwise>
4229
+ <xsl:apply-templates mode="bookmark"/>
4230
+ </xsl:otherwise>
4231
+ </xsl:choose>
3973
4232
  </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
3974
4233
  <xsl:if test="normalize-space() != ''">
3975
4234
  <fo:block xsl:use-attribute-sets="figure-name-style">
@@ -4538,6 +4797,7 @@
4538
4797
  </xsl:if>
4539
4798
 
4540
4799
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4800
+
4541
4801
  <xsl:if test="normalize-space(@citeas) = ''">
4542
4802
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
4543
4803
  </xsl:if>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "1.3.5".freeze
3
+ VERSION = "1.3.6".freeze
4
4
  end
5
5
  end
@@ -25,8 +25,8 @@ Gem::Specification.new do |spec|
25
25
  spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
26
26
 
27
27
  spec.add_dependency "iso-639"
28
- spec.add_dependency "isodoc", "~> 1.6.0"
29
- spec.add_dependency "metanorma-standoc", "~> 1.9.0"
28
+ spec.add_dependency "isodoc", "~> 1.7.0"
29
+ spec.add_dependency "metanorma-standoc", "~> 1.10.0"
30
30
 
31
31
  spec.add_development_dependency "byebug", "~> 9.1"
32
32
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-21 00:00:00.000000000 Z
11
+ date: 2021-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.6.0
33
+ version: 1.7.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.6.0
40
+ version: 1.7.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: metanorma-standoc
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.9.0
47
+ version: 1.10.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.9.0
54
+ version: 1.10.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: byebug
57
57
  requirement: !ruby/object:Gem::Requirement