metanorma-ieee 1.2.13 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ieee/html/htmlstyle.css +40 -0
- data/lib/isodoc/ieee/i18n-en.yaml +2 -1
- data/lib/isodoc/ieee/ieee.amendment.xsl +98 -26
- data/lib/isodoc/ieee/ieee.standard.xsl +98 -26
- data/lib/isodoc/ieee/init.rb +1 -1
- data/lib/isodoc/ieee/presentation_ref.rb +6 -2
- data/lib/isodoc/ieee/presentation_xml_convert.rb +1 -1
- data/lib/isodoc/ieee/word_cleanup.rb +2 -2
- data/lib/metanorma/ieee/basicdoc.rng +71 -6
- data/lib/metanorma/ieee/biblio.rng +3 -1
- data/lib/metanorma/ieee/cleanup_ref.rb +4 -1
- data/lib/metanorma/ieee/isodoc.rng +3 -0
- data/lib/metanorma/ieee/reqt.rng +3 -0
- data/lib/metanorma/ieee/version.rb +1 -1
- data/metanorma-ieee.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c6adb65ed8dea242f73b743cae78c43301ea9f41ede9edcc1a898c1bf1a1dba
|
4
|
+
data.tar.gz: 460603f84d06832a18d7585ba16c2d1c2b641aec0b0349411c5328a1cdfeaf84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 320ae7c8543ae7e604b98bd5ef01e0ca8b960994c1bf34976d33ee276cfc69c90a440fe2c0f997c86d705d87d879968d7293a3cdd4cce6e0fbdc941fcf79db0b
|
7
|
+
data.tar.gz: 91b7d28f569d0e456f281e6ac01f1b91384c46019325c0776648364002a1c9b26510e69115e0b9a8181ff709d911762260d38fd0d1ebeee423813105bee45609
|
@@ -229,6 +229,46 @@ h6:hover > a.anchor,
|
|
229
229
|
.inline-header:hover > a.anchor {
|
230
230
|
visibility: visible; }
|
231
231
|
|
232
|
+
/* collapsible snippets: collapsible before hidable */
|
233
|
+
.hidable {
|
234
|
+
max-height: 0;
|
235
|
+
overflow: hidden;
|
236
|
+
transition: max-height 0.2s ease-out; }
|
237
|
+
|
238
|
+
.collapsible {
|
239
|
+
background-color: #777;
|
240
|
+
color: white;
|
241
|
+
cursor: pointer;
|
242
|
+
padding: 12px 0;
|
243
|
+
margin: 0;
|
244
|
+
width: 100%;
|
245
|
+
border: none;
|
246
|
+
text-align: left;
|
247
|
+
outline: none;
|
248
|
+
font-size: 15px; }
|
249
|
+
|
250
|
+
.active, .collapsible:hover {
|
251
|
+
background-color: #555; }
|
252
|
+
|
253
|
+
.collapsible:after {
|
254
|
+
content: '\25bc';
|
255
|
+
color: white;
|
256
|
+
font-weight: bold;
|
257
|
+
float: right;
|
258
|
+
margin-left: 12px;
|
259
|
+
margin-right: 12px; }
|
260
|
+
|
261
|
+
.active:after {
|
262
|
+
content: "\25b2"; }
|
263
|
+
|
264
|
+
/* collapsible: */
|
265
|
+
.collapsible + .hidable {
|
266
|
+
margin-top: 0; }
|
267
|
+
|
268
|
+
.collapsible:not(.active) + .hidable {
|
269
|
+
overflow: hidden;
|
270
|
+
padding: 0; }
|
271
|
+
|
232
272
|
#standard-band {
|
233
273
|
background-color: #0AC442; }
|
234
274
|
|
@@ -18,7 +18,8 @@ doctype_abbrev:
|
|
18
18
|
standard: Std.
|
19
19
|
recommended-practice: Rec. Prac.
|
20
20
|
guide: Gde.
|
21
|
-
term_def_boilerplate:
|
21
|
+
term_def_boilerplate: |
|
22
|
+
For the purposes of this document, the following terms and definitions apply. The _IEEE Standards Dictionary Online_ should be consulted for terms not defined in this clause.footnote:[_IEEE Standards Dictionary Online_ is available at: http://dictionary.ieee.org[]. An IEEE Account is required for access to the dictionary, and one can be created at no charge on the dictionary sign-in page.]
|
22
23
|
norm_with_refs_pref: The following referenced documents are indispensable for the application of this document (i.e., they must be understood and used, so each referenced document is cited in text and its relationship to this document is explained). For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments or corrigenda) applies.
|
23
24
|
biblio_pref: Bibliographical references are resources that provide additional or helpful material but do not need to be understood or used to implement this standard. Reference to these resources is made for informational use only.
|
24
25
|
note_inform_fn: Notes to text, tables, and figures are for information only and do not contain requirements needed to implement the standard.
|
@@ -5676,13 +5676,35 @@
|
|
5676
5676
|
</xsl:for-each>
|
5677
5677
|
</xsl:element>
|
5678
5678
|
|
5679
|
-
<xsl:call-template name="
|
5679
|
+
<xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
|
5680
5680
|
|
5681
|
-
<xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
|
5681
|
+
<!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
|
5682
5682
|
|
5683
5683
|
<!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
|
5684
5684
|
</xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
|
5685
5685
|
|
5686
|
+
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexAndBibliographyInSeparatePageSequences">
|
5687
|
+
<xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]] | /*/*[local-name()='indexsect']">
|
5688
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
5689
|
+
<xsl:choose>
|
5690
|
+
<xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
|
5691
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5692
|
+
<xsl:attribute name="main_page_sequence"/>
|
5693
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5694
|
+
</xsl:element>
|
5695
|
+
</xsl:when>
|
5696
|
+
<xsl:otherwise> <!-- bibliography -->
|
5697
|
+
<xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
|
5698
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5699
|
+
<xsl:attribute name="main_page_sequence"/>
|
5700
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5701
|
+
</xsl:element>
|
5702
|
+
</xsl:element>
|
5703
|
+
</xsl:otherwise>
|
5704
|
+
</xsl:choose>
|
5705
|
+
</xsl:for-each>
|
5706
|
+
</xsl:template>
|
5707
|
+
|
5686
5708
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexInSeparatePageSequences">
|
5687
5709
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
5688
5710
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -9891,6 +9913,12 @@
|
|
9891
9913
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
9892
9914
|
<attachment filename="{@name}"/>
|
9893
9915
|
</xsl:for-each>
|
9916
|
+
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
9917
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
9918
|
+
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
9919
|
+
<attachment filename="{$attachment_path}"/>
|
9920
|
+
</xsl:for-each>
|
9921
|
+
</xsl:if>
|
9894
9922
|
</xsl:variable>
|
9895
9923
|
<xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
9896
9924
|
|
@@ -9903,7 +9931,7 @@
|
|
9903
9931
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
9904
9932
|
</xsl:when>
|
9905
9933
|
<!-- link to the PDF attachment -->
|
9906
|
-
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
9934
|
+
<xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
|
9907
9935
|
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
9908
9936
|
</xsl:when>
|
9909
9937
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
@@ -10554,7 +10582,16 @@
|
|
10554
10582
|
</xsl:variable>
|
10555
10583
|
<xsl:variable name="img_src">
|
10556
10584
|
<xsl:choose>
|
10557
|
-
<xsl:when test="not(starts-with(@src, 'data:'))"
|
10585
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
10586
|
+
<xsl:choose>
|
10587
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
10588
|
+
<xsl:value-of select="@src"/>
|
10589
|
+
</xsl:when>
|
10590
|
+
<xsl:otherwise>
|
10591
|
+
<xsl:value-of select="concat($basepath, @src)"/>
|
10592
|
+
</xsl:otherwise>
|
10593
|
+
</xsl:choose>
|
10594
|
+
</xsl:when>
|
10558
10595
|
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
10559
10596
|
</xsl:choose>
|
10560
10597
|
</xsl:variable>
|
@@ -10567,7 +10604,7 @@
|
|
10567
10604
|
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
10568
10605
|
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
10569
10606
|
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
10570
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.
|
10607
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
10571
10608
|
<xsl:value-of select="$scale"/>
|
10572
10609
|
</xsl:template>
|
10573
10610
|
|
@@ -10586,7 +10623,14 @@
|
|
10586
10623
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
10587
10624
|
</xsl:when>
|
10588
10625
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
10589
|
-
<xsl:
|
10626
|
+
<xsl:choose>
|
10627
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
10628
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
10629
|
+
</xsl:when>
|
10630
|
+
<xsl:otherwise>
|
10631
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
10632
|
+
</xsl:otherwise>
|
10633
|
+
</xsl:choose>
|
10590
10634
|
</xsl:when>
|
10591
10635
|
<xsl:otherwise>
|
10592
10636
|
<xsl:value-of select="@src"/>
|
@@ -10608,7 +10652,14 @@
|
|
10608
10652
|
</xsl:when>
|
10609
10653
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
10610
10654
|
<xsl:variable name="src">
|
10611
|
-
<xsl:
|
10655
|
+
<xsl:choose>
|
10656
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
10657
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
10658
|
+
</xsl:when>
|
10659
|
+
<xsl:otherwise>
|
10660
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
10661
|
+
</xsl:otherwise>
|
10662
|
+
</xsl:choose>
|
10612
10663
|
</xsl:variable>
|
10613
10664
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
10614
10665
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
@@ -14562,10 +14613,12 @@
|
|
14562
14613
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
14563
14614
|
<xsl:copy>
|
14564
14615
|
<xsl:copy-of select="@*"/>
|
14565
|
-
<xsl:
|
14566
|
-
|
14567
|
-
|
14568
|
-
<xsl:
|
14616
|
+
<xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
|
14617
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
14618
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
14619
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
14620
|
+
<xsl:value-of select="normalize-space(.)"/>
|
14621
|
+
</xsl:if>
|
14569
14622
|
</xsl:if>
|
14570
14623
|
</xsl:copy>
|
14571
14624
|
</xsl:template>
|
@@ -15540,25 +15593,37 @@
|
|
15540
15593
|
</x:xmpmeta>
|
15541
15594
|
<!-- add attachments -->
|
15542
15595
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
15543
|
-
<xsl:
|
15544
|
-
|
15545
|
-
|
15546
|
-
|
15547
|
-
|
15548
|
-
|
15549
|
-
|
15550
|
-
|
15551
|
-
|
15552
|
-
|
15553
|
-
|
15596
|
+
<xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
|
15597
|
+
|
15598
|
+
<pdf:embedded-file filename="{@name}">
|
15599
|
+
<xsl:attribute name="src">
|
15600
|
+
<xsl:choose>
|
15601
|
+
<xsl:when test="normalize-space() != ''">
|
15602
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
15603
|
+
<xsl:value-of select="$src_attachment"/>
|
15604
|
+
</xsl:when>
|
15605
|
+
<xsl:otherwise>
|
15606
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
15607
|
+
<xsl:value-of select="$url"/>
|
15608
|
+
</xsl:otherwise>
|
15609
|
+
</xsl:choose>
|
15610
|
+
</xsl:attribute>
|
15611
|
+
<xsl:if test="$description != ''">
|
15612
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
15613
|
+
</xsl:if>
|
15614
|
+
</pdf:embedded-file>
|
15554
15615
|
</xsl:for-each>
|
15555
15616
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
15556
15617
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
15557
15618
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
15558
15619
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
15559
|
-
<xsl:variable name="url" select="concat('url(file:///',$
|
15560
|
-
<xsl:variable name="
|
15561
|
-
<pdf:embedded-file src="{$url}" filename="{$
|
15620
|
+
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
15621
|
+
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
15622
|
+
<pdf:embedded-file src="{$url}" filename="{$attachment_path}">
|
15623
|
+
<xsl:if test="$description != ''">
|
15624
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
15625
|
+
</xsl:if>
|
15626
|
+
</pdf:embedded-file>
|
15562
15627
|
</xsl:for-each>
|
15563
15628
|
</xsl:if>
|
15564
15629
|
</xsl:template> <!-- addPDFUAmeta -->
|
@@ -15936,7 +16001,14 @@
|
|
15936
16001
|
<xsl:value-of select="$src"/>
|
15937
16002
|
</xsl:when>
|
15938
16003
|
<xsl:otherwise>
|
15939
|
-
<xsl:
|
16004
|
+
<xsl:choose>
|
16005
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
16006
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
16007
|
+
</xsl:when>
|
16008
|
+
<xsl:otherwise>
|
16009
|
+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
16010
|
+
</xsl:otherwise>
|
16011
|
+
</xsl:choose>
|
15940
16012
|
</xsl:otherwise>
|
15941
16013
|
</xsl:choose>
|
15942
16014
|
</xsl:template>
|
@@ -5676,13 +5676,35 @@
|
|
5676
5676
|
</xsl:for-each>
|
5677
5677
|
</xsl:element>
|
5678
5678
|
|
5679
|
-
<xsl:call-template name="
|
5679
|
+
<xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
|
5680
5680
|
|
5681
|
-
<xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
|
5681
|
+
<!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
|
5682
5682
|
|
5683
5683
|
<!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
|
5684
5684
|
</xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
|
5685
5685
|
|
5686
|
+
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexAndBibliographyInSeparatePageSequences">
|
5687
|
+
<xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]] | /*/*[local-name()='indexsect']">
|
5688
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
5689
|
+
<xsl:choose>
|
5690
|
+
<xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
|
5691
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5692
|
+
<xsl:attribute name="main_page_sequence"/>
|
5693
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5694
|
+
</xsl:element>
|
5695
|
+
</xsl:when>
|
5696
|
+
<xsl:otherwise> <!-- bibliography -->
|
5697
|
+
<xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
|
5698
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5699
|
+
<xsl:attribute name="main_page_sequence"/>
|
5700
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5701
|
+
</xsl:element>
|
5702
|
+
</xsl:element>
|
5703
|
+
</xsl:otherwise>
|
5704
|
+
</xsl:choose>
|
5705
|
+
</xsl:for-each>
|
5706
|
+
</xsl:template>
|
5707
|
+
|
5686
5708
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexInSeparatePageSequences">
|
5687
5709
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
5688
5710
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -9891,6 +9913,12 @@
|
|
9891
9913
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
9892
9914
|
<attachment filename="{@name}"/>
|
9893
9915
|
</xsl:for-each>
|
9916
|
+
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
9917
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
9918
|
+
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
9919
|
+
<attachment filename="{$attachment_path}"/>
|
9920
|
+
</xsl:for-each>
|
9921
|
+
</xsl:if>
|
9894
9922
|
</xsl:variable>
|
9895
9923
|
<xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
9896
9924
|
|
@@ -9903,7 +9931,7 @@
|
|
9903
9931
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
9904
9932
|
</xsl:when>
|
9905
9933
|
<!-- link to the PDF attachment -->
|
9906
|
-
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
9934
|
+
<xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
|
9907
9935
|
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
9908
9936
|
</xsl:when>
|
9909
9937
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
@@ -10554,7 +10582,16 @@
|
|
10554
10582
|
</xsl:variable>
|
10555
10583
|
<xsl:variable name="img_src">
|
10556
10584
|
<xsl:choose>
|
10557
|
-
<xsl:when test="not(starts-with(@src, 'data:'))"
|
10585
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
10586
|
+
<xsl:choose>
|
10587
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
10588
|
+
<xsl:value-of select="@src"/>
|
10589
|
+
</xsl:when>
|
10590
|
+
<xsl:otherwise>
|
10591
|
+
<xsl:value-of select="concat($basepath, @src)"/>
|
10592
|
+
</xsl:otherwise>
|
10593
|
+
</xsl:choose>
|
10594
|
+
</xsl:when>
|
10558
10595
|
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
10559
10596
|
</xsl:choose>
|
10560
10597
|
</xsl:variable>
|
@@ -10567,7 +10604,7 @@
|
|
10567
10604
|
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
10568
10605
|
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
10569
10606
|
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
10570
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.
|
10607
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
10571
10608
|
<xsl:value-of select="$scale"/>
|
10572
10609
|
</xsl:template>
|
10573
10610
|
|
@@ -10586,7 +10623,14 @@
|
|
10586
10623
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
10587
10624
|
</xsl:when>
|
10588
10625
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
10589
|
-
<xsl:
|
10626
|
+
<xsl:choose>
|
10627
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
10628
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
10629
|
+
</xsl:when>
|
10630
|
+
<xsl:otherwise>
|
10631
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
10632
|
+
</xsl:otherwise>
|
10633
|
+
</xsl:choose>
|
10590
10634
|
</xsl:when>
|
10591
10635
|
<xsl:otherwise>
|
10592
10636
|
<xsl:value-of select="@src"/>
|
@@ -10608,7 +10652,14 @@
|
|
10608
10652
|
</xsl:when>
|
10609
10653
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
10610
10654
|
<xsl:variable name="src">
|
10611
|
-
<xsl:
|
10655
|
+
<xsl:choose>
|
10656
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
10657
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
10658
|
+
</xsl:when>
|
10659
|
+
<xsl:otherwise>
|
10660
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
10661
|
+
</xsl:otherwise>
|
10662
|
+
</xsl:choose>
|
10612
10663
|
</xsl:variable>
|
10613
10664
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
10614
10665
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
@@ -14562,10 +14613,12 @@
|
|
14562
14613
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
14563
14614
|
<xsl:copy>
|
14564
14615
|
<xsl:copy-of select="@*"/>
|
14565
|
-
<xsl:
|
14566
|
-
|
14567
|
-
|
14568
|
-
<xsl:
|
14616
|
+
<xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
|
14617
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
14618
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
14619
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
14620
|
+
<xsl:value-of select="normalize-space(.)"/>
|
14621
|
+
</xsl:if>
|
14569
14622
|
</xsl:if>
|
14570
14623
|
</xsl:copy>
|
14571
14624
|
</xsl:template>
|
@@ -15540,25 +15593,37 @@
|
|
15540
15593
|
</x:xmpmeta>
|
15541
15594
|
<!-- add attachments -->
|
15542
15595
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
15543
|
-
<xsl:
|
15544
|
-
|
15545
|
-
|
15546
|
-
|
15547
|
-
|
15548
|
-
|
15549
|
-
|
15550
|
-
|
15551
|
-
|
15552
|
-
|
15553
|
-
|
15596
|
+
<xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
|
15597
|
+
|
15598
|
+
<pdf:embedded-file filename="{@name}">
|
15599
|
+
<xsl:attribute name="src">
|
15600
|
+
<xsl:choose>
|
15601
|
+
<xsl:when test="normalize-space() != ''">
|
15602
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
15603
|
+
<xsl:value-of select="$src_attachment"/>
|
15604
|
+
</xsl:when>
|
15605
|
+
<xsl:otherwise>
|
15606
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
15607
|
+
<xsl:value-of select="$url"/>
|
15608
|
+
</xsl:otherwise>
|
15609
|
+
</xsl:choose>
|
15610
|
+
</xsl:attribute>
|
15611
|
+
<xsl:if test="$description != ''">
|
15612
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
15613
|
+
</xsl:if>
|
15614
|
+
</pdf:embedded-file>
|
15554
15615
|
</xsl:for-each>
|
15555
15616
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
15556
15617
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
15557
15618
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
15558
15619
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
15559
|
-
<xsl:variable name="url" select="concat('url(file:///',$
|
15560
|
-
<xsl:variable name="
|
15561
|
-
<pdf:embedded-file src="{$url}" filename="{$
|
15620
|
+
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
15621
|
+
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
15622
|
+
<pdf:embedded-file src="{$url}" filename="{$attachment_path}">
|
15623
|
+
<xsl:if test="$description != ''">
|
15624
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
15625
|
+
</xsl:if>
|
15626
|
+
</pdf:embedded-file>
|
15562
15627
|
</xsl:for-each>
|
15563
15628
|
</xsl:if>
|
15564
15629
|
</xsl:template> <!-- addPDFUAmeta -->
|
@@ -15936,7 +16001,14 @@
|
|
15936
16001
|
<xsl:value-of select="$src"/>
|
15937
16002
|
</xsl:when>
|
15938
16003
|
<xsl:otherwise>
|
15939
|
-
<xsl:
|
16004
|
+
<xsl:choose>
|
16005
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
16006
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
16007
|
+
</xsl:when>
|
16008
|
+
<xsl:otherwise>
|
16009
|
+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
16010
|
+
</xsl:otherwise>
|
16011
|
+
</xsl:choose>
|
15940
16012
|
</xsl:otherwise>
|
15941
16013
|
</xsl:choose>
|
15942
16014
|
</xsl:template>
|
data/lib/isodoc/ieee/init.rb
CHANGED
@@ -78,8 +78,12 @@ module IsoDoc
|
|
78
78
|
def creatornames(bibitem)
|
79
79
|
::Relaton::Render::IEEE::General
|
80
80
|
.new(language: @lang, i18nhash: @i18n.get,
|
81
|
-
template: { (bibitem["type"] || "misc").to_sym =>
|
82
|
-
"{{ creatornames }}" }
|
81
|
+
#template: { (bibitem["type"] || "misc").to_sym =>
|
82
|
+
#"{{ creatornames }}" },
|
83
|
+
template: "{{ creatornames }}" ,
|
84
|
+
extenttemplate: { (bibitem["type"] || "misc").to_sym => "{{page}}"} ,
|
85
|
+
sizetemplate: { (bibitem["type"] || "misc").to_sym => "{{data}}"} ,
|
86
|
+
)
|
83
87
|
.render1(RelatonBib::XMLParser.from_xml(bibitem.to_xml))
|
84
88
|
end
|
85
89
|
|
@@ -35,7 +35,7 @@ module IsoDoc
|
|
35
35
|
|
36
36
|
def subclause?(target, type, from)
|
37
37
|
(from&.match?(/\./) && type == "clause") ||
|
38
|
-
target&.gsub(/<[
|
38
|
+
target&.gsub(/<[^<>]+>/, "")&.match?(/^IEV$|^IEC 60050-/)
|
39
39
|
end
|
40
40
|
|
41
41
|
def eref_localities1(opt)
|
@@ -137,11 +137,11 @@ module IsoDoc
|
|
137
137
|
end
|
138
138
|
|
139
139
|
def table_toc_class
|
140
|
-
[
|
140
|
+
["IEEEStds Regular Table Caption", "TableTitle", "tabletitle"]
|
141
141
|
end
|
142
142
|
|
143
143
|
def figure_toc_class
|
144
|
-
[
|
144
|
+
["IEEEStds Regular Figure Caption", "FigureTitle", "figuretitle"]
|
145
145
|
end
|
146
146
|
|
147
147
|
def style_cleanup(docxml)
|
@@ -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"/>
|
@@ -23,7 +23,10 @@ module Metanorma
|
|
23
23
|
@i = IsoDoc::IEEE::PresentationXMLConvert
|
24
24
|
.new({ lang: @lang, script: @script, locale: @locale })
|
25
25
|
@i.i18n_init(@lang, @script, @locale)
|
26
|
-
bib.
|
26
|
+
sort_keys = bib.each_with_object({}) do |b, m|
|
27
|
+
m[b["id"]] = sort_biblio_key(b)
|
28
|
+
end
|
29
|
+
bib.sort { |a, b| sort_keys[a["id"]] <=> sort_keys[b["id"]] }
|
27
30
|
end
|
28
31
|
|
29
32
|
# Alphabetic by rendering: author surname or designation, followed by title
|
data/lib/metanorma/ieee/reqt.rng
CHANGED
data/metanorma-ieee.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.require_paths = ["lib"]
|
26
26
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
27
27
|
|
28
|
-
spec.add_dependency "metanorma-standoc", "~> 2.9.
|
28
|
+
spec.add_dependency "metanorma-standoc", "~> 2.9.6"
|
29
29
|
spec.add_dependency "mnconvert", "~> 1.20"
|
30
30
|
spec.add_dependency "pubid"
|
31
31
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ieee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
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
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.9.
|
19
|
+
version: 2.9.6
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.9.
|
26
|
+
version: 2.9.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mnconvert
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|