metanorma-ieee 1.2.14 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6900c230f21efe3f0d54dfc3c525347afacf77ae42786a72527cb2212e258846
4
- data.tar.gz: 343dfc16bdfbaa33d9914f172cbc09dbfd6fc6dcd44fbc078fd4b1d602cd0fe8
3
+ metadata.gz: 2c6adb65ed8dea242f73b743cae78c43301ea9f41ede9edcc1a898c1bf1a1dba
4
+ data.tar.gz: 460603f84d06832a18d7585ba16c2d1c2b641aec0b0349411c5328a1cdfeaf84
5
5
  SHA512:
6
- metadata.gz: 8baa1c2a0dd41f4c26a91605d7d83045c4d5b4126850d1c9cec92b97f4636546a6d4982d6365bc6340522aaee722183109d32d4132b8651e9554e9d87f407ceb
7
- data.tar.gz: 2a200c8132647f355df3b3725e5adc537462f56afd68e745ed7f9492db11c4a205e12393c548eeb32bdc52f8d6547ba58be99c56bd56a2d7bfcadb39ddf6a43a
6
+ metadata.gz: 320ae7c8543ae7e604b98bd5ef01e0ca8b960994c1bf34976d33ee276cfc69c90a440fe2c0f997c86d705d87d879968d7293a3cdd4cce6e0fbdc941fcf79db0b
7
+ data.tar.gz: 91b7d28f569d0e456f281e6ac01f1b91384c46019325c0776648364002a1c9b26510e69115e0b9a8181ff709d911762260d38fd0d1ebeee423813105bee45609
@@ -18,7 +18,8 @@ doctype_abbrev:
18
18
  standard: Std.
19
19
  recommended-practice: Rec. Prac.
20
20
  guide: Gde.
21
- term_def_boilerplate: "<p>For the purposes of this document, the following terms and definitions apply. The <em>IEEE Standards Dictionary Online</em> should be consulted for terms not defined in this clause.<fn reference='_boilerplate_term1'><p><em>IEEE Standards Dictionary Online</em> is available at: <link target='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.</p></fn></p>"
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.
@@ -9913,6 +9913,12 @@
9913
9913
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
9914
9914
  <attachment filename="{@name}"/>
9915
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>
9916
9922
  </xsl:variable>
9917
9923
  <xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
9918
9924
 
@@ -9925,7 +9931,7 @@
9925
9931
  <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
9926
9932
  </xsl:when>
9927
9933
  <!-- link to the PDF attachment -->
9928
- <xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
9934
+ <xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
9929
9935
  <xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
9930
9936
  </xsl:when>
9931
9937
  <!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
@@ -10576,7 +10582,16 @@
10576
10582
  </xsl:variable>
10577
10583
  <xsl:variable name="img_src">
10578
10584
  <xsl:choose>
10579
- <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
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>
10580
10595
  <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
10581
10596
  </xsl:choose>
10582
10597
  </xsl:variable>
@@ -10589,7 +10604,7 @@
10589
10604
  <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
10590
10605
  <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
10591
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> -->
10592
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
10607
+ <xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
10593
10608
  <xsl:value-of select="$scale"/>
10594
10609
  </xsl:template>
10595
10610
 
@@ -10608,7 +10623,14 @@
10608
10623
  <xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
10609
10624
  </xsl:when>
10610
10625
  <xsl:when test="not(starts-with(@src, 'data:'))">
10611
- <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
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>
10612
10634
  </xsl:when>
10613
10635
  <xsl:otherwise>
10614
10636
  <xsl:value-of select="@src"/>
@@ -10630,7 +10652,14 @@
10630
10652
  </xsl:when>
10631
10653
  <xsl:when test="not(starts-with(@src, 'data:'))">
10632
10654
  <xsl:variable name="src">
10633
- <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
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>
10634
10663
  </xsl:variable>
10635
10664
  <xsl:variable name="file" select="java:java.io.File.new(@src)"/>
10636
10665
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
@@ -15564,26 +15593,37 @@
15564
15593
  </x:xmpmeta>
15565
15594
  <!-- add attachments -->
15566
15595
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
15567
- <xsl:choose>
15568
- <xsl:when test="normalize-space() != ''">
15569
- <xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'(&#13;&#10;|&#13;|&#10;)', '')"/> <!-- remove line breaks -->
15570
- <pdf:embedded-file src="{$src_attachment}" filename="{@name}"/>
15571
- </xsl:when>
15572
- <xsl:otherwise>
15573
- <!-- _{filename}_attachments -->
15574
- <!-- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/> -->
15575
- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
15576
- <pdf:embedded-file src="{$url}" filename="{@name}"/>
15577
- </xsl:otherwise>
15578
- </xsl:choose>
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(.),'(&#13;&#10;|&#13;|&#10;)', '')"/> <!-- 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>
15579
15615
  </xsl:for-each>
15580
15616
  <!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
15581
15617
  <xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
15582
15618
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
15583
15619
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
15584
- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, $attachment_path, ')')"/>
15585
- <xsl:variable name="filename_embedded" select="substring-after($attachment_path, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
15586
- <pdf:embedded-file src="{$url}" filename="{$filename_embedded}"/>
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>
15587
15627
  </xsl:for-each>
15588
15628
  </xsl:if>
15589
15629
  </xsl:template> <!-- addPDFUAmeta -->
@@ -15961,7 +16001,14 @@
15961
16001
  <xsl:value-of select="$src"/>
15962
16002
  </xsl:when>
15963
16003
  <xsl:otherwise>
15964
- <xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
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>
15965
16012
  </xsl:otherwise>
15966
16013
  </xsl:choose>
15967
16014
  </xsl:template>
@@ -9913,6 +9913,12 @@
9913
9913
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
9914
9914
  <attachment filename="{@name}"/>
9915
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>
9916
9922
  </xsl:variable>
9917
9923
  <xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
9918
9924
 
@@ -9925,7 +9931,7 @@
9925
9931
  <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
9926
9932
  </xsl:when>
9927
9933
  <!-- link to the PDF attachment -->
9928
- <xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
9934
+ <xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
9929
9935
  <xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
9930
9936
  </xsl:when>
9931
9937
  <!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
@@ -10576,7 +10582,16 @@
10576
10582
  </xsl:variable>
10577
10583
  <xsl:variable name="img_src">
10578
10584
  <xsl:choose>
10579
- <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
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>
10580
10595
  <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
10581
10596
  </xsl:choose>
10582
10597
  </xsl:variable>
@@ -10589,7 +10604,7 @@
10589
10604
  <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
10590
10605
  <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
10591
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> -->
10592
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
10607
+ <xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
10593
10608
  <xsl:value-of select="$scale"/>
10594
10609
  </xsl:template>
10595
10610
 
@@ -10608,7 +10623,14 @@
10608
10623
  <xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
10609
10624
  </xsl:when>
10610
10625
  <xsl:when test="not(starts-with(@src, 'data:'))">
10611
- <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
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>
10612
10634
  </xsl:when>
10613
10635
  <xsl:otherwise>
10614
10636
  <xsl:value-of select="@src"/>
@@ -10630,7 +10652,14 @@
10630
10652
  </xsl:when>
10631
10653
  <xsl:when test="not(starts-with(@src, 'data:'))">
10632
10654
  <xsl:variable name="src">
10633
- <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
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>
10634
10663
  </xsl:variable>
10635
10664
  <xsl:variable name="file" select="java:java.io.File.new(@src)"/>
10636
10665
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
@@ -15564,26 +15593,37 @@
15564
15593
  </x:xmpmeta>
15565
15594
  <!-- add attachments -->
15566
15595
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
15567
- <xsl:choose>
15568
- <xsl:when test="normalize-space() != ''">
15569
- <xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'(&#13;&#10;|&#13;|&#10;)', '')"/> <!-- remove line breaks -->
15570
- <pdf:embedded-file src="{$src_attachment}" filename="{@name}"/>
15571
- </xsl:when>
15572
- <xsl:otherwise>
15573
- <!-- _{filename}_attachments -->
15574
- <!-- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/> -->
15575
- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
15576
- <pdf:embedded-file src="{$url}" filename="{@name}"/>
15577
- </xsl:otherwise>
15578
- </xsl:choose>
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(.),'(&#13;&#10;|&#13;|&#10;)', '')"/> <!-- 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>
15579
15615
  </xsl:for-each>
15580
15616
  <!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
15581
15617
  <xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
15582
15618
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
15583
15619
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
15584
- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, $attachment_path, ')')"/>
15585
- <xsl:variable name="filename_embedded" select="substring-after($attachment_path, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
15586
- <pdf:embedded-file src="{$url}" filename="{$filename_embedded}"/>
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>
15587
15627
  </xsl:for-each>
15588
15628
  </xsl:if>
15589
15629
  </xsl:template> <!-- addPDFUAmeta -->
@@ -15961,7 +16001,14 @@
15961
16001
  <xsl:value-of select="$src"/>
15962
16002
  </xsl:when>
15963
16003
  <xsl:otherwise>
15964
- <xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
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>
15965
16012
  </xsl:otherwise>
15966
16013
  </xsl:choose>
15967
16014
  </xsl:template>
@@ -42,7 +42,7 @@ module IsoDoc
42
42
 
43
43
  def std_docid_semantic1(id)
44
44
  ids = id.split(/\p{Zs}/)
45
- agency?(ids[0].sub(/\/.*$/, "")) or return id
45
+ agency?(ids[0].sub(%r{^([^/]+)/.*$}, "\\1")) or return id
46
46
  std_docid_semantic_full(id)
47
47
  end
48
48
 
@@ -35,7 +35,7 @@ module IsoDoc
35
35
 
36
36
  def subclause?(target, type, from)
37
37
  (from&.match?(/\./) && type == "clause") ||
38
- target&.gsub(/<[^>]+>/, "")&.match(/^IEV$|^IEC 60050-/)
38
+ target&.gsub(/<[^<>]+>/, "")&.match?(/^IEV$|^IEC 60050-/)
39
39
  end
40
40
 
41
41
  def eref_localities1(opt)
@@ -1000,14 +1000,14 @@
1000
1000
  <define name="PureTextElement">
1001
1001
  <choice>
1002
1002
  <text/>
1003
- <ref name="em"/>
1004
- <ref name="strong"/>
1003
+ <ref name="pure_em"/>
1004
+ <ref name="pure_strong"/>
1005
1005
  <ref name="sub"/>
1006
1006
  <ref name="sup"/>
1007
- <ref name="tt"/>
1008
- <ref name="underline"/>
1009
- <ref name="strike"/>
1010
- <ref name="smallcap"/>
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"/>
@@ -1204,7 +1204,9 @@
1204
1204
  <optional>
1205
1205
  <ref name="formattedref"/>
1206
1206
  </optional>
1207
- <ref name="btitle"/>
1207
+ <oneOrMore>
1208
+ <ref name="btitle"/>
1209
+ </oneOrMore>
1208
1210
  <optional>
1209
1211
  <ref name="bplace"/>
1210
1212
  </optional>
@@ -662,6 +662,9 @@
662
662
  <value>LatexMath</value>
663
663
  </choice>
664
664
  </attribute>
665
+ <optional>
666
+ <attribute name="number-format"/>
667
+ </optional>
665
668
  <attribute name="block">
666
669
  <data type="boolean"/>
667
670
  </attribute>
@@ -66,6 +66,9 @@
66
66
  <ref name="MultilingualRenderingType"/>
67
67
  </attribute>
68
68
  </optional>
69
+ <optional>
70
+ <attribute name="class"/>
71
+ </optional>
69
72
  <optional>
70
73
  <ref name="reqtitle"/>
71
74
  </optional>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module IEEE
3
- VERSION = "1.2.14".freeze
3
+ VERSION = "1.3.0".freeze
4
4
  end
5
5
  end
@@ -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.3"
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.2.14
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-08-19 00:00:00.000000000 Z
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.3
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.3
26
+ version: 2.9.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mnconvert
29
29
  requirement: !ruby/object:Gem::Requirement