metanorma-un 0.10.0 → 0.10.1
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 +4 -4
- data/lib/isodoc/un/html/htmlstyle.css +5 -2
- data/lib/isodoc/un/un.plenary-attachment.xsl +217 -167
- data/lib/isodoc/un/un.plenary.xsl +217 -167
- data/lib/isodoc/un/un.recommendation.xsl +217 -167
- data/lib/metanorma/un/isodoc.rng +11 -1
- data/lib/metanorma/un/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bb58f5070137457c97598dc1dc44036a0f3f126500ed833367c7b8833e11b50
|
4
|
+
data.tar.gz: 854ca121c4d69913f5706b8f1daf13f81bcce711130f061aff5c9c85b968a77b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71b85c17cbf8264a281708db02c3d0c6073bd9fa99a4b8cd3bdd4cced42fc76d98220e646a4a65820edd0a87484655b445479368ae8d09f878816725dca75c1c
|
7
|
+
data.tar.gz: f16c9f80b0d0d1a686083ec19a47587aa73ab4216beffbbb60a834b4545e7159ccbec47b738e75d85b8b7b1599bd1beb4e98817a94ed3f2aa304ab5dffe665c6
|
@@ -681,8 +681,11 @@ a:hover {
|
|
681
681
|
background: #00ADEF;
|
682
682
|
box-shadow: 3px 0 0 #00ADEF, -3px 0 0 #00ADEF; }
|
683
683
|
|
684
|
-
|
685
|
-
|
684
|
+
*::selection {
|
685
|
+
background: #00ADEF;
|
686
|
+
color: white; }
|
687
|
+
|
688
|
+
*::-moz-selection {
|
686
689
|
background: #00ADEF;
|
687
690
|
color: white; }
|
688
691
|
|
@@ -1519,6 +1519,12 @@
|
|
1519
1519
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1520
1520
|
</xsl:attribute-set>
|
1521
1521
|
|
1522
|
+
<xsl:attribute-set name="figure-block-style">
|
1523
|
+
|
1524
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1525
|
+
|
1526
|
+
</xsl:attribute-set>
|
1527
|
+
|
1522
1528
|
<xsl:attribute-set name="figure-style">
|
1523
1529
|
|
1524
1530
|
</xsl:attribute-set>
|
@@ -1526,7 +1532,7 @@
|
|
1526
1532
|
<xsl:attribute-set name="figure-name-style">
|
1527
1533
|
|
1528
1534
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1529
|
-
<xsl:attribute name="
|
1535
|
+
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
1530
1536
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1531
1537
|
|
1532
1538
|
</xsl:attribute-set>
|
@@ -2926,6 +2932,10 @@
|
|
2926
2932
|
<xsl:with-param name="continued">true</xsl:with-param>
|
2927
2933
|
</xsl:apply-templates>
|
2928
2934
|
|
2935
|
+
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
2936
|
+
<fo:block/>
|
2937
|
+
</xsl:if>
|
2938
|
+
|
2929
2939
|
</fo:table-cell>
|
2930
2940
|
</fo:table-row>
|
2931
2941
|
</xsl:template> <!-- table-header-title -->
|
@@ -3318,7 +3328,22 @@
|
|
3318
3328
|
|
3319
3329
|
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
3320
3330
|
<xsl:variable name="footnote_inline">
|
3321
|
-
<fo:inline
|
3331
|
+
<fo:inline>
|
3332
|
+
|
3333
|
+
<xsl:variable name="fn_styles">
|
3334
|
+
<xsl:choose>
|
3335
|
+
<xsl:when test="ancestor::*[local-name() = 'bibitem']">
|
3336
|
+
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"/>
|
3337
|
+
</xsl:when>
|
3338
|
+
<xsl:otherwise>
|
3339
|
+
<fn_styles xsl:use-attribute-sets="fn-num-style"/>
|
3340
|
+
</xsl:otherwise>
|
3341
|
+
</xsl:choose>
|
3342
|
+
</xsl:variable>
|
3343
|
+
|
3344
|
+
<xsl:for-each select="xalan:nodeset($fn_styles)/fn_styles/@*">
|
3345
|
+
<xsl:copy-of select="."/>
|
3346
|
+
</xsl:for-each>
|
3322
3347
|
|
3323
3348
|
<xsl:if test="following-sibling::*[1][local-name() = 'fn']">
|
3324
3349
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
@@ -3382,7 +3407,10 @@
|
|
3382
3407
|
</xsl:for-each>
|
3383
3408
|
<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']/*">
|
3384
3409
|
<xsl:sort select="@displayorder" data-type="number"/>
|
3385
|
-
|
3410
|
+
<!-- commented:
|
3411
|
+
.//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
|
3412
|
+
because 'fn' there is in biblio-tag -->
|
3413
|
+
<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])]">
|
3386
3414
|
<!-- copy unique fn -->
|
3387
3415
|
<fn gen_id="{generate-id(.)}">
|
3388
3416
|
<xsl:copy-of select="@*"/>
|
@@ -4231,7 +4259,7 @@
|
|
4231
4259
|
|
4232
4260
|
<xsl:variable name="_font-size">
|
4233
4261
|
|
4234
|
-
<!--
|
4262
|
+
<!-- inherit -->
|
4235
4263
|
|
4236
4264
|
</xsl:variable>
|
4237
4265
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -5199,6 +5227,33 @@
|
|
5199
5227
|
</xsl:choose>
|
5200
5228
|
</xsl:template>
|
5201
5229
|
|
5230
|
+
<xsl:template name="getLang_fromCurrentNode">
|
5231
|
+
<xsl:variable name="language_current" select="normalize-space(.//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
5232
|
+
<xsl:variable name="language">
|
5233
|
+
<xsl:choose>
|
5234
|
+
<xsl:when test="$language_current != ''">
|
5235
|
+
<xsl:value-of select="$language_current"/>
|
5236
|
+
</xsl:when>
|
5237
|
+
<xsl:otherwise>
|
5238
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
5239
|
+
<xsl:choose>
|
5240
|
+
<xsl:when test="$language_current_2 != ''">
|
5241
|
+
<xsl:value-of select="$language_current_2"/>
|
5242
|
+
</xsl:when>
|
5243
|
+
<xsl:otherwise>
|
5244
|
+
<xsl:value-of select=".//*[local-name()='bibdata']//*[local-name()='language']"/>
|
5245
|
+
</xsl:otherwise>
|
5246
|
+
</xsl:choose>
|
5247
|
+
</xsl:otherwise>
|
5248
|
+
</xsl:choose>
|
5249
|
+
</xsl:variable>
|
5250
|
+
|
5251
|
+
<xsl:choose>
|
5252
|
+
<xsl:when test="$language = 'English'">en</xsl:when>
|
5253
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
5254
|
+
</xsl:choose>
|
5255
|
+
</xsl:template>
|
5256
|
+
|
5202
5257
|
<xsl:template name="capitalizeWords">
|
5203
5258
|
<xsl:param name="str"/>
|
5204
5259
|
<xsl:variable name="str2" select="translate($str, '-', ' ')"/>
|
@@ -5831,7 +5886,7 @@
|
|
5831
5886
|
<xsl:template match="*[local-name() = 'figure']" name="figure">
|
5832
5887
|
<xsl:variable name="isAdded" select="@added"/>
|
5833
5888
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
5834
|
-
<fo:block-container id="{@id}">
|
5889
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
5835
5890
|
|
5836
5891
|
<xsl:call-template name="setTrackChangesStyles">
|
5837
5892
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
@@ -6817,7 +6872,13 @@
|
|
6817
6872
|
</xsl:template>
|
6818
6873
|
|
6819
6874
|
<xsl:template match="text()" mode="contents_item">
|
6820
|
-
<xsl:
|
6875
|
+
<xsl:variable name="text">
|
6876
|
+
<!-- to split by '_' and other chars -->
|
6877
|
+
<text><xsl:call-template name="add-zero-spaces-java"/></text>
|
6878
|
+
</xsl:variable>
|
6879
|
+
<xsl:for-each select="xalan:nodeset($text)/text/text()">
|
6880
|
+
<xsl:call-template name="keep_together_standard_number"/>
|
6881
|
+
</xsl:for-each>
|
6821
6882
|
</xsl:template>
|
6822
6883
|
|
6823
6884
|
<!-- Note: to enable the addition of character span markup with semantic styling for DIS Word output -->
|
@@ -6828,35 +6889,53 @@
|
|
6828
6889
|
<!-- =============== -->
|
6829
6890
|
<!-- sourcecode -->
|
6830
6891
|
<!-- =============== -->
|
6831
|
-
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
6832
6892
|
|
6833
|
-
|
6834
|
-
|
6835
|
-
|
6893
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'source-highlighter-css']"/>
|
6894
|
+
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
6895
|
+
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
6836
6896
|
|
6837
|
-
|
6897
|
+
<xsl:template match="*[local-name() = 'property']" mode="css">
|
6898
|
+
<xsl:attribute name="{@name}">
|
6899
|
+
<xsl:value-of select="@value"/>
|
6900
|
+
</xsl:attribute>
|
6901
|
+
</xsl:template>
|
6838
6902
|
|
6839
|
-
|
6840
|
-
|
6841
|
-
|
6903
|
+
<xsl:template name="get_sourcecode_attributes">
|
6904
|
+
<xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
|
6905
|
+
<xsl:variable name="_font-size">
|
6842
6906
|
|
6843
|
-
|
6844
|
-
</xsl:variable>
|
6907
|
+
<!-- inherit -->
|
6845
6908
|
|
6846
|
-
<xsl:
|
6847
|
-
|
6848
|
-
|
6849
|
-
|
6850
|
-
|
6851
|
-
|
6852
|
-
|
6853
|
-
|
6854
|
-
|
6855
|
-
|
6856
|
-
|
6857
|
-
|
6909
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
6910
|
+
<xsl:if test="$current_template = 'standard'">8</xsl:if>
|
6911
|
+
</xsl:if> -->
|
6912
|
+
|
6913
|
+
10
|
6914
|
+
</xsl:variable>
|
6915
|
+
|
6916
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
6917
|
+
<xsl:if test="$font-size != ''">
|
6918
|
+
<xsl:attribute name="font-size">
|
6919
|
+
<xsl:choose>
|
6920
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
6921
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
6922
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
6923
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
6924
|
+
</xsl:choose>
|
6925
|
+
</xsl:attribute>
|
6926
|
+
</xsl:if>
|
6927
|
+
<xsl:apply-templates select="$sourcecode_css//class[@name = 'sourcecode']" mode="css"/>
|
6928
|
+
</xsl:element>
|
6929
|
+
</xsl:template>
|
6930
|
+
|
6931
|
+
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
6932
|
+
|
6933
|
+
<xsl:variable name="sourcecode_attributes">
|
6934
|
+
<xsl:call-template name="get_sourcecode_attributes"/>
|
6858
6935
|
</xsl:variable>
|
6859
6936
|
|
6937
|
+
<!-- <xsl:copy-of select="$sourcecode_css"/> -->
|
6938
|
+
|
6860
6939
|
<xsl:choose>
|
6861
6940
|
<xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
|
6862
6941
|
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
@@ -6910,9 +6989,10 @@
|
|
6910
6989
|
</xsl:choose>
|
6911
6990
|
</xsl:template>
|
6912
6991
|
|
6913
|
-
<xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
6992
|
+
<xsl:template match="*[local-name()='sourcecode']/text() | *[local-name()='sourcecode']//*[local-name()='span']/text()" priority="2">
|
6914
6993
|
<xsl:choose>
|
6915
|
-
|
6994
|
+
<!-- disabled -->
|
6995
|
+
<xsl:when test="1 = 2 and normalize-space($syntax-highlight) = 'true' and normalize-space(../@lang) != ''"> <!-- condition for turn on of highlighting -->
|
6916
6996
|
<xsl:variable name="syntax" select="java:org.metanorma.fop.Util.syntaxHighlight(., ../@lang)"/>
|
6917
6997
|
<xsl:choose>
|
6918
6998
|
<xsl:when test="normalize-space($syntax) != ''"><!-- if there is highlighted result -->
|
@@ -6927,8 +7007,75 @@
|
|
6927
7007
|
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
6928
7008
|
</xsl:otherwise>
|
6929
7009
|
</xsl:choose>
|
7010
|
+
</xsl:template>
|
7011
|
+
|
7012
|
+
<!-- add sourcecode highlighting -->
|
7013
|
+
<xsl:template match="*[local-name()='sourcecode']//*[local-name()='span'][@class]" priority="2">
|
7014
|
+
<xsl:variable name="class" select="@class"/>
|
7015
|
+
<xsl:choose>
|
7016
|
+
<xsl:when test="$sourcecode_css//class[@name = $class]">
|
7017
|
+
<fo:inline>
|
7018
|
+
<xsl:apply-templates select="$sourcecode_css//class[@name = $class]" mode="css"/>
|
7019
|
+
<xsl:apply-templates/>
|
7020
|
+
</fo:inline>
|
7021
|
+
</xsl:when>
|
7022
|
+
<xsl:otherwise>
|
7023
|
+
<xsl:apply-templates/>
|
7024
|
+
</xsl:otherwise>
|
7025
|
+
</xsl:choose>
|
7026
|
+
</xsl:template>
|
7027
|
+
|
7028
|
+
<!-- outer table with line numbers for sourcecode -->
|
7029
|
+
<xsl:template match="*[local-name()='table'][@type = 'sourcecode']" priority="2">
|
7030
|
+
<fo:block>
|
7031
|
+
<fo:table width="100%" table-layout="fixed">
|
7032
|
+
<xsl:copy-of select="@id"/>
|
7033
|
+
<fo:table-column column-width="8%"/>
|
7034
|
+
<fo:table-column column-width="92%"/>
|
7035
|
+
<fo:table-body>
|
7036
|
+
<xsl:apply-templates/>
|
7037
|
+
</fo:table-body>
|
7038
|
+
</fo:table>
|
7039
|
+
</fo:block>
|
7040
|
+
</xsl:template>
|
7041
|
+
<xsl:template match="*[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody']" priority="2">
|
7042
|
+
<xsl:apply-templates/>
|
7043
|
+
</xsl:template>
|
7044
|
+
<xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']" priority="2">
|
7045
|
+
<fo:table-row>
|
7046
|
+
<xsl:apply-templates/>
|
7047
|
+
</fo:table-row>
|
7048
|
+
</xsl:template>
|
7049
|
+
<!-- first td with line numbers -->
|
7050
|
+
<xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][not(preceding-sibling::*)]" priority="2">
|
7051
|
+
<fo:table-cell>
|
7052
|
+
<fo:block>
|
7053
|
+
|
7054
|
+
<!-- set attibutes for line numbers - same as sourcecode -->
|
7055
|
+
<xsl:variable name="sourcecode_attributes">
|
7056
|
+
<xsl:for-each select="following-sibling::*[local-name() = 'td']/*[local-name() = 'sourcecode']">
|
7057
|
+
<xsl:call-template name="get_sourcecode_attributes"/>
|
7058
|
+
</xsl:for-each>
|
7059
|
+
</xsl:variable>
|
7060
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*[not(starts-with(local-name(), 'margin-') or starts-with(local-name(), 'space-'))]">
|
7061
|
+
<xsl:attribute name="{local-name()}">
|
7062
|
+
<xsl:value-of select="."/>
|
7063
|
+
</xsl:attribute>
|
7064
|
+
</xsl:for-each>
|
6930
7065
|
|
7066
|
+
<xsl:apply-templates/>
|
7067
|
+
</fo:block>
|
7068
|
+
</fo:table-cell>
|
6931
7069
|
</xsl:template>
|
7070
|
+
<!-- second td with sourcecode -->
|
7071
|
+
<xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2">
|
7072
|
+
<fo:table-cell>
|
7073
|
+
<fo:block>
|
7074
|
+
<xsl:apply-templates/>
|
7075
|
+
</fo:block>
|
7076
|
+
</fo:table-cell>
|
7077
|
+
</xsl:template>
|
7078
|
+
<!-- END outer table with line numbers for sourcecode -->
|
6932
7079
|
|
6933
7080
|
<xsl:template name="add_spaces_to_sourcecode">
|
6934
7081
|
<xsl:variable name="text_step1">
|
@@ -8611,160 +8758,53 @@
|
|
8611
8758
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
8612
8759
|
|
8613
8760
|
<xsl:template name="processBibitem">
|
8761
|
+
<xsl:param name="biblio_tag_part">both</xsl:param>
|
8614
8762
|
|
8615
8763
|
<!-- start UNECE bibitem processing -->
|
8616
|
-
<fo:inline padding-right="5mm">
|
8617
|
-
|
8764
|
+
<fo:inline padding-right="5mm">
|
8765
|
+
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
8766
|
+
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
8767
|
+
</xsl:apply-templates>
|
8768
|
+
</fo:inline>
|
8769
|
+
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
8770
|
+
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
8771
|
+
</xsl:apply-templates>
|
8772
|
+
|
8618
8773
|
<xsl:apply-templates select="un:formattedref"/>
|
8619
8774
|
<!-- END UNECE bibitem processing -->
|
8620
8775
|
|
8621
8776
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
8622
8777
|
|
8623
|
-
<xsl:template name="
|
8624
|
-
<xsl:
|
8625
|
-
|
8626
|
-
<xsl:when test="normalize-space($_doc_ident) != ''">
|
8627
|
-
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
8628
|
-
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
8629
|
-
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
8630
|
-
</xsl:if> -->
|
8631
|
-
<xsl:value-of select="$_doc_ident"/>
|
8632
|
-
</xsl:when>
|
8633
|
-
<xsl:otherwise>
|
8634
|
-
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
8635
|
-
<xsl:if test="$type != ''">
|
8636
|
-
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
8637
|
-
</xsl:if> -->
|
8638
|
-
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
|
8639
|
-
</xsl:otherwise>
|
8640
|
-
</xsl:choose>
|
8641
|
-
</xsl:template> <!-- processBibitemDocId -->
|
8778
|
+
<xsl:template match="*[local-name() = 'title']" mode="title">
|
8779
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
8780
|
+
</xsl:template>
|
8642
8781
|
|
8643
|
-
<xsl:template name="
|
8782
|
+
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/>
|
8783
|
+
|
8784
|
+
<xsl:template match="*[local-name() = 'formattedref']">
|
8785
|
+
<!-- <xsl:if test="$namespace = 'unece' or $namespace = 'unece-rec'">
|
8786
|
+
<xsl:text>, </xsl:text>
|
8787
|
+
</xsl:if> -->
|
8788
|
+
<xsl:apply-templates/>
|
8789
|
+
</xsl:template>
|
8790
|
+
|
8791
|
+
<xsl:template match="*[local-name() = 'biblio-tag']">
|
8792
|
+
<xsl:param name="biblio_tag_part">both</xsl:param>
|
8644
8793
|
<xsl:choose>
|
8645
|
-
<xsl:when test="
|
8646
|
-
<
|
8647
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
8648
|
-
</author>
|
8649
|
-
</xsl:when>
|
8650
|
-
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
8651
|
-
<author>
|
8652
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
8653
|
-
<xsl:text> </xsl:text>
|
8654
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
8655
|
-
</author>
|
8794
|
+
<xsl:when test="$biblio_tag_part = 'first' and *[local-name() = 'tab']">
|
8795
|
+
<xsl:apply-templates select="./*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
8656
8796
|
</xsl:when>
|
8657
|
-
<xsl:when test="
|
8658
|
-
<
|
8659
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
8660
|
-
<xsl:text> </xsl:text>
|
8661
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
8662
|
-
</author>
|
8797
|
+
<xsl:when test="$biblio_tag_part = 'last'">
|
8798
|
+
<xsl:apply-templates select="./*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
8663
8799
|
</xsl:when>
|
8664
8800
|
<xsl:otherwise>
|
8665
8801
|
<xsl:apply-templates/>
|
8666
8802
|
</xsl:otherwise>
|
8667
8803
|
</xsl:choose>
|
8668
|
-
</xsl:template> <!-- processPersonalAuthor -->
|
8669
|
-
|
8670
|
-
<xsl:template name="renderDate">
|
8671
|
-
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
8672
|
-
<xsl:value-of select="*[local-name() = 'on']"/>
|
8673
|
-
</xsl:if>
|
8674
|
-
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
8675
|
-
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
8676
|
-
</xsl:if>
|
8677
8804
|
</xsl:template>
|
8678
8805
|
|
8679
|
-
<xsl:template match="*[local-name() = '
|
8680
|
-
<xsl:
|
8681
|
-
</xsl:template>
|
8682
|
-
|
8683
|
-
<xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
8684
|
-
<xsl:value-of select="substring(.,1,1)"/>
|
8685
|
-
</xsl:template>
|
8686
|
-
|
8687
|
-
<xsl:template match="*[local-name() = 'title']" mode="title">
|
8688
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
8689
|
-
</xsl:template>
|
8690
|
-
|
8691
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
|
8692
|
-
<!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
|
8693
|
-
<fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
|
8694
|
-
<xsl:apply-templates/>
|
8695
|
-
</fo:inline>
|
8696
|
-
</xsl:template>
|
8697
|
-
|
8698
|
-
<!-- bibitem/note renders as footnote -->
|
8699
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
|
8700
|
-
|
8701
|
-
<!-- list of footnotes to calculate actual footnotes number -->
|
8702
|
-
<xsl:variable name="p_fn_">
|
8703
|
-
<xsl:call-template name="get_fn_list"/>
|
8704
|
-
</xsl:variable>
|
8705
|
-
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
8706
|
-
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
8707
|
-
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
8708
|
-
<!-- fn sequence number in document -->
|
8709
|
-
<xsl:variable name="current_fn_number">
|
8710
|
-
<xsl:choose>
|
8711
|
-
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
8712
|
-
<xsl:otherwise>
|
8713
|
-
<!-- <xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1" /> -->
|
8714
|
-
<xsl:value-of select="count($p_fn//fn[@gen_id = $gen_id]/preceding-sibling::fn) + 1"/>
|
8715
|
-
</xsl:otherwise>
|
8716
|
-
</xsl:choose>
|
8717
|
-
</xsl:variable>
|
8718
|
-
<fo:footnote>
|
8719
|
-
<xsl:variable name="number">
|
8720
|
-
|
8721
|
-
<xsl:value-of select="$current_fn_number"/>
|
8722
|
-
|
8723
|
-
</xsl:variable>
|
8724
|
-
|
8725
|
-
<xsl:variable name="current_fn_number_text">
|
8726
|
-
<xsl:value-of select="$number"/>
|
8727
|
-
|
8728
|
-
</xsl:variable>
|
8729
|
-
|
8730
|
-
<fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
|
8731
|
-
<fo:basic-link internal-destination="{$gen_id}" fox:alt-text="footnote {$number}">
|
8732
|
-
<xsl:value-of select="$current_fn_number_text"/>
|
8733
|
-
</fo:basic-link>
|
8734
|
-
</fo:inline>
|
8735
|
-
<fo:footnote-body>
|
8736
|
-
<fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
|
8737
|
-
<fo:inline id="{$gen_id}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
|
8738
|
-
<xsl:value-of select="$current_fn_number_text"/>
|
8739
|
-
</fo:inline>
|
8740
|
-
<xsl:apply-templates/>
|
8741
|
-
</fo:block>
|
8742
|
-
</fo:footnote-body>
|
8743
|
-
</fo:footnote>
|
8744
|
-
</xsl:template>
|
8745
|
-
|
8746
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
|
8747
|
-
<xsl:text> edition </xsl:text>
|
8748
|
-
<xsl:value-of select="."/>
|
8749
|
-
</xsl:template>
|
8750
|
-
|
8751
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
|
8752
|
-
<xsl:text> (</xsl:text>
|
8753
|
-
<fo:inline xsl:use-attribute-sets="link-style">
|
8754
|
-
<fo:basic-link external-destination="." fox:alt-text=".">
|
8755
|
-
<xsl:value-of select="."/>
|
8756
|
-
</fo:basic-link>
|
8757
|
-
</fo:inline>
|
8758
|
-
<xsl:text>)</xsl:text>
|
8759
|
-
</xsl:template>
|
8760
|
-
|
8761
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/>
|
8762
|
-
|
8763
|
-
<xsl:template match="*[local-name() = 'formattedref']">
|
8764
|
-
|
8765
|
-
<xsl:text>, </xsl:text>
|
8766
|
-
|
8767
|
-
<xsl:apply-templates/>
|
8806
|
+
<xsl:template match="*[local-name() = 'biblio-tag']/*[local-name() = 'tab']" priority="2">
|
8807
|
+
<xsl:text> </xsl:text>
|
8768
8808
|
</xsl:template>
|
8769
8809
|
|
8770
8810
|
<!-- ======================= -->
|
@@ -9197,6 +9237,12 @@
|
|
9197
9237
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
9198
9238
|
<xsl:apply-templates mode="update_xml_step1"/>
|
9199
9239
|
</xsl:template>
|
9240
|
+
<xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
9241
|
+
<xsl:copy>
|
9242
|
+
<xsl:copy-of select="@*"/>
|
9243
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
9244
|
+
</xsl:copy>
|
9245
|
+
</xsl:template>
|
9200
9246
|
<!-- =========================================================================== -->
|
9201
9247
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
9202
9248
|
<!-- =========================================================================== -->
|
@@ -9677,6 +9723,10 @@
|
|
9677
9723
|
<xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
|
9678
9724
|
</xsl:template>
|
9679
9725
|
|
9726
|
+
<xsl:template name="getDocumentId_fromCurrentNode">
|
9727
|
+
<xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//*[local-name() = 'p'][1]/@id"/>
|
9728
|
+
</xsl:template>
|
9729
|
+
|
9680
9730
|
<xsl:template name="namespaceCheck">
|
9681
9731
|
<xsl:variable name="documentNS" select="namespace-uri(/*)"/>
|
9682
9732
|
<xsl:variable name="XSLNS">
|