metanorma-mpfa 0.5.14 → 0.5.15

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: 8d0d6cfb8a8b522fe0c3746dc20f952b0427e795346d5e531112139140d735ca
4
- data.tar.gz: 4eeed080d3d4171e1809bfb1a2d9e83aa02241704d5232b4a65f68e65443cd55
3
+ metadata.gz: dde9f4dfe2920ea20fed93f7e94deec37c935fd4baee8437e20ded5dec29f2e1
4
+ data.tar.gz: 60f73d946089c225ac92a3491dbb7b52e0e9986c976848453fb0db493681c916
5
5
  SHA512:
6
- metadata.gz: a3646378e03da89b45dbcdd41f3e9dd413b26fac8220c7c490924bf1f8192bff24f9687024efd1b0244bf684f7f629d274c7c469f0fe9280e7d1807c7aae8701
7
- data.tar.gz: 152d926ee2b8d56efff2d39265fbcf46bc80c82179d78c66dc2c8f52299a59d1841436d554e2328d701f39d09178f27f8e8066a8803620302e8f851d7bb5bc26
6
+ metadata.gz: 1cd6bda2272b63bf17dbf4847f7176d9764eb108e5c662a5abcc5a14fbb97e45b484b03c6f6e2ef911f491668fa75d0d3131a7c36847253a71577468195c94eb
7
+ data.tar.gz: 054b45fa03d082a77bdbdab882e0f175404a957489fc9a51ecc420d551907a93843d2a9b8c4f65c5ed1e79611ef3ddd34ef995dc3acaeb8c5dbb3b63b27450ca
@@ -30,7 +30,9 @@ jobs:
30
30
  os: 'macos-latest'
31
31
  experimental: true
32
32
  steps:
33
- - uses: actions/checkout@master
33
+ - uses: actions/checkout@v2
34
+ with:
35
+ submodules: true
34
36
 
35
37
  - uses: ruby/setup-ruby@v1
36
38
  with:
@@ -38,14 +40,3 @@ jobs:
38
40
  bundler-cache: true
39
41
 
40
42
  - run: bundle exec rake
41
-
42
- tests-passed:
43
- needs: rake
44
- runs-on: ubuntu-latest
45
- steps:
46
- - uses: peter-evans/repository-dispatch@v1
47
- with:
48
- token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
49
- repository: ${{ github.repository }}
50
- event-type: notify
51
- client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
@@ -102,7 +102,7 @@
102
102
  </attribute>
103
103
  </optional>
104
104
  <oneOrMore>
105
- <ref name="li"/>
105
+ <ref name="ul_li"/>
106
106
  </oneOrMore>
107
107
  <zeroOrMore>
108
108
  <ref name="note"/>
@@ -1716,4 +1716,26 @@
1716
1716
  </zeroOrMore>
1717
1717
  </element>
1718
1718
  </define>
1719
+ <define name="ul_li">
1720
+ <element name="li">
1721
+ <optional>
1722
+ <attribute name="id">
1723
+ <data type="ID"/>
1724
+ </attribute>
1725
+ </optional>
1726
+ <optional>
1727
+ <attribute name="uncheckedcheckbox">
1728
+ <data type="boolean"/>
1729
+ </attribute>
1730
+ </optional>
1731
+ <optional>
1732
+ <attribute name="checkedcheckbox">
1733
+ <data type="boolean"/>
1734
+ </attribute>
1735
+ </optional>
1736
+ <oneOrMore>
1737
+ <ref name="BasicBlock"/>
1738
+ </oneOrMore>
1739
+ </element>
1740
+ </define>
1719
1741
  </grammar>
@@ -3,6 +3,7 @@
3
3
  <xsl:output method="xml" encoding="UTF-8" indent="no"/>
4
4
 
5
5
  <xsl:param name="svg_images"/>
6
+ <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
6
7
  <xsl:variable name="images" select="document($svg_images)"/>
7
8
 
8
9
  <xsl:key name="kfn" match="mpfd:p/mpfd:fn" use="@reference"/>
@@ -94,7 +95,9 @@
94
95
 
95
96
  </fo:layout-master-set>
96
97
 
97
- <xsl:call-template name="addPDFUAmeta"/>
98
+ <fo:declarations>
99
+ <xsl:call-template name="addPDFUAmeta"/>
100
+ </fo:declarations>
98
101
 
99
102
  <xsl:call-template name="addBookmarks">
100
103
  <xsl:with-param name="contents" select="$contents"/>
@@ -1039,6 +1042,7 @@
1039
1042
 
1040
1043
 
1041
1044
 
1045
+
1042
1046
  <xsl:attribute name="font-size">10pt</xsl:attribute>
1043
1047
 
1044
1048
 
@@ -1636,7 +1640,15 @@
1636
1640
  </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
1637
1641
  <xsl:value-of select="@target"/>
1638
1642
  </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
1639
- <xsl:variable name="math_text" select="normalize-space(.)"/>
1643
+ <xsl:variable name="mathml">
1644
+ <xsl:for-each select="*">
1645
+ <xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
1646
+ <xsl:copy-of select="."/>
1647
+ </xsl:if>
1648
+ </xsl:for-each>
1649
+ </xsl:variable>
1650
+
1651
+ <xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
1640
1652
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
1641
1653
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
1642
1654
  <xsl:param name="cols-count"/>
@@ -2584,6 +2596,10 @@
2584
2596
  <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2585
2597
  <xsl:apply-templates/>
2586
2598
  </fo:inline>
2599
+ </xsl:template><xsl:template match="*[local-name()='hi']">
2600
+ <fo:inline background-color="yellow">
2601
+ <xsl:apply-templates/>
2602
+ </fo:inline>
2587
2603
  </xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
2588
2604
  <xsl:variable name="text" select="normalize-space(.)"/>
2589
2605
  <fo:inline font-size="75%">
@@ -2924,6 +2940,7 @@
2924
2940
  <xsl:apply-templates select="." mode="mathml"/>
2925
2941
  </xsl:variable>
2926
2942
  <fo:instream-foreign-object fox:alt-text="Math">
2943
+
2927
2944
  <!-- <xsl:copy-of select="."/> -->
2928
2945
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
2929
2946
  </fo:instream-foreign-object>
@@ -2942,7 +2959,7 @@
2942
2959
  <xsl:apply-templates select="@*|node()" mode="mathml"/>
2943
2960
  </xsl:copy>
2944
2961
  <mathml:mspace width="0.5ex"/>
2945
- </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
2962
+ </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
2946
2963
  <xsl:variable name="target">
2947
2964
  <xsl:choose>
2948
2965
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
@@ -2976,8 +2993,6 @@
2976
2993
  </xsl:otherwise>
2977
2994
  </xsl:choose>
2978
2995
  </fo:inline>
2979
- </xsl:template><xsl:template match="*[local-name()='bookmark']">
2980
- <fo:inline id="{@id}"/>
2981
2996
  </xsl:template><xsl:template match="*[local-name()='appendix']">
2982
2997
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
2983
2998
  <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
@@ -3184,6 +3199,7 @@
3184
3199
  <fo:block id="{@id}">
3185
3200
  <xsl:apply-templates/>
3186
3201
  </fo:block>
3202
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3187
3203
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
3188
3204
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
3189
3205
  <xsl:apply-templates/>
@@ -3767,10 +3783,11 @@
3767
3783
  </xsl:choose>
3768
3784
 
3769
3785
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3770
-
3786
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
3771
3787
  <xsl:variable name="element">
3772
3788
  block
3773
3789
 
3790
+
3774
3791
  </xsl:variable>
3775
3792
  <xsl:choose>
3776
3793
  <xsl:when test="normalize-space($element) = 'block'">
@@ -3870,32 +3887,50 @@
3870
3887
  <xsl:text>— </xsl:text>
3871
3888
  <xsl:apply-templates/>
3872
3889
  </xsl:template><xsl:template match="*[local-name() = 'eref']">
3873
- <fo:inline xsl:use-attribute-sets="eref-style">
3874
- <xsl:if test="@type = 'footnote'">
3875
-
3876
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
3877
- <xsl:attribute name="font-size">80%</xsl:attribute>
3878
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
3879
- <xsl:attribute name="vertical-align">super</xsl:attribute>
3880
-
3881
-
3882
- </xsl:if>
3883
-
3884
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3885
-
3886
- <xsl:if test="@type = 'inline'">
3887
-
3888
- <xsl:attribute name="color">blue</xsl:attribute>
3889
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
3890
-
3891
-
3892
-
3893
- </xsl:if>
3894
-
3895
-
3896
- <xsl:apply-templates/>
3897
- </fo:basic-link>
3898
- </fo:inline>
3890
+
3891
+ <xsl:variable name="bibitemid">
3892
+ <xsl:choose>
3893
+ <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"/>
3894
+ <xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
3895
+ <xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
3896
+ </xsl:choose>
3897
+ </xsl:variable>
3898
+
3899
+ <xsl:choose>
3900
+ <xsl:when test="normalize-space($bibitemid) != ''">
3901
+ <fo:inline xsl:use-attribute-sets="eref-style">
3902
+ <xsl:if test="@type = 'footnote'">
3903
+
3904
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
3905
+ <xsl:attribute name="font-size">80%</xsl:attribute>
3906
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
3907
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
3908
+
3909
+
3910
+ </xsl:if>
3911
+
3912
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3913
+ <xsl:if test="normalize-space(@citeas) = ''">
3914
+ <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
3915
+ </xsl:if>
3916
+ <xsl:if test="@type = 'inline'">
3917
+
3918
+ <xsl:attribute name="color">blue</xsl:attribute>
3919
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
3920
+
3921
+
3922
+
3923
+ </xsl:if>
3924
+
3925
+ <xsl:apply-templates/>
3926
+ </fo:basic-link>
3927
+
3928
+ </fo:inline>
3929
+ </xsl:when>
3930
+ <xsl:otherwise>
3931
+ <fo:inline><xsl:apply-templates/></fo:inline>
3932
+ </xsl:otherwise>
3933
+ </xsl:choose>
3899
3934
  </xsl:template><xsl:template match="*[local-name() = 'tab']">
3900
3935
  <!-- zero-space char -->
3901
3936
  <xsl:variable name="depth">
@@ -4068,6 +4103,153 @@
4068
4103
  </fo:block>
4069
4104
  </xsl:otherwise>
4070
4105
  </xsl:choose>
4106
+ </xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="dash" select="'–'"/><xsl:variable name="bookmark_in_fn">
4107
+ <xsl:for-each select="//*[local-name() = 'bookmark'][ancestor::*[local-name() = 'fn']]">
4108
+ <bookmark><xsl:value-of select="@id"/></bookmark>
4109
+ </xsl:for-each>
4110
+ </xsl:variable><xsl:template match="@*|node()" mode="index_add_id">
4111
+ <xsl:copy>
4112
+ <xsl:apply-templates select="@*|node()" mode="index_add_id"/>
4113
+ </xsl:copy>
4114
+ </xsl:template><xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
4115
+ <xsl:variable name="id">
4116
+ <xsl:call-template name="generateIndexXrefId"/>
4117
+ </xsl:variable>
4118
+ <xsl:copy> <!-- add id to xref -->
4119
+ <xsl:apply-templates select="@*" mode="index_add_id"/>
4120
+ <xsl:attribute name="id">
4121
+ <xsl:value-of select="$id"/>
4122
+ </xsl:attribute>
4123
+ <xsl:apply-templates mode="index_add_id"/>
4124
+ </xsl:copy>
4125
+ <!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
4126
+ <xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
4127
+ <xsl:if test="@to">
4128
+ <xsl:value-of select="$dash"/>
4129
+ <xsl:copy>
4130
+ <xsl:copy-of select="@*"/>
4131
+ <xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
4132
+ <xsl:attribute name="id">
4133
+ <xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
4134
+ </xsl:attribute>
4135
+ <xsl:apply-templates mode="index_add_id"/>
4136
+ </xsl:copy>
4137
+ </xsl:if>
4138
+ </xsl:template><xsl:template match="@*|node()" mode="index_update">
4139
+ <xsl:copy>
4140
+ <xsl:apply-templates select="@*|node()" mode="index_update"/>
4141
+ </xsl:copy>
4142
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" mode="index_update">
4143
+ <xsl:copy>
4144
+ <xsl:apply-templates select="@*" mode="index_update"/>
4145
+ <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
4146
+ </xsl:copy>
4147
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/node()" mode="process_li_element" priority="2">
4148
+ <xsl:param name="element"/>
4149
+ <xsl:param name="remove" select="'false'"/>
4150
+ <xsl:param name="target"/>
4151
+ <!-- <node></node> -->
4152
+ <xsl:choose>
4153
+ <xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $dash) and $remove = 'true'">
4154
+ <!-- skip text (i.e. remove it) and process next element -->
4155
+ <!-- [removed_<xsl:value-of select="."/>] -->
4156
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
4157
+ <xsl:with-param name="target"><xsl:value-of select="$target"/></xsl:with-param>
4158
+ </xsl:apply-templates>
4159
+ </xsl:when>
4160
+ <xsl:when test="self::text()">
4161
+ <xsl:value-of select="."/>
4162
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
4163
+ </xsl:when>
4164
+ <xsl:when test="self::* and local-name(.) = 'xref'">
4165
+ <xsl:variable name="id" select="@id"/>
4166
+ <xsl:variable name="page" select="$index//item[@id = $id]"/>
4167
+ <xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
4168
+ <xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
4169
+
4170
+ <xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
4171
+ <xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
4172
+
4173
+ <xsl:choose>
4174
+ <!-- 2nd pass -->
4175
+ <!-- if page is equal to page for next and page is not the end of range -->
4176
+ <xsl:when test="$page != '' and $page_next != '' and $page = $page_next and not(contains($page, '_to'))"> <!-- case: 12, 12-14 -->
4177
+ <!-- skip element (i.e. remove it) and remove next text ',' -->
4178
+ <!-- [removed_xref] -->
4179
+
4180
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
4181
+ <xsl:with-param name="remove">true</xsl:with-param>
4182
+ <xsl:with-param name="target">
4183
+ <xsl:choose>
4184
+ <xsl:when test="$target != ''"><xsl:value-of select="$target"/></xsl:when>
4185
+ <xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise>
4186
+ </xsl:choose>
4187
+ </xsl:with-param>
4188
+ </xsl:apply-templates>
4189
+ </xsl:when>
4190
+
4191
+ <xsl:when test="$page != '' and $page_prev != '' and $page = $page_prev and contains($page_prev, '_to')"> <!-- case: 12-14, 14, ... -->
4192
+ <!-- remove xref -->
4193
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
4194
+ <xsl:with-param name="remove">true</xsl:with-param>
4195
+ </xsl:apply-templates>
4196
+ </xsl:when>
4197
+
4198
+ <xsl:otherwise>
4199
+ <xsl:apply-templates select="." mode="xref_copy">
4200
+ <xsl:with-param name="target" select="$target"/>
4201
+ </xsl:apply-templates>
4202
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
4203
+ </xsl:otherwise>
4204
+ </xsl:choose>
4205
+ </xsl:when>
4206
+ <xsl:when test="self::* and local-name(.) = 'ul'">
4207
+ <!-- ul -->
4208
+ <xsl:apply-templates select="." mode="index_update"/>
4209
+ </xsl:when>
4210
+ <xsl:otherwise>
4211
+ <xsl:apply-templates select="." mode="xref_copy">
4212
+ <xsl:with-param name="target" select="$target"/>
4213
+ </xsl:apply-templates>
4214
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
4215
+ </xsl:otherwise>
4216
+ </xsl:choose>
4217
+ </xsl:template><xsl:template match="@*|node()" mode="xref_copy">
4218
+ <xsl:param name="target"/>
4219
+ <xsl:copy>
4220
+ <xsl:apply-templates select="@*" mode="xref_copy"/>
4221
+ <xsl:if test="$target != '' and not(xalan:nodeset($bookmark_in_fn)//bookmark[. = $target])">
4222
+ <xsl:attribute name="target"><xsl:value-of select="$target"/></xsl:attribute>
4223
+ </xsl:if>
4224
+ <xsl:apply-templates select="node()" mode="xref_copy"/>
4225
+ </xsl:copy>
4226
+ </xsl:template><xsl:template name="generateIndexXrefId">
4227
+ <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
4228
+
4229
+ <xsl:variable name="docid">
4230
+ <xsl:call-template name="getDocumentId"/>
4231
+ </xsl:variable>
4232
+ <xsl:variable name="item_number">
4233
+ <xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
4234
+ </xsl:variable>
4235
+ <xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
4236
+ <xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
4237
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']" priority="4">
4238
+ <xsl:apply-templates/>
4239
+ <fo:block>
4240
+ <xsl:if test="following-sibling::*[local-name() = 'clause']">
4241
+ <fo:block> </fo:block>
4242
+ </xsl:if>
4243
+ </fo:block>
4244
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'ul']" priority="4">
4245
+ <xsl:apply-templates/>
4246
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
4247
+ <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
4248
+ <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
4249
+ <xsl:apply-templates/>
4250
+ </fo:block>
4251
+ </xsl:template><xsl:template match="*[local-name() = 'bookmark']">
4252
+ <fo:inline id="{@id}"/>
4071
4253
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
4072
4254
  <!-- <row>
4073
4255
  <date>05-07-2013</date>
@@ -4284,63 +4466,61 @@
4284
4466
  <xsl:variable name="lang">
4285
4467
  <xsl:call-template name="getLang"/>
4286
4468
  </xsl:variable>
4287
- <fo:declarations>
4288
- <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
4289
- <pdf:dictionary type="normal" key="ViewerPreferences">
4290
- <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
4291
- </pdf:dictionary>
4292
- </pdf:catalog>
4293
- <x:xmpmeta xmlns:x="adobe:ns:meta/">
4294
- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
4295
- <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
4296
- <!-- Dublin Core properties go here -->
4297
- <dc:title>
4298
- <xsl:variable name="title">
4299
- <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4300
-
4301
-
4302
-
4303
-
4304
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
4305
-
4306
-
4307
-
4308
- </xsl:for-each>
4309
- </xsl:variable>
4310
- <xsl:choose>
4311
- <xsl:when test="normalize-space($title) != ''">
4312
- <xsl:value-of select="$title"/>
4313
- </xsl:when>
4314
- <xsl:otherwise>
4315
- <xsl:text> </xsl:text>
4316
- </xsl:otherwise>
4317
- </xsl:choose>
4318
- </dc:title>
4319
- <dc:creator>
4469
+ <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
4470
+ <pdf:dictionary type="normal" key="ViewerPreferences">
4471
+ <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
4472
+ </pdf:dictionary>
4473
+ </pdf:catalog>
4474
+ <x:xmpmeta xmlns:x="adobe:ns:meta/">
4475
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
4476
+ <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
4477
+ <!-- Dublin Core properties go here -->
4478
+ <dc:title>
4479
+ <xsl:variable name="title">
4320
4480
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4321
4481
 
4322
4482
 
4323
4483
 
4324
- </xsl:for-each>
4325
- </dc:creator>
4326
- <dc:description>
4327
- <xsl:variable name="abstract">
4484
+
4485
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
4328
4486
 
4329
4487
 
4330
- </xsl:variable>
4331
- <xsl:value-of select="normalize-space($abstract)"/>
4332
- </dc:description>
4333
- <pdf:Keywords>
4334
- <xsl:call-template name="insertKeywords"/>
4335
- </pdf:Keywords>
4336
- </rdf:Description>
4337
- <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
4338
- <!-- XMP properties go here -->
4339
- <xmp:CreatorTool/>
4340
- </rdf:Description>
4341
- </rdf:RDF>
4342
- </x:xmpmeta>
4343
- </fo:declarations>
4488
+
4489
+ </xsl:for-each>
4490
+ </xsl:variable>
4491
+ <xsl:choose>
4492
+ <xsl:when test="normalize-space($title) != ''">
4493
+ <xsl:value-of select="$title"/>
4494
+ </xsl:when>
4495
+ <xsl:otherwise>
4496
+ <xsl:text> </xsl:text>
4497
+ </xsl:otherwise>
4498
+ </xsl:choose>
4499
+ </dc:title>
4500
+ <dc:creator>
4501
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4502
+
4503
+
4504
+
4505
+ </xsl:for-each>
4506
+ </dc:creator>
4507
+ <dc:description>
4508
+ <xsl:variable name="abstract">
4509
+
4510
+
4511
+ </xsl:variable>
4512
+ <xsl:value-of select="normalize-space($abstract)"/>
4513
+ </dc:description>
4514
+ <pdf:Keywords>
4515
+ <xsl:call-template name="insertKeywords"/>
4516
+ </pdf:Keywords>
4517
+ </rdf:Description>
4518
+ <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
4519
+ <!-- XMP properties go here -->
4520
+ <xmp:CreatorTool/>
4521
+ </rdf:Description>
4522
+ </rdf:RDF>
4523
+ </x:xmpmeta>
4344
4524
  </xsl:template><xsl:template name="getId">
4345
4525
  <xsl:choose>
4346
4526
  <xsl:when test="../@id">