metanorma-itu 2.5.1 → 2.5.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 +68 -21
- data/lib/isodoc/itu/itu.in-force.xsl +68 -21
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +68 -21
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +68 -21
- data/lib/isodoc/itu/itu.recommendation.xsl +68 -21
- data/lib/isodoc/itu/itu.resolution.xsl +68 -21
- data/lib/isodoc/itu/itu.service-publication.xsl +68 -21
- data/lib/isodoc/itu/itu.technical-paper.xsl +68 -21
- data/lib/isodoc/itu/itu.technical-report.xsl +68 -21
- data/lib/metanorma/itu/basicdoc.rng +71 -6
- data/lib/metanorma/itu/biblio.rng +3 -1
- data/lib/metanorma/itu/isodoc.rng +3 -0
- data/lib/metanorma/itu/reqt.rng +3 -0
- data/lib/metanorma/itu/version.rb +1 -1
- metadata +2 -2
@@ -8880,6 +8880,12 @@
|
|
8880
8880
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
8881
8881
|
<attachment filename="{@name}"/>
|
8882
8882
|
</xsl:for-each>
|
8883
|
+
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
8884
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
8885
|
+
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
8886
|
+
<attachment filename="{$attachment_path}"/>
|
8887
|
+
</xsl:for-each>
|
8888
|
+
</xsl:if>
|
8883
8889
|
</xsl:variable>
|
8884
8890
|
<xsl:variable name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
8885
8891
|
|
@@ -8892,7 +8898,7 @@
|
|
8892
8898
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
8893
8899
|
</xsl:when>
|
8894
8900
|
<!-- link to the PDF attachment -->
|
8895
|
-
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
8901
|
+
<xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
|
8896
8902
|
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
8897
8903
|
</xsl:when>
|
8898
8904
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
@@ -9547,7 +9553,16 @@
|
|
9547
9553
|
</xsl:variable>
|
9548
9554
|
<xsl:variable name="img_src">
|
9549
9555
|
<xsl:choose>
|
9550
|
-
<xsl:when test="not(starts-with(@src, 'data:'))"
|
9556
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
9557
|
+
<xsl:choose>
|
9558
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
9559
|
+
<xsl:value-of select="@src"/>
|
9560
|
+
</xsl:when>
|
9561
|
+
<xsl:otherwise>
|
9562
|
+
<xsl:value-of select="concat($basepath, @src)"/>
|
9563
|
+
</xsl:otherwise>
|
9564
|
+
</xsl:choose>
|
9565
|
+
</xsl:when>
|
9551
9566
|
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
9552
9567
|
</xsl:choose>
|
9553
9568
|
</xsl:variable>
|
@@ -9560,7 +9575,7 @@
|
|
9560
9575
|
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
9561
9576
|
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
9562
9577
|
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
9563
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.
|
9578
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
9564
9579
|
<xsl:value-of select="$scale"/>
|
9565
9580
|
</xsl:template>
|
9566
9581
|
|
@@ -9579,7 +9594,14 @@
|
|
9579
9594
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
9580
9595
|
</xsl:when>
|
9581
9596
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
9582
|
-
<xsl:
|
9597
|
+
<xsl:choose>
|
9598
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
9599
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
9600
|
+
</xsl:when>
|
9601
|
+
<xsl:otherwise>
|
9602
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
9603
|
+
</xsl:otherwise>
|
9604
|
+
</xsl:choose>
|
9583
9605
|
</xsl:when>
|
9584
9606
|
<xsl:otherwise>
|
9585
9607
|
<xsl:value-of select="@src"/>
|
@@ -9601,7 +9623,14 @@
|
|
9601
9623
|
</xsl:when>
|
9602
9624
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
9603
9625
|
<xsl:variable name="src">
|
9604
|
-
<xsl:
|
9626
|
+
<xsl:choose>
|
9627
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
9628
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
9629
|
+
</xsl:when>
|
9630
|
+
<xsl:otherwise>
|
9631
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
9632
|
+
</xsl:otherwise>
|
9633
|
+
</xsl:choose>
|
9605
9634
|
</xsl:variable>
|
9606
9635
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
9607
9636
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
@@ -14417,26 +14446,37 @@
|
|
14417
14446
|
</x:xmpmeta>
|
14418
14447
|
<!-- add attachments -->
|
14419
14448
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
14420
|
-
<xsl:
|
14421
|
-
|
14422
|
-
|
14423
|
-
|
14424
|
-
|
14425
|
-
|
14426
|
-
|
14427
|
-
|
14428
|
-
|
14429
|
-
|
14430
|
-
|
14431
|
-
|
14449
|
+
<xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
|
14450
|
+
|
14451
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{@name}">
|
14452
|
+
<xsl:attribute name="src">
|
14453
|
+
<xsl:choose>
|
14454
|
+
<xsl:when test="normalize-space() != ''">
|
14455
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
14456
|
+
<xsl:value-of select="$src_attachment"/>
|
14457
|
+
</xsl:when>
|
14458
|
+
<xsl:otherwise>
|
14459
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
14460
|
+
<xsl:value-of select="$url"/>
|
14461
|
+
</xsl:otherwise>
|
14462
|
+
</xsl:choose>
|
14463
|
+
</xsl:attribute>
|
14464
|
+
<xsl:if test="$description != ''">
|
14465
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
14466
|
+
</xsl:if>
|
14467
|
+
</pdf:embedded-file>
|
14432
14468
|
</xsl:for-each>
|
14433
14469
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
14434
14470
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
14435
14471
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
14436
14472
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
14437
|
-
<xsl:variable name="url" select="concat('url(file:///',$
|
14438
|
-
<xsl:variable name="
|
14439
|
-
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$
|
14473
|
+
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
14474
|
+
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
14475
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_path}">
|
14476
|
+
<xsl:if test="$description != ''">
|
14477
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
14478
|
+
</xsl:if>
|
14479
|
+
</pdf:embedded-file>
|
14440
14480
|
</xsl:for-each>
|
14441
14481
|
</xsl:if>
|
14442
14482
|
</xsl:template> <!-- addPDFUAmeta -->
|
@@ -14814,7 +14854,14 @@
|
|
14814
14854
|
<xsl:value-of select="$src"/>
|
14815
14855
|
</xsl:when>
|
14816
14856
|
<xsl:otherwise>
|
14817
|
-
<xsl:
|
14857
|
+
<xsl:choose>
|
14858
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
14859
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
14860
|
+
</xsl:when>
|
14861
|
+
<xsl:otherwise>
|
14862
|
+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
14863
|
+
</xsl:otherwise>
|
14864
|
+
</xsl:choose>
|
14818
14865
|
</xsl:otherwise>
|
14819
14866
|
</xsl:choose>
|
14820
14867
|
</xsl:template>
|
@@ -1000,14 +1000,14 @@
|
|
1000
1000
|
<define name="PureTextElement">
|
1001
1001
|
<choice>
|
1002
1002
|
<text/>
|
1003
|
-
<ref name="
|
1004
|
-
<ref name="
|
1003
|
+
<ref name="pure_em"/>
|
1004
|
+
<ref name="pure_strong"/>
|
1005
1005
|
<ref name="sub"/>
|
1006
1006
|
<ref name="sup"/>
|
1007
|
-
<ref name="
|
1008
|
-
<ref name="
|
1009
|
-
<ref name="
|
1010
|
-
<ref name="
|
1007
|
+
<ref name="pure_tt"/>
|
1008
|
+
<ref name="pure_underline"/>
|
1009
|
+
<ref name="pure_strike"/>
|
1010
|
+
<ref name="pure_smallcap"/>
|
1011
1011
|
<ref name="br"/>
|
1012
1012
|
</choice>
|
1013
1013
|
</define>
|
@@ -1031,6 +1031,13 @@
|
|
1031
1031
|
</zeroOrMore>
|
1032
1032
|
</element>
|
1033
1033
|
</define>
|
1034
|
+
<define name="pure_em">
|
1035
|
+
<element name="em">
|
1036
|
+
<zeroOrMore>
|
1037
|
+
<ref name="PureTextElement"/>
|
1038
|
+
</zeroOrMore>
|
1039
|
+
</element>
|
1040
|
+
</define>
|
1034
1041
|
<define name="strong">
|
1035
1042
|
<element name="strong">
|
1036
1043
|
<zeroOrMore>
|
@@ -1046,6 +1053,13 @@
|
|
1046
1053
|
</zeroOrMore>
|
1047
1054
|
</element>
|
1048
1055
|
</define>
|
1056
|
+
<define name="pure_strong">
|
1057
|
+
<element name="strong">
|
1058
|
+
<zeroOrMore>
|
1059
|
+
<ref name="PureTextElement"/>
|
1060
|
+
</zeroOrMore>
|
1061
|
+
</element>
|
1062
|
+
</define>
|
1049
1063
|
<define name="tt">
|
1050
1064
|
<element name="tt">
|
1051
1065
|
<zeroOrMore>
|
@@ -1060,6 +1074,13 @@
|
|
1060
1074
|
</zeroOrMore>
|
1061
1075
|
</element>
|
1062
1076
|
</define>
|
1077
|
+
<define name="pure_tt">
|
1078
|
+
<element name="tt">
|
1079
|
+
<zeroOrMore>
|
1080
|
+
<ref name="PureTextElement"/>
|
1081
|
+
</zeroOrMore>
|
1082
|
+
</element>
|
1083
|
+
</define>
|
1063
1084
|
<define name="keyword">
|
1064
1085
|
<element name="keyword">
|
1065
1086
|
<zeroOrMore>
|
@@ -1090,13 +1111,42 @@
|
|
1090
1111
|
<zeroOrMore>
|
1091
1112
|
<choice>
|
1092
1113
|
<ref name="PureTextElement"/>
|
1114
|
+
<ref name="stem"/>
|
1115
|
+
<ref name="eref"/>
|
1116
|
+
<ref name="xref"/>
|
1117
|
+
<ref name="hyperlink"/>
|
1093
1118
|
<ref name="index"/>
|
1094
1119
|
<ref name="index-xref"/>
|
1095
1120
|
</choice>
|
1096
1121
|
</zeroOrMore>
|
1097
1122
|
</element>
|
1098
1123
|
</define>
|
1124
|
+
<define name="pure_strike">
|
1125
|
+
<element name="strike">
|
1126
|
+
<zeroOrMore>
|
1127
|
+
<ref name="PureTextElement"/>
|
1128
|
+
</zeroOrMore>
|
1129
|
+
</element>
|
1130
|
+
</define>
|
1099
1131
|
<define name="underline">
|
1132
|
+
<element name="underline">
|
1133
|
+
<optional>
|
1134
|
+
<attribute name="style"/>
|
1135
|
+
</optional>
|
1136
|
+
<zeroOrMore>
|
1137
|
+
<choice>
|
1138
|
+
<ref name="PureTextElement"/>
|
1139
|
+
<ref name="stem"/>
|
1140
|
+
<ref name="eref"/>
|
1141
|
+
<ref name="xref"/>
|
1142
|
+
<ref name="hyperlink"/>
|
1143
|
+
<ref name="index"/>
|
1144
|
+
<ref name="index-xref"/>
|
1145
|
+
</choice>
|
1146
|
+
</zeroOrMore>
|
1147
|
+
</element>
|
1148
|
+
</define>
|
1149
|
+
<define name="pure_underline">
|
1100
1150
|
<element name="underline">
|
1101
1151
|
<optional>
|
1102
1152
|
<attribute name="style"/>
|
@@ -1107,6 +1157,21 @@
|
|
1107
1157
|
</element>
|
1108
1158
|
</define>
|
1109
1159
|
<define name="smallcap">
|
1160
|
+
<element name="smallcap">
|
1161
|
+
<zeroOrMore>
|
1162
|
+
<choice>
|
1163
|
+
<ref name="PureTextElement"/>
|
1164
|
+
<ref name="stem"/>
|
1165
|
+
<ref name="eref"/>
|
1166
|
+
<ref name="xref"/>
|
1167
|
+
<ref name="hyperlink"/>
|
1168
|
+
<ref name="index"/>
|
1169
|
+
<ref name="index-xref"/>
|
1170
|
+
</choice>
|
1171
|
+
</zeroOrMore>
|
1172
|
+
</element>
|
1173
|
+
</define>
|
1174
|
+
<define name="pure_smallcap">
|
1110
1175
|
<element name="smallcap">
|
1111
1176
|
<zeroOrMore>
|
1112
1177
|
<ref name="PureTextElement"/>
|
data/lib/metanorma/itu/reqt.rng
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-itu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|