metanorma-ogc 1.2.3 → 1.2.4

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.
@@ -12,18 +12,6 @@
12
12
 
13
13
  <xsl:variable name="debug">false</xsl:variable>
14
14
 
15
- <xsl:variable name="copyright">
16
- <xsl:text>© Open Geospatial Consortium </xsl:text>
17
- <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:copyright/ogc:from"/>
18
- <xsl:text> – All rights reserved</xsl:text>
19
- </xsl:variable>
20
- <xsl:variable name="copyright_short">
21
- <xsl:text>© </xsl:text>
22
- <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:copyright/ogc:from"/>
23
- <xsl:text> </xsl:text>
24
- <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type = 'publisher']/ogc:organization/ogc:name"/>
25
- </xsl:variable>
26
-
27
15
  <xsl:variable name="docnumber" select="java:toUpperCase(java:java.lang.String.new(/ogc:ogc-standard/ogc:bibdata/ogc:docnumber))"/>
28
16
  <xsl:variable name="doctitle" select="/ogc:ogc-standard/ogc:bibdata/ogc:title[@language = 'en']"/>
29
17
 
@@ -33,13 +21,8 @@
33
21
  </xsl:call-template>
34
22
  </xsl:variable>
35
23
 
36
- <xsl:variable name="header">
37
- <xsl:text>Open Geospatial Consortium </xsl:text>
38
- <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:docidentifier[@type = 'ogc-internal']"/>
39
- <xsl:text>:</xsl:text>
40
- <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:copyright/ogc:from"/>
41
- </xsl:variable>
42
-
24
+ <xsl:variable name="copyright-owner" select="java:toUpperCase(java:java.lang.String.new(/ogc:ogc-standard/ogc:bibdata/ogc:copyright/ogc:owner/ogc:organization/ogc:name))"/>
25
+
43
26
  <xsl:variable name="color_main">rgb(88, 89, 91)</xsl:variable>
44
27
  <xsl:variable name="color_orange">rgb(237, 193, 35)</xsl:variable>
45
28
  <xsl:variable name="color_lightorange">rgb(246, 223, 140)</xsl:variable>
@@ -119,6 +102,10 @@
119
102
 
120
103
  <xsl:call-template name="addPDFUAmeta"/>
121
104
 
105
+ <xsl:call-template name="addBookmarks">
106
+ <xsl:with-param name="contents" select="$contents"/>
107
+ </xsl:call-template>
108
+
122
109
  <!-- Cover Page -->
123
110
  <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
124
111
  <fo:static-content flow-name="xsl-footnote-separator">
@@ -126,13 +113,6 @@
126
113
  <fo:leader leader-pattern="rule" leader-length="30%"/>
127
114
  </fo:block>
128
115
  </fo:static-content>
129
- <fo:static-content flow-name="cover-page-header" font-size="10pt">
130
- <fo:block-container height="23.5mm" display-align="before">
131
- <fo:block padding-top="12.5mm">
132
- <xsl:value-of select="$copyright"/>
133
- </fo:block>
134
- </fo:block-container>
135
- </fo:static-content>
136
116
 
137
117
  <fo:flow flow-name="xsl-region-body" color="white">
138
118
 
@@ -344,7 +324,7 @@
344
324
 
345
325
  <fo:block-container line-height="130%">
346
326
 
347
- <xsl:for-each select="xalan:nodeset($contents)//item">
327
+ <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
348
328
 
349
329
  <fo:block>
350
330
  <xsl:if test="@level = 1">
@@ -373,7 +353,7 @@
373
353
  <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
374
354
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
375
355
  <xsl:variable name="sectionTitle">
376
- <xsl:apply-templates/>
356
+ <xsl:apply-templates select="title"/>
377
357
  </xsl:variable>
378
358
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($sectionTitle))"/>
379
359
  <xsl:text> </xsl:text>
@@ -392,7 +372,7 @@
392
372
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
393
373
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@section))"/>
394
374
  <xsl:text> </xsl:text>
395
- <xsl:apply-templates/>
375
+ <xsl:apply-templates select="title"/>
396
376
  <xsl:text> </xsl:text>
397
377
  <fo:inline keep-together.within-line="always">
398
378
  <fo:leader leader-pattern="dots"/>
@@ -657,16 +637,21 @@
657
637
  </xsl:variable>
658
638
 
659
639
  <xsl:variable name="display">
660
- <xsl:choose>
661
- <xsl:when test="ancestor-or-self::ogc:bibitem">false</xsl:when>
662
- <xsl:when test="ancestor-or-self::ogc:term">false</xsl:when>
640
+ <xsl:choose>
663
641
  <xsl:when test="$level &gt;= 3">false</xsl:when>
664
642
  <xsl:otherwise>true</xsl:otherwise>
665
643
  </xsl:choose>
666
644
  </xsl:variable>
667
645
 
646
+ <xsl:variable name="skip">
647
+ <xsl:choose>
648
+ <xsl:when test="ancestor-or-self::ogc:bibitem">true</xsl:when>
649
+ <xsl:when test="ancestor-or-self::ogc:term">true</xsl:when>
650
+ <xsl:otherwise>false</xsl:otherwise>
651
+ </xsl:choose>
652
+ </xsl:variable>
668
653
 
669
- <xsl:if test="$display = 'true'">
654
+ <xsl:if test="$skip = 'false'">
670
655
 
671
656
  <xsl:variable name="section">
672
657
  <xsl:call-template name="getSection"/>
@@ -680,13 +665,15 @@
680
665
  <xsl:value-of select="local-name()"/>
681
666
  </xsl:variable>
682
667
 
683
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
668
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
684
669
  <xsl:if test="ancestor::ogc:annex">
685
670
  <xsl:attribute name="parent">annex</xsl:attribute>
686
671
  </xsl:if>
687
- <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
672
+ <title>
673
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
674
+ </title>
675
+ <xsl:apply-templates mode="contents"/>
688
676
  </item>
689
- <xsl:apply-templates mode="contents"/>
690
677
  </xsl:if>
691
678
 
692
679
  </xsl:template>
@@ -1095,8 +1082,13 @@
1095
1082
 
1096
1083
  <xsl:template match="ogc:preferred | ogc:deprecated | ogc:admitted" priority="2"/>
1097
1084
 
1098
- <xsl:template match="ogc:preferred | ogc:deprecated | ogc:admitted" mode="term_name">
1099
- <fo:inline font-size="18pt" padding-right="3mm"><xsl:apply-templates/></fo:inline>
1085
+ <xsl:template match="ogc:preferred" mode="term_name">
1086
+ <fo:inline font-size="18pt" padding-right="3mm"><xsl:apply-templates/></fo:inline>
1087
+ <fo:inline padding-right="2mm"> </fo:inline>
1088
+ </xsl:template>
1089
+
1090
+ <xsl:template match="ogc:deprecated | ogc:admitted" mode="term_name">
1091
+ <fo:inline font-size="18pt" padding-right="3mm"><xsl:apply-templates/></fo:inline>
1100
1092
  <fo:inline font-size="11pt" padding="1mm" padding-bottom="0.5mm" baseline-shift="25%">
1101
1093
  <xsl:variable name="kind" select="local-name()"/>
1102
1094
  <xsl:attribute name="background-color">
@@ -1113,7 +1105,6 @@
1113
1105
  <fo:inline padding-right="2mm"> </fo:inline>
1114
1106
  </xsl:template>
1115
1107
 
1116
-
1117
1108
  <!-- [position() &gt; 1] -->
1118
1109
  <xsl:template match="ogc:references[not(@normative='true')]">
1119
1110
  <fo:block break-after="page"/>
@@ -1236,7 +1227,7 @@
1236
1227
  <fo:block>
1237
1228
  <fo:inline font-weight="bold">
1238
1229
  <xsl:call-template name="addLetterSpacing">
1239
- <xsl:with-param name="text" select="'OPEN GEOSPATIAL CONSORTIUM '"/>
1230
+ <xsl:with-param name="text" select="concat($copyright-owner, ' ')"/>
1240
1231
  <xsl:with-param name="letter-spacing" select="0.2"/>
1241
1232
  </xsl:call-template>
1242
1233
  </fo:inline>
@@ -1438,6 +1429,12 @@
1438
1429
 
1439
1430
  </title-edition>
1440
1431
 
1432
+ <title-edition lang="fr">
1433
+
1434
+ <xsl:text>Édition </xsl:text>
1435
+
1436
+ </title-edition>
1437
+
1441
1438
 
1442
1439
  <title-toc lang="en">
1443
1440
 
@@ -1546,7 +1543,9 @@
1546
1543
  <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
1547
1544
  </xsl:otherwise>
1548
1545
  </xsl:choose>
1549
- </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="link-style">
1546
+ </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="root-style">
1547
+
1548
+ </xsl:attribute-set><xsl:attribute-set name="link-style">
1550
1549
 
1551
1550
 
1552
1551
  <!-- <xsl:attribute name="color">rgb(33, 55, 92)</xsl:attribute> -->
@@ -3567,12 +3566,144 @@
3567
3566
 
3568
3567
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3569
3568
  </fo:block>
3570
- </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">
3569
+ </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">
3571
3570
  <xsl:apply-templates mode="contents"/>
3572
3571
  <xsl:text> </xsl:text>
3573
- </xsl:template><xsl:template match="text()" mode="contents">
3572
+ </xsl:template><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="bookmarks">
3573
+ <xsl:apply-templates mode="bookmarks"/>
3574
+ <xsl:text> </xsl:text>
3575
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
3574
3576
  <xsl:value-of select="."/>
3575
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
3577
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
3578
+ <xsl:value-of select="."/>
3579
+ </xsl:template><xsl:template match="node()" mode="contents">
3580
+ <xsl:apply-templates mode="contents"/>
3581
+ </xsl:template><xsl:template match="node()" mode="bookmarks">
3582
+ <xsl:apply-templates mode="bookmarks"/>
3583
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
3584
+ <xsl:apply-templates select="."/>
3585
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
3586
+ <xsl:apply-templates mode="bookmarks"/>
3587
+ </xsl:template><xsl:template name="addBookmarks">
3588
+ <xsl:param name="contents"/>
3589
+ <xsl:if test="xalan:nodeset($contents)//item">
3590
+ <fo:bookmark-tree>
3591
+ <xsl:choose>
3592
+ <xsl:when test="xalan:nodeset($contents)/doc">
3593
+ <xsl:choose>
3594
+ <xsl:when test="count(xalan:nodeset($contents)/doc) &gt; 1">
3595
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
3596
+ <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
3597
+ <fo:bookmark-title>
3598
+ <xsl:variable name="bookmark-title_">
3599
+ <xsl:choose>
3600
+ <xsl:when test="@lang = 'en'">
3601
+
3602
+
3603
+ </xsl:when>
3604
+ <xsl:when test="@lang = 'fr'">
3605
+
3606
+
3607
+ </xsl:when>
3608
+ <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3609
+ <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3610
+ </xsl:choose>
3611
+ </xsl:variable>
3612
+ <xsl:choose>
3613
+ <xsl:when test="normalize-space($bookmark-title_) != ''">
3614
+ <xsl:value-of select="normalize-space($bookmark-title_)"/>
3615
+ </xsl:when>
3616
+ <xsl:otherwise>
3617
+ <xsl:choose>
3618
+ <xsl:when test="@lang = 'en'">English</xsl:when>
3619
+ <xsl:when test="@lang = 'fr'">Français</xsl:when>
3620
+ <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3621
+ <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3622
+ </xsl:choose>
3623
+ </xsl:otherwise>
3624
+ </xsl:choose>
3625
+ </fo:bookmark-title>
3626
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
3627
+ </fo:bookmark>
3628
+
3629
+ </xsl:for-each>
3630
+ </xsl:when>
3631
+ <xsl:otherwise>
3632
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
3633
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
3634
+ </xsl:for-each>
3635
+ </xsl:otherwise>
3636
+ </xsl:choose>
3637
+ </xsl:when>
3638
+ <xsl:otherwise>
3639
+ <xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
3640
+ </xsl:otherwise>
3641
+ </xsl:choose>
3642
+
3643
+
3644
+
3645
+ <xsl:if test="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
3646
+ <fo:bookmark internal-destination="{//*[local-name() = 'figure'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
3647
+ <fo:bookmark-title>Figures</fo:bookmark-title>
3648
+ <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
3649
+ <fo:bookmark internal-destination="{@id}">
3650
+ <fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']/text()" mode="bookmarks"/></fo:bookmark-title>
3651
+ </fo:bookmark>
3652
+ </xsl:for-each>
3653
+ </fo:bookmark>
3654
+ </xsl:if>
3655
+
3656
+
3657
+
3658
+ <xsl:if test="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
3659
+ <fo:bookmark internal-destination="{//*[local-name() = 'table'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
3660
+ <fo:bookmark-title>
3661
+ <xsl:choose>
3662
+ <xsl:when test="@lang = 'fr'">Tableaux</xsl:when>
3663
+ <xsl:otherwise>Tables</xsl:otherwise>
3664
+ </xsl:choose>
3665
+ </fo:bookmark-title>
3666
+ <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
3667
+ <fo:bookmark internal-destination="{@id}">
3668
+ <fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']//text()" mode="bookmarks"/></fo:bookmark-title>
3669
+ </fo:bookmark>
3670
+ </xsl:for-each>
3671
+ </fo:bookmark>
3672
+ </xsl:if>
3673
+
3674
+
3675
+
3676
+
3677
+ <xsl:if test="//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']]">
3678
+ <fo:bookmark internal-destination="{//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']][1]/@id}" starting-state="hide">
3679
+ <fo:bookmark-title>Recommendations</fo:bookmark-title>
3680
+ <xsl:for-each select="//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']]">
3681
+ <xsl:variable name="table_id" select="@id"/>
3682
+ <fo:bookmark internal-destination="{@id}">
3683
+ <fo:bookmark-title><xsl:value-of select=".//*[local-name() = 'p'][@class = 'RecommendationTitle'][ancestor::*[local-name() = 'table'][1][@id= $table_id]]/node()"/></fo:bookmark-title>
3684
+ </fo:bookmark>
3685
+ </xsl:for-each>
3686
+ </fo:bookmark>
3687
+
3688
+ </xsl:if>
3689
+
3690
+
3691
+
3692
+
3693
+ </fo:bookmark-tree>
3694
+ </xsl:if>
3695
+ </xsl:template><xsl:template match="item" mode="bookmark">
3696
+ <fo:bookmark internal-destination="{@id}" starting-state="hide">
3697
+ <fo:bookmark-title>
3698
+ <xsl:if test="@section != ''">
3699
+ <xsl:value-of select="@section"/>
3700
+ <xsl:text> </xsl:text>
3701
+ </xsl:if>
3702
+ <xsl:value-of select="normalize-space(title)"/>
3703
+ </fo:bookmark-title>
3704
+ <xsl:apply-templates mode="bookmark"/>
3705
+ </fo:bookmark>
3706
+ </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">
3576
3707
  <xsl:if test="normalize-space() != ''">
3577
3708
  <fo:block xsl:use-attribute-sets="figure-name-style">
3578
3709
 
@@ -3630,7 +3761,7 @@
3630
3761
  <xsl:apply-templates/>
3631
3762
  </xsl:otherwise>
3632
3763
  </xsl:choose>
3633
- </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
3764
+ </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
3634
3765
  <xsl:text> </xsl:text>
3635
3766
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
3636
3767
  <xsl:copy>
@@ -4245,20 +4376,29 @@
4245
4376
  <!-- 0xA0 to space replacement -->
4246
4377
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
4247
4378
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
4248
- <fo:block-container margin-left="0mm">
4249
- <xsl:if test="parent::*[local-name() = 'note']">
4250
- <xsl:attribute name="margin-left">
4251
- <xsl:choose>
4252
- <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
4253
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
4254
- </xsl:choose>
4255
- </xsl:attribute>
4256
-
4257
- </xsl:if>
4258
- <fo:block-container margin-left="0mm">
4259
- <xsl:apply-templates select="." mode="ul_ol"/>
4260
- </fo:block-container>
4261
- </fo:block-container>
4379
+ <xsl:choose>
4380
+ <xsl:when test="parent::*[local-name() = 'note']">
4381
+ <fo:block-container>
4382
+ <xsl:attribute name="margin-left">
4383
+ <xsl:choose>
4384
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
4385
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
4386
+ </xsl:choose>
4387
+ </xsl:attribute>
4388
+
4389
+ <fo:block-container margin-left="0mm">
4390
+ <fo:block>
4391
+ <xsl:apply-templates select="." mode="ul_ol"/>
4392
+ </fo:block>
4393
+ </fo:block-container>
4394
+ </fo:block-container>
4395
+ </xsl:when>
4396
+ <xsl:otherwise>
4397
+ <fo:block>
4398
+ <xsl:apply-templates select="." mode="ul_ol"/>
4399
+ </fo:block>
4400
+ </xsl:otherwise>
4401
+ </xsl:choose>
4262
4402
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
4263
4403
  <!-- <row>
4264
4404
  <date>05-07-2013</date>
@@ -4696,6 +4836,7 @@
4696
4836
 
4697
4837
 
4698
4838
 
4839
+
4699
4840
  </xsl:variable>
4700
4841
  <xsl:if test="$documentNS != $XSLNS">
4701
4842
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -4721,4 +4862,21 @@
4721
4862
  </xsl:otherwise>
4722
4863
  </xsl:choose>
4723
4864
  </xsl:attribute>
4865
+ </xsl:template><xsl:template name="add-letter-spacing">
4866
+ <xsl:param name="text"/>
4867
+ <xsl:param name="letter-spacing" select="'0.15'"/>
4868
+ <xsl:if test="string-length($text) &gt; 0">
4869
+ <xsl:variable name="char" select="substring($text, 1, 1)"/>
4870
+ <fo:inline padding-right="{$letter-spacing}mm">
4871
+ <xsl:if test="$char = '®'">
4872
+ <xsl:attribute name="font-size">58%</xsl:attribute>
4873
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4874
+ </xsl:if>
4875
+ <xsl:value-of select="$char"/>
4876
+ </fo:inline>
4877
+ <xsl:call-template name="add-letter-spacing">
4878
+ <xsl:with-param name="text" select="substring($text, 2)"/>
4879
+ <xsl:with-param name="letter-spacing" select="$letter-spacing"/>
4880
+ </xsl:call-template>
4881
+ </xsl:if>
4724
4882
  </xsl:template></xsl:stylesheet>
@@ -12,18 +12,6 @@
12
12
 
13
13
  <xsl:variable name="debug">false</xsl:variable>
14
14
 
15
- <xsl:variable name="copyright">
16
- <xsl:text>© Open Geospatial Consortium </xsl:text>
17
- <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:copyright/ogc:from"/>
18
- <xsl:text> – All rights reserved</xsl:text>
19
- </xsl:variable>
20
- <xsl:variable name="copyright_short">
21
- <xsl:text>© </xsl:text>
22
- <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:copyright/ogc:from"/>
23
- <xsl:text> </xsl:text>
24
- <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type = 'publisher']/ogc:organization/ogc:name"/>
25
- </xsl:variable>
26
-
27
15
  <xsl:variable name="docnumber" select="java:toUpperCase(java:java.lang.String.new(/ogc:ogc-standard/ogc:bibdata/ogc:docnumber))"/>
28
16
  <xsl:variable name="doctitle" select="/ogc:ogc-standard/ogc:bibdata/ogc:title[@language = 'en']"/>
29
17
 
@@ -33,13 +21,8 @@
33
21
  </xsl:call-template>
34
22
  </xsl:variable>
35
23
 
36
- <xsl:variable name="header">
37
- <xsl:text>Open Geospatial Consortium </xsl:text>
38
- <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:docidentifier[@type = 'ogc-internal']"/>
39
- <xsl:text>:</xsl:text>
40
- <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:copyright/ogc:from"/>
41
- </xsl:variable>
42
-
24
+ <xsl:variable name="copyright-owner" select="java:toUpperCase(java:java.lang.String.new(/ogc:ogc-standard/ogc:bibdata/ogc:copyright/ogc:owner/ogc:organization/ogc:name))"/>
25
+
43
26
  <xsl:variable name="color_main">rgb(88, 89, 91)</xsl:variable>
44
27
  <xsl:variable name="color_orange">rgb(237, 193, 35)</xsl:variable>
45
28
  <xsl:variable name="color_lightorange">rgb(246, 223, 140)</xsl:variable>
@@ -119,6 +102,10 @@
119
102
 
120
103
  <xsl:call-template name="addPDFUAmeta"/>
121
104
 
105
+ <xsl:call-template name="addBookmarks">
106
+ <xsl:with-param name="contents" select="$contents"/>
107
+ </xsl:call-template>
108
+
122
109
  <!-- Cover Page -->
123
110
  <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
124
111
  <fo:static-content flow-name="xsl-footnote-separator">
@@ -126,13 +113,6 @@
126
113
  <fo:leader leader-pattern="rule" leader-length="30%"/>
127
114
  </fo:block>
128
115
  </fo:static-content>
129
- <fo:static-content flow-name="cover-page-header" font-size="10pt">
130
- <fo:block-container height="23.5mm" display-align="before">
131
- <fo:block padding-top="12.5mm">
132
- <xsl:value-of select="$copyright"/>
133
- </fo:block>
134
- </fo:block-container>
135
- </fo:static-content>
136
116
 
137
117
  <fo:flow flow-name="xsl-region-body" color="white">
138
118
 
@@ -344,7 +324,7 @@
344
324
 
345
325
  <fo:block-container line-height="130%">
346
326
 
347
- <xsl:for-each select="xalan:nodeset($contents)//item">
327
+ <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
348
328
 
349
329
  <fo:block>
350
330
  <xsl:if test="@level = 1">
@@ -373,7 +353,7 @@
373
353
  <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
374
354
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
375
355
  <xsl:variable name="sectionTitle">
376
- <xsl:apply-templates/>
356
+ <xsl:apply-templates select="title"/>
377
357
  </xsl:variable>
378
358
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($sectionTitle))"/>
379
359
  <xsl:text> </xsl:text>
@@ -392,7 +372,7 @@
392
372
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
393
373
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@section))"/>
394
374
  <xsl:text> </xsl:text>
395
- <xsl:apply-templates/>
375
+ <xsl:apply-templates select="title"/>
396
376
  <xsl:text> </xsl:text>
397
377
  <fo:inline keep-together.within-line="always">
398
378
  <fo:leader leader-pattern="dots"/>
@@ -657,16 +637,21 @@
657
637
  </xsl:variable>
658
638
 
659
639
  <xsl:variable name="display">
660
- <xsl:choose>
661
- <xsl:when test="ancestor-or-self::ogc:bibitem">false</xsl:when>
662
- <xsl:when test="ancestor-or-self::ogc:term">false</xsl:when>
640
+ <xsl:choose>
663
641
  <xsl:when test="$level &gt;= 3">false</xsl:when>
664
642
  <xsl:otherwise>true</xsl:otherwise>
665
643
  </xsl:choose>
666
644
  </xsl:variable>
667
645
 
646
+ <xsl:variable name="skip">
647
+ <xsl:choose>
648
+ <xsl:when test="ancestor-or-self::ogc:bibitem">true</xsl:when>
649
+ <xsl:when test="ancestor-or-self::ogc:term">true</xsl:when>
650
+ <xsl:otherwise>false</xsl:otherwise>
651
+ </xsl:choose>
652
+ </xsl:variable>
668
653
 
669
- <xsl:if test="$display = 'true'">
654
+ <xsl:if test="$skip = 'false'">
670
655
 
671
656
  <xsl:variable name="section">
672
657
  <xsl:call-template name="getSection"/>
@@ -680,13 +665,15 @@
680
665
  <xsl:value-of select="local-name()"/>
681
666
  </xsl:variable>
682
667
 
683
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
668
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
684
669
  <xsl:if test="ancestor::ogc:annex">
685
670
  <xsl:attribute name="parent">annex</xsl:attribute>
686
671
  </xsl:if>
687
- <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
672
+ <title>
673
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
674
+ </title>
675
+ <xsl:apply-templates mode="contents"/>
688
676
  </item>
689
- <xsl:apply-templates mode="contents"/>
690
677
  </xsl:if>
691
678
 
692
679
  </xsl:template>
@@ -1095,8 +1082,13 @@
1095
1082
 
1096
1083
  <xsl:template match="ogc:preferred | ogc:deprecated | ogc:admitted" priority="2"/>
1097
1084
 
1098
- <xsl:template match="ogc:preferred | ogc:deprecated | ogc:admitted" mode="term_name">
1099
- <fo:inline font-size="18pt" padding-right="3mm"><xsl:apply-templates/></fo:inline>
1085
+ <xsl:template match="ogc:preferred" mode="term_name">
1086
+ <fo:inline font-size="18pt" padding-right="3mm"><xsl:apply-templates/></fo:inline>
1087
+ <fo:inline padding-right="2mm"> </fo:inline>
1088
+ </xsl:template>
1089
+
1090
+ <xsl:template match="ogc:deprecated | ogc:admitted" mode="term_name">
1091
+ <fo:inline font-size="18pt" padding-right="3mm"><xsl:apply-templates/></fo:inline>
1100
1092
  <fo:inline font-size="11pt" padding="1mm" padding-bottom="0.5mm" baseline-shift="25%">
1101
1093
  <xsl:variable name="kind" select="local-name()"/>
1102
1094
  <xsl:attribute name="background-color">
@@ -1113,7 +1105,6 @@
1113
1105
  <fo:inline padding-right="2mm"> </fo:inline>
1114
1106
  </xsl:template>
1115
1107
 
1116
-
1117
1108
  <!-- [position() &gt; 1] -->
1118
1109
  <xsl:template match="ogc:references[not(@normative='true')]">
1119
1110
  <fo:block break-after="page"/>
@@ -1236,7 +1227,7 @@
1236
1227
  <fo:block>
1237
1228
  <fo:inline font-weight="bold">
1238
1229
  <xsl:call-template name="addLetterSpacing">
1239
- <xsl:with-param name="text" select="'OPEN GEOSPATIAL CONSORTIUM '"/>
1230
+ <xsl:with-param name="text" select="concat($copyright-owner, ' ')"/>
1240
1231
  <xsl:with-param name="letter-spacing" select="0.2"/>
1241
1232
  </xsl:call-template>
1242
1233
  </fo:inline>
@@ -1438,6 +1429,12 @@
1438
1429
 
1439
1430
  </title-edition>
1440
1431
 
1432
+ <title-edition lang="fr">
1433
+
1434
+ <xsl:text>Édition </xsl:text>
1435
+
1436
+ </title-edition>
1437
+
1441
1438
 
1442
1439
  <title-toc lang="en">
1443
1440
 
@@ -1546,7 +1543,9 @@
1546
1543
  <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
1547
1544
  </xsl:otherwise>
1548
1545
  </xsl:choose>
1549
- </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="link-style">
1546
+ </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="root-style">
1547
+
1548
+ </xsl:attribute-set><xsl:attribute-set name="link-style">
1550
1549
 
1551
1550
 
1552
1551
  <!-- <xsl:attribute name="color">rgb(33, 55, 92)</xsl:attribute> -->
@@ -3567,12 +3566,144 @@
3567
3566
 
3568
3567
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3569
3568
  </fo:block>
3570
- </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">
3569
+ </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">
3571
3570
  <xsl:apply-templates mode="contents"/>
3572
3571
  <xsl:text> </xsl:text>
3573
- </xsl:template><xsl:template match="text()" mode="contents">
3572
+ </xsl:template><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="bookmarks">
3573
+ <xsl:apply-templates mode="bookmarks"/>
3574
+ <xsl:text> </xsl:text>
3575
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
3574
3576
  <xsl:value-of select="."/>
3575
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
3577
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
3578
+ <xsl:value-of select="."/>
3579
+ </xsl:template><xsl:template match="node()" mode="contents">
3580
+ <xsl:apply-templates mode="contents"/>
3581
+ </xsl:template><xsl:template match="node()" mode="bookmarks">
3582
+ <xsl:apply-templates mode="bookmarks"/>
3583
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
3584
+ <xsl:apply-templates select="."/>
3585
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
3586
+ <xsl:apply-templates mode="bookmarks"/>
3587
+ </xsl:template><xsl:template name="addBookmarks">
3588
+ <xsl:param name="contents"/>
3589
+ <xsl:if test="xalan:nodeset($contents)//item">
3590
+ <fo:bookmark-tree>
3591
+ <xsl:choose>
3592
+ <xsl:when test="xalan:nodeset($contents)/doc">
3593
+ <xsl:choose>
3594
+ <xsl:when test="count(xalan:nodeset($contents)/doc) &gt; 1">
3595
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
3596
+ <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
3597
+ <fo:bookmark-title>
3598
+ <xsl:variable name="bookmark-title_">
3599
+ <xsl:choose>
3600
+ <xsl:when test="@lang = 'en'">
3601
+
3602
+
3603
+ </xsl:when>
3604
+ <xsl:when test="@lang = 'fr'">
3605
+
3606
+
3607
+ </xsl:when>
3608
+ <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3609
+ <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3610
+ </xsl:choose>
3611
+ </xsl:variable>
3612
+ <xsl:choose>
3613
+ <xsl:when test="normalize-space($bookmark-title_) != ''">
3614
+ <xsl:value-of select="normalize-space($bookmark-title_)"/>
3615
+ </xsl:when>
3616
+ <xsl:otherwise>
3617
+ <xsl:choose>
3618
+ <xsl:when test="@lang = 'en'">English</xsl:when>
3619
+ <xsl:when test="@lang = 'fr'">Français</xsl:when>
3620
+ <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3621
+ <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3622
+ </xsl:choose>
3623
+ </xsl:otherwise>
3624
+ </xsl:choose>
3625
+ </fo:bookmark-title>
3626
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
3627
+ </fo:bookmark>
3628
+
3629
+ </xsl:for-each>
3630
+ </xsl:when>
3631
+ <xsl:otherwise>
3632
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
3633
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
3634
+ </xsl:for-each>
3635
+ </xsl:otherwise>
3636
+ </xsl:choose>
3637
+ </xsl:when>
3638
+ <xsl:otherwise>
3639
+ <xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
3640
+ </xsl:otherwise>
3641
+ </xsl:choose>
3642
+
3643
+
3644
+
3645
+ <xsl:if test="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
3646
+ <fo:bookmark internal-destination="{//*[local-name() = 'figure'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
3647
+ <fo:bookmark-title>Figures</fo:bookmark-title>
3648
+ <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
3649
+ <fo:bookmark internal-destination="{@id}">
3650
+ <fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']/text()" mode="bookmarks"/></fo:bookmark-title>
3651
+ </fo:bookmark>
3652
+ </xsl:for-each>
3653
+ </fo:bookmark>
3654
+ </xsl:if>
3655
+
3656
+
3657
+
3658
+ <xsl:if test="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
3659
+ <fo:bookmark internal-destination="{//*[local-name() = 'table'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
3660
+ <fo:bookmark-title>
3661
+ <xsl:choose>
3662
+ <xsl:when test="@lang = 'fr'">Tableaux</xsl:when>
3663
+ <xsl:otherwise>Tables</xsl:otherwise>
3664
+ </xsl:choose>
3665
+ </fo:bookmark-title>
3666
+ <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
3667
+ <fo:bookmark internal-destination="{@id}">
3668
+ <fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']//text()" mode="bookmarks"/></fo:bookmark-title>
3669
+ </fo:bookmark>
3670
+ </xsl:for-each>
3671
+ </fo:bookmark>
3672
+ </xsl:if>
3673
+
3674
+
3675
+
3676
+
3677
+ <xsl:if test="//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']]">
3678
+ <fo:bookmark internal-destination="{//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']][1]/@id}" starting-state="hide">
3679
+ <fo:bookmark-title>Recommendations</fo:bookmark-title>
3680
+ <xsl:for-each select="//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']]">
3681
+ <xsl:variable name="table_id" select="@id"/>
3682
+ <fo:bookmark internal-destination="{@id}">
3683
+ <fo:bookmark-title><xsl:value-of select=".//*[local-name() = 'p'][@class = 'RecommendationTitle'][ancestor::*[local-name() = 'table'][1][@id= $table_id]]/node()"/></fo:bookmark-title>
3684
+ </fo:bookmark>
3685
+ </xsl:for-each>
3686
+ </fo:bookmark>
3687
+
3688
+ </xsl:if>
3689
+
3690
+
3691
+
3692
+
3693
+ </fo:bookmark-tree>
3694
+ </xsl:if>
3695
+ </xsl:template><xsl:template match="item" mode="bookmark">
3696
+ <fo:bookmark internal-destination="{@id}" starting-state="hide">
3697
+ <fo:bookmark-title>
3698
+ <xsl:if test="@section != ''">
3699
+ <xsl:value-of select="@section"/>
3700
+ <xsl:text> </xsl:text>
3701
+ </xsl:if>
3702
+ <xsl:value-of select="normalize-space(title)"/>
3703
+ </fo:bookmark-title>
3704
+ <xsl:apply-templates mode="bookmark"/>
3705
+ </fo:bookmark>
3706
+ </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">
3576
3707
  <xsl:if test="normalize-space() != ''">
3577
3708
  <fo:block xsl:use-attribute-sets="figure-name-style">
3578
3709
 
@@ -3630,7 +3761,7 @@
3630
3761
  <xsl:apply-templates/>
3631
3762
  </xsl:otherwise>
3632
3763
  </xsl:choose>
3633
- </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
3764
+ </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
3634
3765
  <xsl:text> </xsl:text>
3635
3766
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
3636
3767
  <xsl:copy>
@@ -4245,20 +4376,29 @@
4245
4376
  <!-- 0xA0 to space replacement -->
4246
4377
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
4247
4378
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
4248
- <fo:block-container margin-left="0mm">
4249
- <xsl:if test="parent::*[local-name() = 'note']">
4250
- <xsl:attribute name="margin-left">
4251
- <xsl:choose>
4252
- <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
4253
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
4254
- </xsl:choose>
4255
- </xsl:attribute>
4256
-
4257
- </xsl:if>
4258
- <fo:block-container margin-left="0mm">
4259
- <xsl:apply-templates select="." mode="ul_ol"/>
4260
- </fo:block-container>
4261
- </fo:block-container>
4379
+ <xsl:choose>
4380
+ <xsl:when test="parent::*[local-name() = 'note']">
4381
+ <fo:block-container>
4382
+ <xsl:attribute name="margin-left">
4383
+ <xsl:choose>
4384
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
4385
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
4386
+ </xsl:choose>
4387
+ </xsl:attribute>
4388
+
4389
+ <fo:block-container margin-left="0mm">
4390
+ <fo:block>
4391
+ <xsl:apply-templates select="." mode="ul_ol"/>
4392
+ </fo:block>
4393
+ </fo:block-container>
4394
+ </fo:block-container>
4395
+ </xsl:when>
4396
+ <xsl:otherwise>
4397
+ <fo:block>
4398
+ <xsl:apply-templates select="." mode="ul_ol"/>
4399
+ </fo:block>
4400
+ </xsl:otherwise>
4401
+ </xsl:choose>
4262
4402
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
4263
4403
  <!-- <row>
4264
4404
  <date>05-07-2013</date>
@@ -4696,6 +4836,7 @@
4696
4836
 
4697
4837
 
4698
4838
 
4839
+
4699
4840
  </xsl:variable>
4700
4841
  <xsl:if test="$documentNS != $XSLNS">
4701
4842
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -4721,4 +4862,21 @@
4721
4862
  </xsl:otherwise>
4722
4863
  </xsl:choose>
4723
4864
  </xsl:attribute>
4865
+ </xsl:template><xsl:template name="add-letter-spacing">
4866
+ <xsl:param name="text"/>
4867
+ <xsl:param name="letter-spacing" select="'0.15'"/>
4868
+ <xsl:if test="string-length($text) &gt; 0">
4869
+ <xsl:variable name="char" select="substring($text, 1, 1)"/>
4870
+ <fo:inline padding-right="{$letter-spacing}mm">
4871
+ <xsl:if test="$char = '®'">
4872
+ <xsl:attribute name="font-size">58%</xsl:attribute>
4873
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4874
+ </xsl:if>
4875
+ <xsl:value-of select="$char"/>
4876
+ </fo:inline>
4877
+ <xsl:call-template name="add-letter-spacing">
4878
+ <xsl:with-param name="text" select="substring($text, 2)"/>
4879
+ <xsl:with-param name="letter-spacing" select="$letter-spacing"/>
4880
+ </xsl:call-template>
4881
+ </xsl:if>
4724
4882
  </xsl:template></xsl:stylesheet>