metanorma-itu 2.2.0 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/itu/itu.implementers-guide.xsl +216 -193
- data/lib/isodoc/itu/itu.in-force.xsl +216 -193
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +216 -193
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +216 -193
- data/lib/isodoc/itu/itu.recommendation.xsl +216 -193
- data/lib/isodoc/itu/itu.resolution.xsl +216 -193
- data/lib/isodoc/itu/itu.service-publication.xsl +216 -193
- data/lib/isodoc/itu/itu.technical-paper.xsl +216 -193
- data/lib/isodoc/itu/itu.technical-report.xsl +216 -193
- data/lib/isodoc/itu/presentation_xml_convert.rb +18 -2
- data/lib/isodoc/itu/ref.rb +2 -12
- data/lib/isodoc/itu/word_convert.rb +1 -1
- data/lib/metanorma/itu/isodoc.rng +6 -1
- data/lib/metanorma/itu/validate.rb +2 -2
- data/lib/metanorma/itu/version.rb +1 -1
- metadata +2 -2
@@ -2835,6 +2835,12 @@
|
|
2835
2835
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2836
2836
|
</xsl:attribute-set>
|
2837
2837
|
|
2838
|
+
<xsl:attribute-set name="figure-block-style">
|
2839
|
+
|
2840
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2841
|
+
|
2842
|
+
</xsl:attribute-set>
|
2843
|
+
|
2838
2844
|
<xsl:attribute-set name="figure-style">
|
2839
2845
|
|
2840
2846
|
</xsl:attribute-set>
|
@@ -2844,7 +2850,7 @@
|
|
2844
2850
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2845
2851
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2846
2852
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
2847
|
-
<xsl:attribute name="
|
2853
|
+
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
2848
2854
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
2849
2855
|
|
2850
2856
|
</xsl:attribute-set>
|
@@ -4258,6 +4264,10 @@
|
|
4258
4264
|
<xsl:with-param name="continued">true</xsl:with-param>
|
4259
4265
|
</xsl:apply-templates>
|
4260
4266
|
|
4267
|
+
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
4268
|
+
<fo:block/>
|
4269
|
+
</xsl:if>
|
4270
|
+
|
4261
4271
|
</fo:table-cell>
|
4262
4272
|
</fo:table-row>
|
4263
4273
|
</xsl:template> <!-- table-header-title -->
|
@@ -4688,7 +4698,22 @@
|
|
4688
4698
|
|
4689
4699
|
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
4690
4700
|
<xsl:variable name="footnote_inline">
|
4691
|
-
<fo:inline
|
4701
|
+
<fo:inline>
|
4702
|
+
|
4703
|
+
<xsl:variable name="fn_styles">
|
4704
|
+
<xsl:choose>
|
4705
|
+
<xsl:when test="ancestor::*[local-name() = 'bibitem']">
|
4706
|
+
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"/>
|
4707
|
+
</xsl:when>
|
4708
|
+
<xsl:otherwise>
|
4709
|
+
<fn_styles xsl:use-attribute-sets="fn-num-style"/>
|
4710
|
+
</xsl:otherwise>
|
4711
|
+
</xsl:choose>
|
4712
|
+
</xsl:variable>
|
4713
|
+
|
4714
|
+
<xsl:for-each select="xalan:nodeset($fn_styles)/fn_styles/@*">
|
4715
|
+
<xsl:copy-of select="."/>
|
4716
|
+
</xsl:for-each>
|
4692
4717
|
|
4693
4718
|
<xsl:if test="following-sibling::*[1][local-name() = 'fn']">
|
4694
4719
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
@@ -4756,7 +4781,10 @@
|
|
4756
4781
|
</xsl:for-each>
|
4757
4782
|
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='boilerplate']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
4758
4783
|
<xsl:sort select="@displayorder" data-type="number"/>
|
4759
|
-
|
4784
|
+
<!-- commented:
|
4785
|
+
.//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
|
4786
|
+
because 'fn' there is in biblio-tag -->
|
4787
|
+
<xsl:for-each select=".//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
4760
4788
|
<!-- copy unique fn -->
|
4761
4789
|
<fn gen_id="{generate-id(.)}">
|
4762
4790
|
<xsl:copy-of select="@*"/>
|
@@ -5627,7 +5655,7 @@
|
|
5627
5655
|
|
5628
5656
|
<xsl:variable name="_font-size">
|
5629
5657
|
|
5630
|
-
<!--
|
5658
|
+
<!-- inherit -->
|
5631
5659
|
|
5632
5660
|
</xsl:variable>
|
5633
5661
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -6595,6 +6623,33 @@
|
|
6595
6623
|
</xsl:choose>
|
6596
6624
|
</xsl:template>
|
6597
6625
|
|
6626
|
+
<xsl:template name="getLang_fromCurrentNode">
|
6627
|
+
<xsl:variable name="language_current" select="normalize-space(.//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
6628
|
+
<xsl:variable name="language">
|
6629
|
+
<xsl:choose>
|
6630
|
+
<xsl:when test="$language_current != ''">
|
6631
|
+
<xsl:value-of select="$language_current"/>
|
6632
|
+
</xsl:when>
|
6633
|
+
<xsl:otherwise>
|
6634
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
6635
|
+
<xsl:choose>
|
6636
|
+
<xsl:when test="$language_current_2 != ''">
|
6637
|
+
<xsl:value-of select="$language_current_2"/>
|
6638
|
+
</xsl:when>
|
6639
|
+
<xsl:otherwise>
|
6640
|
+
<xsl:value-of select=".//*[local-name()='bibdata']//*[local-name()='language']"/>
|
6641
|
+
</xsl:otherwise>
|
6642
|
+
</xsl:choose>
|
6643
|
+
</xsl:otherwise>
|
6644
|
+
</xsl:choose>
|
6645
|
+
</xsl:variable>
|
6646
|
+
|
6647
|
+
<xsl:choose>
|
6648
|
+
<xsl:when test="$language = 'English'">en</xsl:when>
|
6649
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
6650
|
+
</xsl:choose>
|
6651
|
+
</xsl:template>
|
6652
|
+
|
6598
6653
|
<xsl:template name="capitalizeWords">
|
6599
6654
|
<xsl:param name="str"/>
|
6600
6655
|
<xsl:variable name="str2" select="translate($str, '-', ' ')"/>
|
@@ -7217,7 +7272,7 @@
|
|
7217
7272
|
<xsl:template match="*[local-name() = 'figure']" name="figure">
|
7218
7273
|
<xsl:variable name="isAdded" select="@added"/>
|
7219
7274
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
7220
|
-
<fo:block-container id="{@id}">
|
7275
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
7221
7276
|
|
7222
7277
|
<xsl:call-template name="setTrackChangesStyles">
|
7223
7278
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
@@ -8203,7 +8258,13 @@
|
|
8203
8258
|
</xsl:template>
|
8204
8259
|
|
8205
8260
|
<xsl:template match="text()" mode="contents_item">
|
8206
|
-
<xsl:
|
8261
|
+
<xsl:variable name="text">
|
8262
|
+
<!-- to split by '_' and other chars -->
|
8263
|
+
<text><xsl:call-template name="add-zero-spaces-java"/></text>
|
8264
|
+
</xsl:variable>
|
8265
|
+
<xsl:for-each select="xalan:nodeset($text)/text/text()">
|
8266
|
+
<xsl:call-template name="keep_together_standard_number"/>
|
8267
|
+
</xsl:for-each>
|
8207
8268
|
</xsl:template>
|
8208
8269
|
|
8209
8270
|
<!-- Note: to enable the addition of character span markup with semantic styling for DIS Word output -->
|
@@ -8214,36 +8275,54 @@
|
|
8214
8275
|
<!-- =============== -->
|
8215
8276
|
<!-- sourcecode -->
|
8216
8277
|
<!-- =============== -->
|
8217
|
-
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
8218
8278
|
|
8219
|
-
|
8220
|
-
|
8221
|
-
|
8279
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'source-highlighter-css']"/>
|
8280
|
+
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
8281
|
+
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
8222
8282
|
|
8223
|
-
|
8283
|
+
<xsl:template match="*[local-name() = 'property']" mode="css">
|
8284
|
+
<xsl:attribute name="{@name}">
|
8285
|
+
<xsl:value-of select="@value"/>
|
8286
|
+
</xsl:attribute>
|
8287
|
+
</xsl:template>
|
8224
8288
|
|
8225
|
-
|
8226
|
-
|
8227
|
-
|
8228
|
-
10
|
8289
|
+
<xsl:template name="get_sourcecode_attributes">
|
8290
|
+
<xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
|
8291
|
+
<xsl:variable name="_font-size">
|
8229
8292
|
|
8293
|
+
<!-- inherit -->
|
8230
8294
|
|
8231
|
-
|
8295
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
8296
|
+
<xsl:if test="$current_template = 'standard'">8</xsl:if>
|
8297
|
+
</xsl:if> -->
|
8298
|
+
10
|
8232
8299
|
|
8233
|
-
|
8234
|
-
|
8235
|
-
|
8236
|
-
|
8237
|
-
|
8238
|
-
|
8239
|
-
|
8240
|
-
|
8241
|
-
|
8242
|
-
|
8243
|
-
|
8244
|
-
|
8300
|
+
|
8301
|
+
</xsl:variable>
|
8302
|
+
|
8303
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
8304
|
+
<xsl:if test="$font-size != ''">
|
8305
|
+
<xsl:attribute name="font-size">
|
8306
|
+
<xsl:choose>
|
8307
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
8308
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
8309
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
8310
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
8311
|
+
</xsl:choose>
|
8312
|
+
</xsl:attribute>
|
8313
|
+
</xsl:if>
|
8314
|
+
<xsl:apply-templates select="$sourcecode_css//class[@name = 'sourcecode']" mode="css"/>
|
8315
|
+
</xsl:element>
|
8316
|
+
</xsl:template>
|
8317
|
+
|
8318
|
+
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
8319
|
+
|
8320
|
+
<xsl:variable name="sourcecode_attributes">
|
8321
|
+
<xsl:call-template name="get_sourcecode_attributes"/>
|
8245
8322
|
</xsl:variable>
|
8246
8323
|
|
8324
|
+
<!-- <xsl:copy-of select="$sourcecode_css"/> -->
|
8325
|
+
|
8247
8326
|
<xsl:choose>
|
8248
8327
|
<xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
|
8249
8328
|
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
@@ -8297,9 +8376,10 @@
|
|
8297
8376
|
</xsl:choose>
|
8298
8377
|
</xsl:template>
|
8299
8378
|
|
8300
|
-
<xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
8379
|
+
<xsl:template match="*[local-name()='sourcecode']/text() | *[local-name()='sourcecode']//*[local-name()='span']/text()" priority="2">
|
8301
8380
|
<xsl:choose>
|
8302
|
-
|
8381
|
+
<!-- disabled -->
|
8382
|
+
<xsl:when test="1 = 2 and normalize-space($syntax-highlight) = 'true' and normalize-space(../@lang) != ''"> <!-- condition for turn on of highlighting -->
|
8303
8383
|
<xsl:variable name="syntax" select="java:org.metanorma.fop.Util.syntaxHighlight(., ../@lang)"/>
|
8304
8384
|
<xsl:choose>
|
8305
8385
|
<xsl:when test="normalize-space($syntax) != ''"><!-- if there is highlighted result -->
|
@@ -8314,8 +8394,75 @@
|
|
8314
8394
|
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
8315
8395
|
</xsl:otherwise>
|
8316
8396
|
</xsl:choose>
|
8397
|
+
</xsl:template>
|
8317
8398
|
|
8399
|
+
<!-- add sourcecode highlighting -->
|
8400
|
+
<xsl:template match="*[local-name()='sourcecode']//*[local-name()='span'][@class]" priority="2">
|
8401
|
+
<xsl:variable name="class" select="@class"/>
|
8402
|
+
<xsl:choose>
|
8403
|
+
<xsl:when test="$sourcecode_css//class[@name = $class]">
|
8404
|
+
<fo:inline>
|
8405
|
+
<xsl:apply-templates select="$sourcecode_css//class[@name = $class]" mode="css"/>
|
8406
|
+
<xsl:apply-templates/>
|
8407
|
+
</fo:inline>
|
8408
|
+
</xsl:when>
|
8409
|
+
<xsl:otherwise>
|
8410
|
+
<xsl:apply-templates/>
|
8411
|
+
</xsl:otherwise>
|
8412
|
+
</xsl:choose>
|
8413
|
+
</xsl:template>
|
8414
|
+
|
8415
|
+
<!-- outer table with line numbers for sourcecode -->
|
8416
|
+
<xsl:template match="*[local-name()='table'][@type = 'sourcecode']" priority="2">
|
8417
|
+
<fo:block>
|
8418
|
+
<fo:table width="100%" table-layout="fixed">
|
8419
|
+
<xsl:copy-of select="@id"/>
|
8420
|
+
<fo:table-column column-width="8%"/>
|
8421
|
+
<fo:table-column column-width="92%"/>
|
8422
|
+
<fo:table-body>
|
8423
|
+
<xsl:apply-templates/>
|
8424
|
+
</fo:table-body>
|
8425
|
+
</fo:table>
|
8426
|
+
</fo:block>
|
8427
|
+
</xsl:template>
|
8428
|
+
<xsl:template match="*[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody']" priority="2">
|
8429
|
+
<xsl:apply-templates/>
|
8430
|
+
</xsl:template>
|
8431
|
+
<xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']" priority="2">
|
8432
|
+
<fo:table-row>
|
8433
|
+
<xsl:apply-templates/>
|
8434
|
+
</fo:table-row>
|
8435
|
+
</xsl:template>
|
8436
|
+
<!-- first td with line numbers -->
|
8437
|
+
<xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][not(preceding-sibling::*)]" priority="2">
|
8438
|
+
<fo:table-cell>
|
8439
|
+
<fo:block>
|
8440
|
+
|
8441
|
+
<!-- set attibutes for line numbers - same as sourcecode -->
|
8442
|
+
<xsl:variable name="sourcecode_attributes">
|
8443
|
+
<xsl:for-each select="following-sibling::*[local-name() = 'td']/*[local-name() = 'sourcecode']">
|
8444
|
+
<xsl:call-template name="get_sourcecode_attributes"/>
|
8445
|
+
</xsl:for-each>
|
8446
|
+
</xsl:variable>
|
8447
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*[not(starts-with(local-name(), 'margin-') or starts-with(local-name(), 'space-'))]">
|
8448
|
+
<xsl:attribute name="{local-name()}">
|
8449
|
+
<xsl:value-of select="."/>
|
8450
|
+
</xsl:attribute>
|
8451
|
+
</xsl:for-each>
|
8452
|
+
|
8453
|
+
<xsl:apply-templates/>
|
8454
|
+
</fo:block>
|
8455
|
+
</fo:table-cell>
|
8456
|
+
</xsl:template>
|
8457
|
+
<!-- second td with sourcecode -->
|
8458
|
+
<xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2">
|
8459
|
+
<fo:table-cell>
|
8460
|
+
<fo:block>
|
8461
|
+
<xsl:apply-templates/>
|
8462
|
+
</fo:block>
|
8463
|
+
</fo:table-cell>
|
8318
8464
|
</xsl:template>
|
8465
|
+
<!-- END outer table with line numbers for sourcecode -->
|
8319
8466
|
|
8320
8467
|
<xsl:template name="add_spaces_to_sourcecode">
|
8321
8468
|
<xsl:variable name="text_step1">
|
@@ -9996,49 +10143,27 @@
|
|
9996
10143
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
9997
10144
|
|
9998
10145
|
<xsl:template name="processBibitem">
|
10146
|
+
<xsl:param name="biblio_tag_part">both</xsl:param>
|
9999
10147
|
|
10148
|
+
<!-- start ITU bibitem processing -->
|
10000
10149
|
<!-- Example: [ITU-T A.23] ITU-T A.23, Recommendation ITU-T A.23, Annex A (2014), Guide for ITU-T and ISO/IEC JTC 1 cooperation. -->
|
10001
10150
|
<xsl:if test="$doctype = 'implementers-guide'">
|
10002
10151
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
10003
10152
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
10004
10153
|
</xsl:if>
|
10005
10154
|
|
10006
|
-
<xsl:variable name="docidentifier_metanorma" select="normalize-space(itu:docidentifier[@type = 'metanorma'])"/>
|
10007
10155
|
<xsl:variable name="docidentifier_metanorma_ordinal" select="normalize-space(itu:docidentifier[@type = 'metanorma-ordinal'])"/>
|
10008
10156
|
|
10009
10157
|
<xsl:variable name="bibitem_label">
|
10010
|
-
<xsl:
|
10011
|
-
|
10012
|
-
|
10013
|
-
<xsl:variable name="docidentifier" select="normalize-space(itu:docidentifier[not(@type = 'metanorma-ordinal')])"/>
|
10014
|
-
<xsl:choose>
|
10015
|
-
<xsl:when test="$docidentifier != ''">
|
10016
|
-
<xsl:text>[</xsl:text>
|
10017
|
-
<xsl:value-of select="$docidentifier"/>
|
10018
|
-
<xsl:text>] </xsl:text>
|
10019
|
-
</xsl:when>
|
10020
|
-
<xsl:otherwise>
|
10021
|
-
<xsl:value-of select="$docidentifier_metanorma_ordinal"/>
|
10022
|
-
</xsl:otherwise>
|
10023
|
-
</xsl:choose>
|
10024
|
-
</fo:inline>
|
10025
|
-
</xsl:if>
|
10158
|
+
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
10159
|
+
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
10160
|
+
</xsl:apply-templates>
|
10026
10161
|
</xsl:variable>
|
10027
10162
|
|
10028
10163
|
<xsl:variable name="bibitem_body">
|
10029
|
-
<xsl:
|
10030
|
-
<xsl:
|
10031
|
-
|
10032
|
-
<xsl:when test="$docidentifier_metanorma != ''">
|
10033
|
-
<xsl:value-of select="itu:docidentifier[not(@type) or not(@type = 'metanorma' or @type = 'metanorma-ordinal')]"/>
|
10034
|
-
</xsl:when>
|
10035
|
-
<xsl:otherwise>
|
10036
|
-
<xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>
|
10037
|
-
</xsl:otherwise>
|
10038
|
-
</xsl:choose>
|
10039
|
-
</xsl:variable>
|
10040
|
-
<xsl:value-of select="$docidentifier"/>
|
10041
|
-
<xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
|
10164
|
+
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
10165
|
+
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
10166
|
+
</xsl:apply-templates>
|
10042
10167
|
<xsl:apply-templates select="itu:formattedref"/>
|
10043
10168
|
</xsl:variable>
|
10044
10169
|
|
@@ -10078,152 +10203,40 @@
|
|
10078
10203
|
</fo:list-block>
|
10079
10204
|
</xsl:otherwise>
|
10080
10205
|
</xsl:choose>
|
10206
|
+
<!-- end ITU bibitem processing -->
|
10081
10207
|
|
10082
10208
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
10083
10209
|
|
10084
|
-
<xsl:template name="
|
10085
|
-
<xsl:
|
10086
|
-
|
10087
|
-
|
10088
|
-
|
10089
|
-
|
10090
|
-
|
10091
|
-
|
10092
|
-
|
10093
|
-
|
10094
|
-
|
10095
|
-
|
10096
|
-
<xsl:if test="$type != ''">
|
10097
|
-
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
10098
|
-
</xsl:if> -->
|
10099
|
-
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
|
10100
|
-
</xsl:otherwise>
|
10101
|
-
</xsl:choose>
|
10102
|
-
</xsl:template> <!-- processBibitemDocId -->
|
10210
|
+
<xsl:template match="*[local-name() = 'title']" mode="title">
|
10211
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
10212
|
+
</xsl:template>
|
10213
|
+
|
10214
|
+
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/>
|
10215
|
+
|
10216
|
+
<xsl:template match="*[local-name() = 'formattedref']">
|
10217
|
+
<!-- <xsl:if test="$namespace = 'unece' or $namespace = 'unece-rec'">
|
10218
|
+
<xsl:text>, </xsl:text>
|
10219
|
+
</xsl:if> -->
|
10220
|
+
<xsl:apply-templates/>
|
10221
|
+
</xsl:template>
|
10103
10222
|
|
10104
|
-
<xsl:template name="
|
10223
|
+
<xsl:template match="*[local-name() = 'biblio-tag']">
|
10224
|
+
<xsl:param name="biblio_tag_part">both</xsl:param>
|
10105
10225
|
<xsl:choose>
|
10106
|
-
<xsl:when test="
|
10107
|
-
<
|
10108
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
10109
|
-
</author>
|
10226
|
+
<xsl:when test="$biblio_tag_part = 'first' and *[local-name() = 'tab']">
|
10227
|
+
<xsl:apply-templates select="./*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
10110
10228
|
</xsl:when>
|
10111
|
-
<xsl:when test="
|
10112
|
-
<
|
10113
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
10114
|
-
<xsl:text> </xsl:text>
|
10115
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
10116
|
-
</author>
|
10117
|
-
</xsl:when>
|
10118
|
-
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
10119
|
-
<author>
|
10120
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
10121
|
-
<xsl:text> </xsl:text>
|
10122
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
10123
|
-
</author>
|
10229
|
+
<xsl:when test="$biblio_tag_part = 'last'">
|
10230
|
+
<xsl:apply-templates select="./*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
10124
10231
|
</xsl:when>
|
10125
10232
|
<xsl:otherwise>
|
10126
10233
|
<xsl:apply-templates/>
|
10127
10234
|
</xsl:otherwise>
|
10128
10235
|
</xsl:choose>
|
10129
|
-
</xsl:template> <!-- processPersonalAuthor -->
|
10130
|
-
|
10131
|
-
<xsl:template name="renderDate">
|
10132
|
-
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
10133
|
-
<xsl:value-of select="*[local-name() = 'on']"/>
|
10134
|
-
</xsl:if>
|
10135
|
-
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
10136
|
-
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
10137
|
-
</xsl:if>
|
10138
|
-
</xsl:template>
|
10139
|
-
|
10140
|
-
<xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
10141
|
-
<xsl:value-of select="translate(.,'. ','')"/>
|
10142
|
-
</xsl:template>
|
10143
|
-
|
10144
|
-
<xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
10145
|
-
<xsl:value-of select="substring(.,1,1)"/>
|
10146
|
-
</xsl:template>
|
10147
|
-
|
10148
|
-
<xsl:template match="*[local-name() = 'title']" mode="title">
|
10149
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
10150
|
-
</xsl:template>
|
10151
|
-
|
10152
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
|
10153
|
-
<!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
|
10154
|
-
<fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
|
10155
|
-
<xsl:apply-templates/>
|
10156
|
-
</fo:inline>
|
10157
10236
|
</xsl:template>
|
10158
10237
|
|
10159
|
-
|
10160
|
-
|
10161
|
-
|
10162
|
-
<!-- list of footnotes to calculate actual footnotes number -->
|
10163
|
-
<xsl:variable name="p_fn_">
|
10164
|
-
<xsl:call-template name="get_fn_list"/>
|
10165
|
-
</xsl:variable>
|
10166
|
-
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
10167
|
-
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
10168
|
-
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
10169
|
-
<!-- fn sequence number in document -->
|
10170
|
-
<xsl:variable name="current_fn_number">
|
10171
|
-
<xsl:choose>
|
10172
|
-
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
10173
|
-
<xsl:otherwise>
|
10174
|
-
<!-- <xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1" /> -->
|
10175
|
-
<xsl:value-of select="count($p_fn//fn[@gen_id = $gen_id]/preceding-sibling::fn) + 1"/>
|
10176
|
-
</xsl:otherwise>
|
10177
|
-
</xsl:choose>
|
10178
|
-
</xsl:variable>
|
10179
|
-
<fo:footnote>
|
10180
|
-
<xsl:variable name="number">
|
10181
|
-
|
10182
|
-
<xsl:value-of select="$current_fn_number"/>
|
10183
|
-
|
10184
|
-
</xsl:variable>
|
10185
|
-
|
10186
|
-
<xsl:variable name="current_fn_number_text">
|
10187
|
-
<xsl:value-of select="$number"/>
|
10188
|
-
|
10189
|
-
</xsl:variable>
|
10190
|
-
|
10191
|
-
<fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
|
10192
|
-
<fo:basic-link internal-destination="{$gen_id}" fox:alt-text="footnote {$number}">
|
10193
|
-
<xsl:value-of select="$current_fn_number_text"/>
|
10194
|
-
</fo:basic-link>
|
10195
|
-
</fo:inline>
|
10196
|
-
<fo:footnote-body>
|
10197
|
-
<fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
|
10198
|
-
<fo:inline id="{$gen_id}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
|
10199
|
-
<xsl:value-of select="$current_fn_number_text"/>
|
10200
|
-
</fo:inline>
|
10201
|
-
<xsl:apply-templates/>
|
10202
|
-
</fo:block>
|
10203
|
-
</fo:footnote-body>
|
10204
|
-
</fo:footnote>
|
10205
|
-
</xsl:template>
|
10206
|
-
|
10207
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
|
10208
|
-
<xsl:text> edition </xsl:text>
|
10209
|
-
<xsl:value-of select="."/>
|
10210
|
-
</xsl:template>
|
10211
|
-
|
10212
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
|
10213
|
-
<xsl:text> (</xsl:text>
|
10214
|
-
<fo:inline xsl:use-attribute-sets="link-style">
|
10215
|
-
<fo:basic-link external-destination="." fox:alt-text=".">
|
10216
|
-
<xsl:value-of select="."/>
|
10217
|
-
</fo:basic-link>
|
10218
|
-
</fo:inline>
|
10219
|
-
<xsl:text>)</xsl:text>
|
10220
|
-
</xsl:template>
|
10221
|
-
|
10222
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/>
|
10223
|
-
|
10224
|
-
<xsl:template match="*[local-name() = 'formattedref']">
|
10225
|
-
|
10226
|
-
<xsl:apply-templates/>
|
10238
|
+
<xsl:template match="*[local-name() = 'biblio-tag']/*[local-name() = 'tab']" priority="2">
|
10239
|
+
<xsl:text> </xsl:text>
|
10227
10240
|
</xsl:template>
|
10228
10241
|
|
10229
10242
|
<!-- ======================= -->
|
@@ -10652,6 +10665,12 @@
|
|
10652
10665
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
10653
10666
|
<xsl:apply-templates mode="update_xml_step1"/>
|
10654
10667
|
</xsl:template>
|
10668
|
+
<xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
10669
|
+
<xsl:copy>
|
10670
|
+
<xsl:copy-of select="@*"/>
|
10671
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
10672
|
+
</xsl:copy>
|
10673
|
+
</xsl:template>
|
10655
10674
|
<!-- =========================================================================== -->
|
10656
10675
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
10657
10676
|
<!-- =========================================================================== -->
|
@@ -11132,6 +11151,10 @@
|
|
11132
11151
|
<xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
|
11133
11152
|
</xsl:template>
|
11134
11153
|
|
11154
|
+
<xsl:template name="getDocumentId_fromCurrentNode">
|
11155
|
+
<xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//*[local-name() = 'p'][1]/@id"/>
|
11156
|
+
</xsl:template>
|
11157
|
+
|
11135
11158
|
<xsl:template name="namespaceCheck">
|
11136
11159
|
<xsl:variable name="documentNS" select="namespace-uri(/*)"/>
|
11137
11160
|
<xsl:variable name="XSLNS">
|