metanorma-iec 1.3.2 → 1.3.3
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/asciidoctor/iec/biblio.rng +1 -0
- data/lib/asciidoctor/iec/isodoc.rng +1 -3
- data/lib/isodoc/iec/iec.international-standard.xsl +83 -20
- data/lib/metanorma/iec/version.rb +1 -1
- data/spec/asciidoctor/base_spec.rb +723 -696
- data/spec/asciidoctor/blocks_spec.rb +214 -154
- 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: 4a24900a199a0791b4bb2358674e8b34b109c9d8953b656f0d6662c9f8fd0466
|
4
|
+
data.tar.gz: b5db833a6cc328ff262ae38411438ca4549d36dacd74bb7ec14695183b41afec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c7741d485f92f29adc57dfac10b8d842db1fab885f5f220fdcd216644ee78831ea9feee2fa3d028f612e78e44c1bccf074aaeed96fcf237462e4ef0c7621364
|
7
|
+
data.tar.gz: 94b6790578314e2bf8fc68c77241a14b4ac68f8bbffa69706593f6345b82ccc9766ac6b80f7931c97c7ed3c5003bd309644863706eef6308ac8cdfe08b8e8852
|
@@ -2611,6 +2611,9 @@
|
|
2611
2611
|
<title-continued lang="en">(continued)</title-continued>
|
2612
2612
|
<title-continued lang="fr">(continué)</title-continued>
|
2613
2613
|
|
2614
|
+
</xsl:variable><xsl:variable name="bibdata">
|
2615
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
2616
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
2614
2617
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
2615
2618
|
<xsl:param name="name"/>
|
2616
2619
|
<xsl:param name="lang"/>
|
@@ -2641,6 +2644,7 @@
|
|
2641
2644
|
|
2642
2645
|
|
2643
2646
|
|
2647
|
+
|
2644
2648
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
2645
2649
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
2646
2650
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -2751,6 +2755,7 @@
|
|
2751
2755
|
|
2752
2756
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
2753
2757
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2758
|
+
|
2754
2759
|
|
2755
2760
|
|
2756
2761
|
|
@@ -2787,6 +2792,7 @@
|
|
2787
2792
|
|
2788
2793
|
|
2789
2794
|
|
2795
|
+
|
2790
2796
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
2791
2797
|
|
2792
2798
|
|
@@ -2797,6 +2803,7 @@
|
|
2797
2803
|
|
2798
2804
|
|
2799
2805
|
|
2806
|
+
|
2800
2807
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
2801
2808
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
2802
2809
|
<xsl:attribute name="margin-bottom">9pt</xsl:attribute>
|
@@ -2816,6 +2823,7 @@
|
|
2816
2823
|
|
2817
2824
|
|
2818
2825
|
|
2826
|
+
|
2819
2827
|
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
2820
2828
|
|
2821
2829
|
|
@@ -2845,6 +2853,7 @@
|
|
2845
2853
|
</xsl:attribute-set><xsl:attribute-set name="termnote-style">
|
2846
2854
|
|
2847
2855
|
|
2856
|
+
|
2848
2857
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
2849
2858
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
2850
2859
|
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
@@ -2853,6 +2862,7 @@
|
|
2853
2862
|
|
2854
2863
|
|
2855
2864
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2865
|
+
|
2856
2866
|
|
2857
2867
|
|
2858
2868
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
@@ -2880,6 +2890,7 @@
|
|
2880
2890
|
</xsl:attribute-set><xsl:attribute-set name="termsource-style">
|
2881
2891
|
|
2882
2892
|
|
2893
|
+
|
2883
2894
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
2884
2895
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
2885
2896
|
|
@@ -2894,6 +2905,7 @@
|
|
2894
2905
|
|
2895
2906
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
2896
2907
|
|
2908
|
+
|
2897
2909
|
|
2898
2910
|
|
2899
2911
|
|
@@ -2926,12 +2938,14 @@
|
|
2926
2938
|
|
2927
2939
|
|
2928
2940
|
|
2941
|
+
|
2929
2942
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
2930
2943
|
|
2931
2944
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
2932
2945
|
|
2933
2946
|
|
2934
2947
|
|
2948
|
+
|
2935
2949
|
<xsl:attribute name="width">75%</xsl:attribute>
|
2936
2950
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
2937
2951
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -2967,6 +2981,7 @@
|
|
2967
2981
|
|
2968
2982
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2969
2983
|
|
2984
|
+
|
2970
2985
|
</xsl:attribute-set><xsl:variable name="color-added-text">
|
2971
2986
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
2972
2987
|
</xsl:variable><xsl:attribute-set name="add-style">
|
@@ -3106,6 +3121,7 @@
|
|
3106
3121
|
|
3107
3122
|
|
3108
3123
|
|
3124
|
+
|
3109
3125
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
3110
3126
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
3111
3127
|
<xsl:if test="ancestor::*[local-name() = 'preface']">
|
@@ -3123,6 +3139,8 @@
|
|
3123
3139
|
|
3124
3140
|
|
3125
3141
|
|
3142
|
+
|
3143
|
+
|
3126
3144
|
<xsl:variable name="table_width">
|
3127
3145
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
3128
3146
|
100%
|
@@ -3138,6 +3156,7 @@
|
|
3138
3156
|
|
3139
3157
|
|
3140
3158
|
|
3159
|
+
|
3141
3160
|
<attribute name="border">0.5pt solid black</attribute>
|
3142
3161
|
|
3143
3162
|
|
@@ -3284,11 +3303,22 @@
|
|
3284
3303
|
</xsl:choose>
|
3285
3304
|
|
3286
3305
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
3306
|
+
<xsl:param name="continued"/>
|
3287
3307
|
<xsl:if test="normalize-space() != ''">
|
3288
3308
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
3289
3309
|
|
3290
3310
|
|
3291
|
-
<xsl:
|
3311
|
+
<xsl:choose>
|
3312
|
+
<xsl:when test="$continued = 'true'">
|
3313
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
3314
|
+
|
3315
|
+
</xsl:when>
|
3316
|
+
<xsl:otherwise>
|
3317
|
+
<xsl:apply-templates/>
|
3318
|
+
</xsl:otherwise>
|
3319
|
+
</xsl:choose>
|
3320
|
+
|
3321
|
+
|
3292
3322
|
</fo:block>
|
3293
3323
|
</xsl:if>
|
3294
3324
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -3428,18 +3458,18 @@
|
|
3428
3458
|
<xsl:apply-templates/>
|
3429
3459
|
</fo:table-header>
|
3430
3460
|
</xsl:template><xsl:template name="table-header-title">
|
3431
|
-
<xsl:param name="cols-count"/>
|
3461
|
+
<xsl:param name="cols-count"/>
|
3432
3462
|
<!-- row for title -->
|
3433
3463
|
<fo:table-row>
|
3434
3464
|
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
3435
|
-
|
3465
|
+
|
3466
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
3467
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
3468
|
+
</xsl:apply-templates>
|
3436
3469
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
3437
3470
|
<xsl:call-template name="fn_name_display"/>
|
3438
|
-
</xsl:for-each>
|
3439
|
-
|
3440
|
-
<xsl:text> </xsl:text>
|
3441
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
3442
|
-
</fo:block>
|
3471
|
+
</xsl:for-each>
|
3472
|
+
|
3443
3473
|
</fo:table-cell>
|
3444
3474
|
</fo:table-row>
|
3445
3475
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -3683,6 +3713,7 @@
|
|
3683
3713
|
|
3684
3714
|
|
3685
3715
|
|
3716
|
+
|
3686
3717
|
<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
|
3687
3718
|
<xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
|
3688
3719
|
|
@@ -3717,6 +3748,7 @@
|
|
3717
3748
|
</xsl:choose>
|
3718
3749
|
</xsl:attribute>
|
3719
3750
|
|
3751
|
+
|
3720
3752
|
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
3721
3753
|
|
3722
3754
|
|
@@ -4457,6 +4489,7 @@
|
|
4457
4489
|
|
4458
4490
|
|
4459
4491
|
|
4492
|
+
|
4460
4493
|
|
4461
4494
|
</xsl:variable>
|
4462
4495
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -4838,11 +4871,15 @@
|
|
4838
4871
|
</xsl:apply-templates>
|
4839
4872
|
</xsl:template><xsl:template name="getLang">
|
4840
4873
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4874
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4841
4875
|
<xsl:variable name="language">
|
4842
4876
|
<xsl:choose>
|
4843
4877
|
<xsl:when test="$language_current != ''">
|
4844
4878
|
<xsl:value-of select="$language_current"/>
|
4845
4879
|
</xsl:when>
|
4880
|
+
<xsl:when test="$language_current_2 != ''">
|
4881
|
+
<xsl:value-of select="$language_current_2"/>
|
4882
|
+
</xsl:when>
|
4846
4883
|
<xsl:otherwise>
|
4847
4884
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
4848
4885
|
</xsl:otherwise>
|
@@ -5059,6 +5096,7 @@
|
|
5059
5096
|
|
5060
5097
|
|
5061
5098
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
5099
|
+
|
5062
5100
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
5063
5101
|
</fo:inline>
|
5064
5102
|
<xsl:apply-templates/>
|
@@ -5085,6 +5123,7 @@
|
|
5085
5123
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
5086
5124
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
5087
5125
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
5126
|
+
|
5088
5127
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
5089
5128
|
</fo:inline>
|
5090
5129
|
<xsl:apply-templates/>
|
@@ -5164,7 +5203,10 @@
|
|
5164
5203
|
<xsl:for-each select="*[local-name() = 'note']">
|
5165
5204
|
<xsl:call-template name="note"/>
|
5166
5205
|
</xsl:for-each>
|
5167
|
-
|
5206
|
+
|
5207
|
+
|
5208
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
5209
|
+
|
5168
5210
|
</fo:block-container>
|
5169
5211
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
5170
5212
|
<fo:block id="{@id}">
|
@@ -5283,15 +5325,15 @@
|
|
5283
5325
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
5284
5326
|
<xsl:apply-templates mode="bookmarks"/>
|
5285
5327
|
<xsl:text> </xsl:text>
|
5286
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
5328
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
5287
5329
|
<xsl:value-of select="."/>
|
5288
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
5330
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
5289
5331
|
<xsl:value-of select="."/>
|
5290
5332
|
</xsl:template><xsl:template match="node()" mode="contents">
|
5291
5333
|
<xsl:apply-templates mode="contents"/>
|
5292
5334
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
5293
5335
|
<xsl:apply-templates mode="bookmarks"/>
|
5294
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
5336
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
5295
5337
|
<xsl:apply-templates select="."/>
|
5296
5338
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
5297
5339
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -5490,6 +5532,8 @@
|
|
5490
5532
|
</fo:list-item-body>
|
5491
5533
|
</fo:list-item>
|
5492
5534
|
</fo:list-block>
|
5535
|
+
</xsl:template><xsl:template name="extractSection">
|
5536
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
5493
5537
|
</xsl:template><xsl:template name="extractTitle">
|
5494
5538
|
<xsl:choose>
|
5495
5539
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -5537,6 +5581,7 @@
|
|
5537
5581
|
|
5538
5582
|
|
5539
5583
|
|
5584
|
+
|
5540
5585
|
|
5541
5586
|
|
5542
5587
|
|
@@ -5859,7 +5904,7 @@
|
|
5859
5904
|
</fo:inline>
|
5860
5905
|
</xsl:otherwise>
|
5861
5906
|
</xsl:choose>
|
5862
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
5907
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
5863
5908
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
5864
5909
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
5865
5910
|
<xsl:variable name="termsource_text">
|
@@ -5868,13 +5913,15 @@
|
|
5868
5913
|
|
5869
5914
|
<xsl:choose>
|
5870
5915
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
5871
|
-
<xsl:apply-templates/>
|
5916
|
+
<!-- <xsl:apply-templates /> -->
|
5917
|
+
<xsl:copy-of select="$termsource_text"/>
|
5872
5918
|
</xsl:when>
|
5873
5919
|
<xsl:otherwise>
|
5874
5920
|
|
5875
5921
|
<xsl:text>[</xsl:text>
|
5876
5922
|
|
5877
|
-
<xsl:apply-templates/>
|
5923
|
+
<!-- <xsl:apply-templates /> -->
|
5924
|
+
<xsl:copy-of select="$termsource_text"/>
|
5878
5925
|
|
5879
5926
|
<xsl:text>]</xsl:text>
|
5880
5927
|
|
@@ -5885,14 +5932,20 @@
|
|
5885
5932
|
<xsl:if test="normalize-space() != ''">
|
5886
5933
|
<xsl:value-of select="."/>
|
5887
5934
|
</xsl:if>
|
5888
|
-
</xsl:template><xsl:
|
5935
|
+
</xsl:template><xsl:variable name="localized.source">
|
5936
|
+
<xsl:call-template name="getLocalizedString">
|
5937
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
5938
|
+
</xsl:call-template>
|
5939
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
5889
5940
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5941
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
5942
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
5943
|
+
</xsl:if>
|
5890
5944
|
|
5891
5945
|
<fo:inline>
|
5892
5946
|
|
5893
5947
|
|
5894
5948
|
|
5895
|
-
|
5896
5949
|
<xsl:call-template name="getTitle">
|
5897
5950
|
<xsl:with-param name="name" select="'title-source'"/>
|
5898
5951
|
</xsl:call-template>
|
@@ -6103,7 +6156,6 @@
|
|
6103
6156
|
|
6104
6157
|
|
6105
6158
|
|
6106
|
-
|
6107
6159
|
<xsl:apply-templates/>
|
6108
6160
|
</fo:block>
|
6109
6161
|
|
@@ -6146,7 +6198,7 @@
|
|
6146
6198
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
6147
6199
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
6148
6200
|
<xsl:choose>
|
6149
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
6201
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
6150
6202
|
<fo:block-container>
|
6151
6203
|
<xsl:attribute name="margin-left">
|
6152
6204
|
<xsl:choose>
|
@@ -6156,6 +6208,7 @@
|
|
6156
6208
|
</xsl:attribute>
|
6157
6209
|
|
6158
6210
|
|
6211
|
+
|
6159
6212
|
<fo:block-container margin-left="0mm">
|
6160
6213
|
<fo:block>
|
6161
6214
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -6357,6 +6410,10 @@
|
|
6357
6410
|
|
6358
6411
|
|
6359
6412
|
|
6413
|
+
|
6414
|
+
|
6415
|
+
|
6416
|
+
|
6360
6417
|
</xsl:template><xsl:template name="processBibitemDocId">
|
6361
6418
|
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
6362
6419
|
<xsl:choose>
|
@@ -6740,6 +6797,7 @@
|
|
6740
6797
|
<xsl:variable name="XSLNS">
|
6741
6798
|
|
6742
6799
|
|
6800
|
+
|
6743
6801
|
<xsl:value-of select="document('')//*/namespace::iec"/>
|
6744
6802
|
|
6745
6803
|
|
@@ -6808,13 +6866,18 @@
|
|
6808
6866
|
</xsl:call-template>
|
6809
6867
|
</xsl:if>
|
6810
6868
|
</xsl:template><xsl:template name="getLocalizedString">
|
6811
|
-
<xsl:param name="key"/>
|
6869
|
+
<xsl:param name="key"/>
|
6812
6870
|
|
6813
6871
|
<xsl:variable name="curr_lang">
|
6814
6872
|
<xsl:call-template name="getLang"/>
|
6815
6873
|
</xsl:variable>
|
6816
6874
|
|
6875
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
6876
|
+
|
6817
6877
|
<xsl:choose>
|
6878
|
+
<xsl:when test="$data_value != ''">
|
6879
|
+
<xsl:value-of select="$data_value"/>
|
6880
|
+
</xsl:when>
|
6818
6881
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
6819
6882
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
6820
6883
|
</xsl:when>
|
@@ -1,6 +1,8 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
require "fileutils"
|
3
3
|
|
4
|
+
OPTIONS = [backend: :iec, header_footer: true].freeze
|
5
|
+
|
4
6
|
RSpec.describe Asciidoctor::Iec do
|
5
7
|
before(:all) do
|
6
8
|
@blank_hdr = blank_hdr_gen
|
@@ -10,42 +12,37 @@ RSpec.describe Asciidoctor::Iec do
|
|
10
12
|
expect(Metanorma::Iec::VERSION).not_to be nil
|
11
13
|
end
|
12
14
|
|
13
|
-
# it "generates output for the Rice document" do
|
14
|
-
# FileUtils.rm_f %w(spec/examples/rice.xml spec/examples/rice.doc spec/examples/rice.html spec/examples/rice_alt.html)
|
15
|
-
# FileUtils.cd "spec/examples"
|
16
|
-
# Asciidoctor.convert_file "rice.adoc", {:attributes=>{"backend"=>"iso"}, :safe=>0, :header_footer=>true, :requires=>["metanorma-iso"], :failure_level=>4, :mkdirs=>true, :to_file=>nil}
|
17
|
-
# FileUtils.cd "../.."
|
18
|
-
# expect(File.exist?("spec/examples/rice.xml")).to be true
|
19
|
-
# expect(File.exist?("spec/examples/rice.doc")).to be true
|
20
|
-
# expect(File.exist?("spec/examples/rice.html")).to be true
|
21
|
-
# expect(File.exist?("spec/examples/rice_alt.html")).to be true
|
22
|
-
# end
|
23
|
-
|
24
15
|
it "processes a blank document" do
|
25
|
-
|
16
|
+
input = <<~INPUT
|
26
17
|
#{ASCIIDOC_BLANK_HDR}
|
27
18
|
INPUT
|
19
|
+
output = <<~OUTPUT
|
28
20
|
#{@blank_hdr}
|
29
21
|
<sections/>
|
30
22
|
</iec-standard>
|
31
23
|
OUTPUT
|
24
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
25
|
+
.to be_equivalent_to xmlpp(output)
|
32
26
|
end
|
33
27
|
|
34
28
|
it "converts a blank document" do
|
35
29
|
FileUtils.rm_f "test.doc"
|
36
30
|
FileUtils.rm_f "test.html"
|
37
31
|
FileUtils.rm_f "test.pdf"
|
38
|
-
|
32
|
+
input = <<~INPUT
|
39
33
|
= Document title
|
40
34
|
Author
|
41
35
|
:docfile: test.adoc
|
42
36
|
:novalid:
|
43
37
|
:no-isobib:
|
44
38
|
INPUT
|
39
|
+
output = <<~OUTPUT
|
45
40
|
#{@blank_hdr}
|
46
41
|
<sections/>
|
47
42
|
</iec-standard>
|
48
43
|
OUTPUT
|
44
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
45
|
+
.to be_equivalent_to xmlpp(output)
|
49
46
|
expect(File.exist?("test.pdf")).to be true
|
50
47
|
expect(File.exist?("test.html")).to be true
|
51
48
|
expect(File.exist?("test.doc")).to be true
|
@@ -53,7 +50,7 @@ RSpec.describe Asciidoctor::Iec do
|
|
53
50
|
end
|
54
51
|
|
55
52
|
it "processes default metadata" do
|
56
|
-
|
53
|
+
input = <<~INPUT
|
57
54
|
= Document title
|
58
55
|
Author
|
59
56
|
:docfile: test.adoc
|
@@ -102,235 +99,245 @@ RSpec.describe Asciidoctor::Iec do
|
|
102
99
|
:interest-to-committees: TC 6121, SC 12
|
103
100
|
:obsoletes: ABC; DEF
|
104
101
|
INPUT
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
102
|
+
output = <<~OUTPUT
|
103
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
104
|
+
<iec-standard xmlns="https://www.metanorma.org/ns/iec" type="semantic" version="#{Metanorma::Iec::VERSION}">
|
105
|
+
<bibdata type='standard'>
|
106
|
+
<title language='en' format='text/plain' type='main'>
|
107
|
+
Introduction — Main
|
108
|
+
Title — Title — Title Part
|
109
|
+
</title>
|
110
|
+
<title language='en' format='text/plain' type='title-intro'>Introduction</title>
|
111
|
+
<title language='en' format='text/plain' type='title-main'>Main Title — Title</title>
|
112
|
+
<title language='en' format='text/plain' type='title-part'>Title Part</title>
|
113
|
+
<title language='fr' format='text/plain' type='main'>
|
114
|
+
Introduction Française — Titre
|
115
|
+
Principal — Part du Titre
|
116
|
+
</title>
|
117
|
+
<title language='fr' format='text/plain' type='title-intro'>Introduction Française</title>
|
118
|
+
<title language='fr' format='text/plain' type='title-main'>Titre Principal</title>
|
119
|
+
<title language='fr' format='text/plain' type='title-part'>Part du Titre</title>
|
120
|
+
<docidentifier type='ISO'>IEC/3NWIP 1000-1 ED 2</docidentifier>
|
121
|
+
<docnumber>1000</docnumber>
|
122
|
+
<contributor>
|
123
|
+
<role type='author'/>
|
124
|
+
<organization>
|
125
|
+
<name>International Electrotechnical Commission</name>
|
126
|
+
<abbreviation>IEC</abbreviation>
|
127
|
+
</organization>
|
128
|
+
</contributor>
|
129
|
+
<contributor>
|
130
|
+
<role type='publisher'/>
|
131
|
+
<organization>
|
132
|
+
<name>International Electrotechnical Commission</name>
|
133
|
+
<abbreviation>IEC</abbreviation>
|
134
|
+
</organization>
|
135
|
+
</contributor>
|
136
|
+
<edition>2</edition>
|
137
|
+
<version>
|
138
|
+
<revision-date>2000-01-01</revision-date>
|
139
|
+
<draft>0.3.4</draft>
|
140
|
+
</version>
|
141
|
+
<language>en</language>
|
142
|
+
<script>Latn</script>
|
143
|
+
<status>
|
144
|
+
<stage abbreviation='NWIP'>10</stage>
|
145
|
+
<substage abbreviation='??'>20</substage>
|
146
|
+
<iteration>3</iteration>
|
147
|
+
</status>
|
148
|
+
<copyright>
|
149
|
+
<from>#{Date.today.year}</from>
|
150
|
+
<owner>
|
151
|
+
<organization>
|
152
|
+
<name>International Electrotechnical Commission</name>
|
153
|
+
<abbreviation>IEC</abbreviation>
|
154
|
+
</organization>
|
155
|
+
</owner>
|
156
|
+
</copyright>
|
157
|
+
<relation type='obsoletes'>
|
158
|
+
<bibitem>
|
159
|
+
<title>--</title>
|
160
|
+
<docidentifier>ABC</docidentifier>
|
161
|
+
</bibitem>
|
162
|
+
</relation>
|
163
|
+
<relation type='obsoletes'>
|
164
|
+
<bibitem>
|
165
|
+
<title>--</title>
|
166
|
+
<docidentifier>DEF</docidentifier>
|
167
|
+
</bibitem>
|
168
|
+
</relation>
|
169
|
+
<ext>
|
170
|
+
<doctype>article</doctype>
|
171
|
+
<horizontal>false</horizontal>
|
172
|
+
<editorialgroup>
|
173
|
+
<technical-committee number='1' type='A'>TC</technical-committee>
|
174
|
+
<technical-committee number='11' type='A1'>TC1</technical-committee>
|
175
|
+
<subcommittee number='2' type='B'>SC</subcommittee>
|
176
|
+
<subcommittee number='21' type='B1'>SC1</subcommittee>
|
177
|
+
<workgroup number='3' type='C'>WG</workgroup>
|
178
|
+
<workgroup number='31' type='C1'>WG1</workgroup>
|
179
|
+
<secretariat>SECRETARIAT</secretariat>
|
180
|
+
</editorialgroup>
|
181
|
+
<ics>
|
182
|
+
<code>1</code>
|
183
|
+
</ics>
|
184
|
+
<ics>
|
185
|
+
<code>2</code>
|
186
|
+
</ics>
|
187
|
+
<ics>
|
188
|
+
<code>3</code>
|
189
|
+
</ics>
|
190
|
+
<structuredidentifier>
|
191
|
+
<project-number part='1'>IEC 1000</project-number>
|
192
|
+
</structuredidentifier>
|
193
|
+
<stagename>New work item proposal</stagename>
|
194
|
+
<accessibility-color-inside>true</accessibility-color-inside>
|
195
|
+
<price-code>XC</price-code>
|
196
|
+
<cen-processing>true</cen-processing>
|
197
|
+
<secretary>Fred Nerk</secretary>
|
198
|
+
<interest-to-committees>TC 6121, SC 12</interest-to-committees>
|
199
|
+
</ext>
|
200
|
+
</bibdata>
|
201
|
+
<boilerplate>
|
202
|
+
<copyright-statement>
|
203
|
+
<clause>
|
204
|
+
<p id='_'>
|
205
|
+
<strong>Copyright © #{Date.today.year} International Electrotechnical Commission, IEC.</strong>
|
206
|
+
All rights reserved. It is permitted to download this electronic
|
207
|
+
file, to make a copy and to print out the content for the sole purpose
|
208
|
+
of preparing National Committee positions. You may not copy or
|
209
|
+
“mirror” the file or printed version of the document, or
|
210
|
+
any part of it, for any other purpose without permission in writing
|
211
|
+
from IEC.
|
212
|
+
</p>
|
213
|
+
</clause>
|
214
|
+
</copyright-statement>
|
215
|
+
<legal-statement>
|
216
|
+
<clause>
|
217
|
+
<ol id='_'>
|
218
|
+
<li>
|
219
|
+
<p id='_'>
|
220
|
+
The International Electrotechnical Commission (IEC) is a worldwide
|
221
|
+
organization for standardization comprising all national
|
222
|
+
electrotechnical committees (IEC National Committees). The object
|
223
|
+
of IEC is to promote international co-operation on all questions
|
224
|
+
concerning standardization in the electrical and electronic
|
225
|
+
fields. To this end and in addition to other activities, IEC
|
226
|
+
publishes International Standards, Technical Specifications,
|
227
|
+
Technical Reports, Publicly Available Specifications (PAS) and
|
228
|
+
Guides (hereafter referred to as “IEC
|
229
|
+
Publication(s)”). Their preparation is entrusted to
|
230
|
+
technical committees; any IEC National Committee interested in the
|
231
|
+
subject dealt with may participate in this preparatory work.
|
232
|
+
International, governmental and non-governmental organizations
|
233
|
+
liaising with the IEC also participate in this preparation. IEC
|
234
|
+
collaborates closely with the International Organization for
|
235
|
+
Standardization (ISO) in accordance with conditions determined by
|
236
|
+
agreement between the two organizations.
|
237
|
+
</p>
|
238
|
+
</li>
|
239
|
+
<li>
|
240
|
+
<p id='_'>
|
241
|
+
The formal decisions or agreements of IEC on technical matters
|
242
|
+
express, as nearly as possible, an international consensus of
|
243
|
+
opinion on the relevant subjects since each technical committee
|
244
|
+
has representation from all interested IEC National Committees.
|
245
|
+
</p>
|
246
|
+
</li>
|
247
|
+
<li>
|
248
|
+
<p id='_'>
|
249
|
+
IEC Publications have the form of recommendations for
|
250
|
+
international use and are accepted by IEC National Committees in
|
251
|
+
that sense. While all reasonable efforts are made to ensure that
|
252
|
+
the technical content of IEC Publications is accurate, IEC cannot
|
253
|
+
be held responsible for the way in which they are used or for any
|
254
|
+
misinterpretation by any end user.
|
255
|
+
</p>
|
256
|
+
</li>
|
257
|
+
<li>
|
258
|
+
<p id='_'>
|
259
|
+
In order to promote international uniformity, IEC National
|
260
|
+
Committees undertake to apply IEC Publications transparently to
|
261
|
+
the maximum extent possible in their national and regional
|
262
|
+
publications. Any divergence between any IEC Publication and the
|
263
|
+
corresponding national or regional publication shall be clearly
|
264
|
+
indicated in the latter.
|
265
|
+
</p>
|
266
|
+
</li>
|
267
|
+
<li>
|
268
|
+
<p id='_'>
|
269
|
+
IEC itself does not provide any attestation of conformity.
|
270
|
+
Independent certification bodies provide conformity assessment
|
271
|
+
services and, in some areas, access to IEC marks of conformity.
|
272
|
+
IEC is not responsible for any services carried out by independent
|
273
|
+
certification bodies.
|
274
|
+
</p>
|
275
|
+
</li>
|
276
|
+
<li>
|
277
|
+
<p id='_'>All users should ensure that they have the latest edition of this publication.</p>
|
278
|
+
</li>
|
279
|
+
<li>
|
280
|
+
<p id='_'>
|
281
|
+
No liability shall attach to IEC or its directors, employees,
|
282
|
+
servants or agents including individual experts and members of its
|
283
|
+
technical committees and IEC National Committees for any personal
|
284
|
+
injury, property damage or other damage of any nature whatsoever,
|
285
|
+
whether direct or indirect, or for costs (including legal fees)
|
286
|
+
and expenses arising out of the publication, use of, or reliance
|
287
|
+
upon, this IEC Publication or any other IEC Publications.
|
288
|
+
</p>
|
289
|
+
</li>
|
290
|
+
<li>
|
291
|
+
<p id='_'>
|
292
|
+
Attention is drawn to the Normative references cited in this
|
293
|
+
publication. Use of the referenced publications is indispensable
|
294
|
+
for the correct application of this publication.
|
295
|
+
</p>
|
296
|
+
</li>
|
297
|
+
<li>
|
298
|
+
<p id='_'>
|
299
|
+
Attention is drawn to the possibility that some of the elements of
|
300
|
+
this IEC Publication may be the subject of patent rights. IEC
|
301
|
+
shall not be held responsible for identifying any or all such
|
302
|
+
patent rights.
|
303
|
+
</p>
|
304
|
+
</li>
|
305
|
+
</ol>
|
306
|
+
</clause>
|
307
|
+
</legal-statement>
|
308
|
+
<license-statement>
|
309
|
+
<clause>
|
310
|
+
<p id='_'>
|
311
|
+
This document is still under study and subject to change. It should
|
312
|
+
not be used for reference purposes. until published as such.
|
313
|
+
</p>
|
314
|
+
<p id='_'>
|
315
|
+
Recipients of this document are invited to submit, with their
|
316
|
+
comments, notification of any relevant patent rights of which they are
|
317
|
+
aware and to provide supporting documentation.
|
318
|
+
</p>
|
319
|
+
</clause>
|
320
|
+
</license-statement>
|
321
|
+
<feedback-statement>
|
322
|
+
<clause id='boilerplate-cenelec-attention'>
|
323
|
+
<title>Attention IEC-CENELEC parallel voting</title>
|
324
|
+
<p id='_'>
|
325
|
+
The attention of IEC National Committees, members of CENELEC, is drawn
|
326
|
+
to the fact that this (NWIP) is submitted for parallel voting.
|
327
|
+
</p>
|
328
|
+
<p id='_'>The CENELEC members are invited to vote through the CENELEC voting system.</p>
|
329
|
+
</clause>
|
330
|
+
</feedback-statement>
|
331
|
+
</boilerplate>
|
332
|
+
<sections> </sections>
|
333
|
+
</iec-standard>
|
329
334
|
OUTPUT
|
335
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
336
|
+
.to be_equivalent_to xmlpp(output)
|
330
337
|
end
|
331
338
|
|
332
339
|
it "processes complex metadata" do
|
333
|
-
|
340
|
+
input = <<~INPUT
|
334
341
|
= Document title
|
335
342
|
Author
|
336
343
|
:docfile: test.adoc
|
@@ -349,105 +356,344 @@ RSpec.describe Asciidoctor::Iec do
|
|
349
356
|
:function: emc
|
350
357
|
:horizontal: true
|
351
358
|
INPUT
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
359
|
+
output = <<~OUTPUT
|
360
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
361
|
+
<iec-standard xmlns="https://www.metanorma.org/ns/iec" type="semantic" version="#{Metanorma::Iec::VERSION}">
|
362
|
+
<bibdata type='standard'>
|
363
|
+
<docidentifier type='ISO'>ISO/IEC/IETF/2CDTS 1000-1-1 ED 1</docidentifier>
|
364
|
+
<docidentifier type='iso-tc'>2000</docidentifier>
|
365
|
+
<docnumber>1000</docnumber>
|
366
|
+
<contributor>
|
367
|
+
<role type='author'/>
|
368
|
+
<organization>
|
369
|
+
<name>International Electrotechnical Commission</name>
|
370
|
+
<abbreviation>IEC</abbreviation>
|
371
|
+
</organization>
|
372
|
+
</contributor>
|
373
|
+
<contributor>
|
374
|
+
<role type='author'/>
|
375
|
+
<organization>
|
376
|
+
<name>IETF</name>
|
377
|
+
</organization>
|
378
|
+
</contributor>
|
379
|
+
<contributor>
|
380
|
+
<role type='author'/>
|
381
|
+
<organization>
|
382
|
+
<name>International Organization for Standardization</name>
|
383
|
+
<abbreviation>ISO</abbreviation>
|
384
|
+
</organization>
|
385
|
+
</contributor>
|
386
|
+
<contributor>
|
387
|
+
<role type='publisher'/>
|
388
|
+
<organization>
|
389
|
+
<name>International Electrotechnical Commission</name>
|
390
|
+
<abbreviation>IEC</abbreviation>
|
391
|
+
</organization>
|
392
|
+
</contributor>
|
393
|
+
<contributor>
|
394
|
+
<role type='publisher'/>
|
395
|
+
<organization>
|
396
|
+
<name>IETF</name>
|
397
|
+
</organization>
|
398
|
+
</contributor>
|
399
|
+
<contributor>
|
400
|
+
<role type='publisher'/>
|
401
|
+
<organization>
|
402
|
+
<name>International Organization for Standardization</name>
|
403
|
+
<abbreviation>ISO</abbreviation>
|
404
|
+
</organization>
|
405
|
+
</contributor>
|
406
|
+
<language>el</language>
|
407
|
+
<script>Grek</script>
|
408
|
+
<status>
|
409
|
+
<stage abbreviation='CD'>30</stage>
|
410
|
+
<substage abbreviation='A22CD'>99</substage>
|
411
|
+
<iteration>2</iteration>
|
412
|
+
</status>
|
413
|
+
<copyright>
|
414
|
+
<from>2001</from>
|
415
|
+
<owner>
|
416
|
+
<organization>
|
417
|
+
<name>International Electrotechnical Commission</name>
|
418
|
+
<abbreviation>IEC</abbreviation>
|
419
|
+
</organization>
|
420
|
+
</owner>
|
421
|
+
</copyright>
|
422
|
+
<copyright>
|
423
|
+
<from>2001</from>
|
424
|
+
<owner>
|
425
|
+
<organization>
|
426
|
+
<name>IETF</name>
|
427
|
+
</organization>
|
428
|
+
</owner>
|
429
|
+
</copyright>
|
430
|
+
<copyright>
|
431
|
+
<from>2001</from>
|
432
|
+
<owner>
|
433
|
+
<organization>
|
434
|
+
<name>International Organization for Standardization</name>
|
435
|
+
<abbreviation>ISO</abbreviation>
|
436
|
+
</organization>
|
437
|
+
</owner>
|
438
|
+
</copyright>
|
439
|
+
<ext>
|
440
|
+
<doctype>technical-specification</doctype>
|
441
|
+
<horizontal>true</horizontal>
|
442
|
+
<function>emc</function>
|
443
|
+
<editorialgroup>
|
444
|
+
<technical-committee/>
|
445
|
+
<subcommittee/>
|
446
|
+
<workgroup/>
|
447
|
+
</editorialgroup>
|
448
|
+
<structuredidentifier>
|
449
|
+
<project-number part='1' subpart='1'>ISO/IEC/IETF 1000</project-number>
|
450
|
+
</structuredidentifier>
|
451
|
+
<stagename>Committee draft</stagename>
|
452
|
+
</ext>
|
453
|
+
</bibdata>
|
454
|
+
<boilerplate>
|
455
|
+
<copyright-statement>
|
456
|
+
<clause>
|
457
|
+
<p id='_'>
|
458
|
+
<strong>Copyright © 2001 International Electrotechnical Commission, IEC.</strong>
|
459
|
+
All rights reserved. It is permitted to download this electronic
|
460
|
+
file, to make a copy and to print out the content for the sole purpose
|
461
|
+
of preparing National Committee positions. You may not copy or
|
462
|
+
“mirror” the file or printed version of the document, or
|
463
|
+
any part of it, for any other purpose without permission in writing
|
464
|
+
from IEC.
|
465
|
+
</p>
|
466
|
+
</clause>
|
467
|
+
</copyright-statement>
|
468
|
+
<legal-statement>
|
469
|
+
<clause>
|
470
|
+
<ol id='_'>
|
471
|
+
<li>
|
472
|
+
<p id='_'>
|
473
|
+
The International Electrotechnical Commission (IEC) is a worldwide
|
474
|
+
organization for standardization comprising all national
|
475
|
+
electrotechnical committees (IEC National Committees). The object
|
476
|
+
of IEC is to promote international co-operation on all questions
|
477
|
+
concerning standardization in the electrical and electronic
|
478
|
+
fields. To this end and in addition to other activities, IEC
|
479
|
+
publishes International Standards, Technical Specifications,
|
480
|
+
Technical Reports, Publicly Available Specifications (PAS) and
|
481
|
+
Guides (hereafter referred to as “IEC
|
482
|
+
Publication(s)”). Their preparation is entrusted to
|
483
|
+
technical committees; any IEC National Committee interested in the
|
484
|
+
subject dealt with may participate in this preparatory work.
|
485
|
+
International, governmental and non-governmental organizations
|
486
|
+
liaising with the IEC also participate in this preparation. IEC
|
487
|
+
collaborates closely with the International Organization for
|
488
|
+
Standardization (ISO) in accordance with conditions determined by
|
489
|
+
agreement between the two organizations.
|
490
|
+
</p>
|
491
|
+
</li>
|
492
|
+
<li>
|
493
|
+
<p id='_'>
|
494
|
+
The formal decisions or agreements of IEC on technical matters
|
495
|
+
express, as nearly as possible, an international consensus of
|
496
|
+
opinion on the relevant subjects since each technical committee
|
497
|
+
has representation from all interested IEC National Committees.
|
498
|
+
</p>
|
499
|
+
</li>
|
500
|
+
<li>
|
501
|
+
<p id='_'>
|
502
|
+
IEC Publications have the form of recommendations for
|
503
|
+
international use and are accepted by IEC National Committees in
|
504
|
+
that sense. While all reasonable efforts are made to ensure that
|
505
|
+
the technical content of IEC Publications is accurate, IEC cannot
|
506
|
+
be held responsible for the way in which they are used or for any
|
507
|
+
misinterpretation by any end user.
|
508
|
+
</p>
|
509
|
+
</li>
|
510
|
+
<li>
|
511
|
+
<p id='_'>
|
512
|
+
In order to promote international uniformity, IEC National
|
513
|
+
Committees undertake to apply IEC Publications transparently to
|
514
|
+
the maximum extent possible in their national and regional
|
515
|
+
publications. Any divergence between any IEC Publication and the
|
516
|
+
corresponding national or regional publication shall be clearly
|
517
|
+
indicated in the latter.
|
518
|
+
</p>
|
519
|
+
</li>
|
520
|
+
<li>
|
521
|
+
<p id='_'>
|
522
|
+
IEC itself does not provide any attestation of conformity.
|
523
|
+
Independent certification bodies provide conformity assessment
|
524
|
+
services and, in some areas, access to IEC marks of conformity.
|
525
|
+
IEC is not responsible for any services carried out by independent
|
526
|
+
certification bodies.
|
527
|
+
</p>
|
528
|
+
</li>
|
529
|
+
<li>
|
530
|
+
<p id='_'>All users should ensure that they have the latest edition of this publication.</p>
|
531
|
+
</li>
|
532
|
+
<li>
|
533
|
+
<p id='_'>
|
534
|
+
No liability shall attach to IEC or its directors, employees,
|
535
|
+
servants or agents including individual experts and members of its
|
536
|
+
technical committees and IEC National Committees for any personal
|
537
|
+
injury, property damage or other damage of any nature whatsoever,
|
538
|
+
whether direct or indirect, or for costs (including legal fees)
|
539
|
+
and expenses arising out of the publication, use of, or reliance
|
540
|
+
upon, this IEC Publication or any other IEC Publications.
|
541
|
+
</p>
|
542
|
+
</li>
|
543
|
+
<li>
|
544
|
+
<p id='_'>
|
545
|
+
Attention is drawn to the Normative references cited in this
|
546
|
+
publication. Use of the referenced publications is indispensable
|
547
|
+
for the correct application of this publication.
|
548
|
+
</p>
|
549
|
+
</li>
|
550
|
+
<li>
|
551
|
+
<p id='_'>
|
552
|
+
Attention is drawn to the possibility that some of the elements of
|
553
|
+
this IEC Publication may be the subject of patent rights. IEC
|
554
|
+
shall not be held responsible for identifying any or all such
|
555
|
+
patent rights.
|
556
|
+
</p>
|
557
|
+
</li>
|
558
|
+
</ol>
|
559
|
+
</clause>
|
560
|
+
</legal-statement>
|
561
|
+
<license-statement>
|
562
|
+
<clause>
|
563
|
+
<p id='_'>
|
564
|
+
This document is still under study and subject to change. It should
|
565
|
+
not be used for reference purposes. until published as such.
|
566
|
+
</p>
|
567
|
+
<p id='_'>
|
568
|
+
Recipients of this document are invited to submit, with their
|
569
|
+
comments, notification of any relevant patent rights of which they are
|
570
|
+
aware and to provide supporting documentation.
|
571
|
+
</p>
|
572
|
+
</clause>
|
573
|
+
</license-statement>
|
574
|
+
<feedback-statement>
|
575
|
+
<clause id='boilerplate-cenelec-attention'>
|
576
|
+
<title>Attention IEC-CENELEC parallel voting</title>
|
577
|
+
<p id='_'>
|
578
|
+
The attention of IEC National Committees, members of CENELEC, is drawn
|
579
|
+
to the fact that this Committee Draft (CD) is submitted for parallel
|
580
|
+
voting.
|
581
|
+
</p>
|
582
|
+
<p id='_'>The CENELEC members are invited to vote through the CENELEC voting system.</p>
|
583
|
+
</clause>
|
584
|
+
</feedback-statement>
|
585
|
+
</boilerplate>
|
586
|
+
<sections> </sections>
|
587
|
+
</iec-standard>
|
588
|
+
OUTPUT
|
589
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
590
|
+
.to be_equivalent_to xmlpp(output)
|
591
|
+
end
|
592
|
+
|
593
|
+
it "processes boilerplate in English" do
|
594
|
+
doc = strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS))
|
595
|
+
= Document title
|
596
|
+
Author
|
597
|
+
:docfile: test.adoc
|
598
|
+
:nodoc:
|
599
|
+
:novalid:
|
600
|
+
:no-isobib:
|
601
|
+
:docnumber: 1000
|
602
|
+
:partnumber: 1-1
|
603
|
+
:tc-docnumber: 2000
|
604
|
+
:language: en
|
605
|
+
:script: Latn
|
606
|
+
:publisher: IEC,IETF,ISO
|
607
|
+
:copyright-year: 2001
|
608
|
+
INPUT
|
609
|
+
expect(doc).to include "including individual experts"
|
610
|
+
expect(doc).not_to include "y compris ses experts particuliers"
|
611
|
+
end
|
612
|
+
|
613
|
+
it "processes boilerplate in French" do
|
614
|
+
doc = strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS))
|
615
|
+
= Document title
|
616
|
+
Author
|
617
|
+
:docfile: test.adoc
|
618
|
+
:nodoc:
|
619
|
+
:novalid:
|
620
|
+
:no-isobib:
|
621
|
+
:docnumber: 1000
|
622
|
+
:partnumber: 1-1
|
623
|
+
:tc-docnumber: 2000
|
624
|
+
:language: fr
|
625
|
+
:script: Latn
|
626
|
+
:publisher: IEC,IETF,ISO
|
627
|
+
:copyright-year: 2001
|
628
|
+
INPUT
|
629
|
+
expect(doc).not_to include "including individual experts"
|
630
|
+
expect(doc).to include "y compris ses experts particuliers"
|
631
|
+
end
|
632
|
+
|
633
|
+
it "defaults substage" do
|
634
|
+
input = <<~INPUT
|
635
|
+
= Document title
|
636
|
+
Author
|
637
|
+
:docfile: test.adoc
|
638
|
+
:nodoc:
|
639
|
+
:novalid:
|
640
|
+
:no-isobib:
|
641
|
+
:docnumber: 1000
|
642
|
+
:docstage: 50
|
643
|
+
INPUT
|
644
|
+
output = <<~OUTPUT
|
645
|
+
<iec-standard xmlns="https://www.metanorma.org/ns/iec" type="semantic" version="#{Metanorma::Iec::VERSION}">
|
646
|
+
<bibdata type="standard">
|
647
|
+
<docidentifier type="ISO">IEC/FDIS 1000 ED 1</docidentifier>
|
648
|
+
<docnumber>1000</docnumber>
|
649
|
+
<contributor>
|
650
|
+
<role type="author"/>
|
651
|
+
<organization>
|
652
|
+
<name>International Electrotechnical Commission</name>
|
653
|
+
<abbreviation>IEC</abbreviation>
|
654
|
+
</organization>
|
655
|
+
</contributor>
|
656
|
+
<contributor>
|
657
|
+
<role type="publisher"/>
|
658
|
+
<organization>
|
659
|
+
<name>International Electrotechnical Commission</name>
|
660
|
+
<abbreviation>IEC</abbreviation>
|
661
|
+
</organization>
|
662
|
+
</contributor>
|
663
|
+
<language>en</language>
|
664
|
+
<script>Latn</script>
|
665
|
+
<status>
|
666
|
+
<stage abbreviation="FDIS">50</stage>
|
667
|
+
<substage abbreviation="RFDIS">00</substage>
|
668
|
+
</status>
|
669
|
+
<copyright>
|
670
|
+
<from>#{Date.today.year}</from>
|
671
|
+
<owner>
|
672
|
+
<organization>
|
673
|
+
<name>International Electrotechnical Commission</name>
|
674
|
+
<abbreviation>IEC</abbreviation>
|
675
|
+
</organization>
|
676
|
+
</owner>
|
677
|
+
</copyright>
|
678
|
+
<ext>
|
679
|
+
<doctype>article</doctype>
|
680
|
+
<horizontal>false</horizontal>
|
681
|
+
<editorialgroup>
|
682
|
+
<technical-committee/>
|
683
|
+
<subcommittee/>
|
684
|
+
<workgroup/>
|
685
|
+
</editorialgroup>
|
686
|
+
<structuredidentifier>
|
687
|
+
<project-number>IEC 1000</project-number>
|
688
|
+
</structuredidentifier>
|
689
|
+
<stagename>Final draft international standard</stagename>
|
690
|
+
</ext>
|
691
|
+
</bibdata>
|
692
|
+
<boilerplate>
|
447
693
|
<copyright-statement>
|
448
694
|
<clause>
|
449
695
|
<p id='_'>
|
450
|
-
<strong>Copyright ©
|
696
|
+
<strong>Copyright © #{Time.now.year} International Electrotechnical Commission, IEC.</strong>
|
451
697
|
All rights reserved. It is permitted to download this electronic
|
452
698
|
file, to make a copy and to print out the content for the sole purpose
|
453
699
|
of preparing National Committee positions. You may not copy or
|
@@ -552,8 +798,15 @@ RSpec.describe Asciidoctor::Iec do
|
|
552
798
|
<license-statement>
|
553
799
|
<clause>
|
554
800
|
<p id='_'>
|
555
|
-
This document is
|
556
|
-
|
801
|
+
This document is a draft distributed for approval. It may not be
|
802
|
+
referred to as an International Standard until published as such.
|
803
|
+
</p>
|
804
|
+
<p id='_'>
|
805
|
+
In addition to their evaluation as being acceptable for industrial,
|
806
|
+
technological, commercial and user purposes, Final Draft International
|
807
|
+
Standards may on occasion have to be considered in the light of their
|
808
|
+
potential to become standards to which reference may be made in
|
809
|
+
national regulations.
|
557
810
|
</p>
|
558
811
|
<p id='_'>
|
559
812
|
Recipients of this document are invited to submit, with their
|
@@ -567,261 +820,22 @@ RSpec.describe Asciidoctor::Iec do
|
|
567
820
|
<title>Attention IEC-CENELEC parallel voting</title>
|
568
821
|
<p id='_'>
|
569
822
|
The attention of IEC National Committees, members of CENELEC, is drawn
|
570
|
-
to the fact that this
|
571
|
-
voting.
|
823
|
+
to the fact that this Final Draft International Standard (FDIS) is
|
824
|
+
submitted for parallel voting.
|
572
825
|
</p>
|
573
826
|
<p id='_'>The CENELEC members are invited to vote through the CENELEC voting system.</p>
|
574
827
|
</clause>
|
575
828
|
</feedback-statement>
|
576
829
|
</boilerplate>
|
577
|
-
|
578
|
-
|
579
|
-
OUTPUT
|
580
|
-
end
|
581
|
-
|
582
|
-
it "processes boilerplate in English" do
|
583
|
-
doc = strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))
|
584
|
-
= Document title
|
585
|
-
Author
|
586
|
-
:docfile: test.adoc
|
587
|
-
:nodoc:
|
588
|
-
:novalid:
|
589
|
-
:no-isobib:
|
590
|
-
:docnumber: 1000
|
591
|
-
:partnumber: 1-1
|
592
|
-
:tc-docnumber: 2000
|
593
|
-
:language: en
|
594
|
-
:script: Latn
|
595
|
-
:publisher: IEC,IETF,ISO
|
596
|
-
:copyright-year: 2001
|
597
|
-
INPUT
|
598
|
-
expect(doc).to include "including individual experts"
|
599
|
-
expect(doc).not_to include "y compris ses experts particuliers"
|
600
|
-
end
|
601
|
-
|
602
|
-
it "processes boilerplate in French" do
|
603
|
-
doc = strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))
|
604
|
-
= Document title
|
605
|
-
Author
|
606
|
-
:docfile: test.adoc
|
607
|
-
:nodoc:
|
608
|
-
:novalid:
|
609
|
-
:no-isobib:
|
610
|
-
:docnumber: 1000
|
611
|
-
:partnumber: 1-1
|
612
|
-
:tc-docnumber: 2000
|
613
|
-
:language: fr
|
614
|
-
:script: Latn
|
615
|
-
:publisher: IEC,IETF,ISO
|
616
|
-
:copyright-year: 2001
|
617
|
-
INPUT
|
618
|
-
expect(doc).not_to include "including individual experts"
|
619
|
-
expect(doc).to include "y compris ses experts particuliers"
|
620
|
-
end
|
621
|
-
|
622
|
-
it "defaults substage" do
|
623
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
624
|
-
= Document title
|
625
|
-
Author
|
626
|
-
:docfile: test.adoc
|
627
|
-
:nodoc:
|
628
|
-
:novalid:
|
629
|
-
:no-isobib:
|
630
|
-
:docnumber: 1000
|
631
|
-
:docstage: 50
|
632
|
-
INPUT
|
633
|
-
<iec-standard xmlns="https://www.metanorma.org/ns/iec" type="semantic" version="#{Metanorma::Iec::VERSION}">
|
634
|
-
<bibdata type="standard">
|
635
|
-
<docidentifier type="ISO">IEC/FDIS 1000 ED 1</docidentifier>
|
636
|
-
<docnumber>1000</docnumber>
|
637
|
-
<contributor>
|
638
|
-
<role type="author"/>
|
639
|
-
<organization>
|
640
|
-
<name>International Electrotechnical Commission</name>
|
641
|
-
<abbreviation>IEC</abbreviation>
|
642
|
-
</organization>
|
643
|
-
</contributor>
|
644
|
-
<contributor>
|
645
|
-
<role type="publisher"/>
|
646
|
-
<organization>
|
647
|
-
<name>International Electrotechnical Commission</name>
|
648
|
-
<abbreviation>IEC</abbreviation>
|
649
|
-
</organization>
|
650
|
-
</contributor>
|
651
|
-
<language>en</language>
|
652
|
-
<script>Latn</script>
|
653
|
-
<status>
|
654
|
-
<stage abbreviation="FDIS">50</stage>
|
655
|
-
<substage abbreviation="RFDIS">00</substage>
|
656
|
-
</status>
|
657
|
-
<copyright>
|
658
|
-
<from>#{Date.today.year}</from>
|
659
|
-
<owner>
|
660
|
-
<organization>
|
661
|
-
<name>International Electrotechnical Commission</name>
|
662
|
-
<abbreviation>IEC</abbreviation>
|
663
|
-
</organization>
|
664
|
-
</owner>
|
665
|
-
</copyright>
|
666
|
-
<ext>
|
667
|
-
<doctype>article</doctype>
|
668
|
-
<horizontal>false</horizontal>
|
669
|
-
<editorialgroup>
|
670
|
-
<technical-committee/>
|
671
|
-
<subcommittee/>
|
672
|
-
<workgroup/>
|
673
|
-
</editorialgroup>
|
674
|
-
<structuredidentifier>
|
675
|
-
<project-number>IEC 1000</project-number>
|
676
|
-
</structuredidentifier>
|
677
|
-
<stagename>Final draft international standard</stagename>
|
678
|
-
</ext>
|
679
|
-
</bibdata>
|
680
|
-
<boilerplate>
|
681
|
-
<copyright-statement>
|
682
|
-
<clause>
|
683
|
-
<p id='_'>
|
684
|
-
<strong>Copyright © #{Time.now.year} International Electrotechnical Commission, IEC.</strong>
|
685
|
-
All rights reserved. It is permitted to download this electronic
|
686
|
-
file, to make a copy and to print out the content for the sole purpose
|
687
|
-
of preparing National Committee positions. You may not copy or
|
688
|
-
“mirror” the file or printed version of the document, or any part of
|
689
|
-
it, for any other purpose without permission in writing from IEC.
|
690
|
-
</p>
|
691
|
-
</clause>
|
692
|
-
</copyright-statement>
|
693
|
-
<legal-statement>
|
694
|
-
<clause>
|
695
|
-
<ol id='_'>
|
696
|
-
<li>
|
697
|
-
<p id='_'>
|
698
|
-
The International Electrotechnical Commission (IEC) is a worldwide
|
699
|
-
organization for standardization comprising all national
|
700
|
-
electrotechnical committees (IEC National Committees). The object
|
701
|
-
of IEC is to promote international co-operation on all questions
|
702
|
-
concerning standardization in the electrical and electronic
|
703
|
-
fields. To this end and in addition to other activities, IEC
|
704
|
-
publishes International Standards, Technical Specifications,
|
705
|
-
Technical Reports, Publicly Available Specifications (PAS) and
|
706
|
-
Guides (hereafter referred to as “IEC Publication(s)”). Their
|
707
|
-
preparation is entrusted to technical committees; any IEC National
|
708
|
-
Committee interested in the subject dealt with may participate in
|
709
|
-
this preparatory work. International, governmental and
|
710
|
-
non-governmental organizations liaising with the IEC also
|
711
|
-
participate in this preparation. IEC collaborates closely with the
|
712
|
-
International Organization for Standardization (ISO) in accordance
|
713
|
-
with conditions determined by agreement between the two
|
714
|
-
organizations.
|
715
|
-
</p>
|
716
|
-
</li>
|
717
|
-
<li>
|
718
|
-
<p id='_'>
|
719
|
-
The formal decisions or agreements of IEC on technical matters
|
720
|
-
express, as nearly as possible, an international consensus of
|
721
|
-
opinion on the relevant subjects since each technical committee
|
722
|
-
has representation from all interested IEC National Committees.
|
723
|
-
</p>
|
724
|
-
</li>
|
725
|
-
<li>
|
726
|
-
<p id='_'>
|
727
|
-
IEC Publications have the form of recommendations for
|
728
|
-
international use and are accepted by IEC National Committees in
|
729
|
-
that sense. While all reasonable efforts are made to ensure that
|
730
|
-
the technical content of IEC Publications is accurate, IEC cannot
|
731
|
-
be held responsible for the way in which they are used or for any
|
732
|
-
misinterpretation by any end user.
|
733
|
-
</p>
|
734
|
-
</li>
|
735
|
-
<li>
|
736
|
-
<p id='_'>
|
737
|
-
In order to promote international uniformity, IEC National
|
738
|
-
Committees undertake to apply IEC Publications transparently to
|
739
|
-
the maximum extent possible in their national and regional
|
740
|
-
publications. Any divergence between any IEC Publication and the
|
741
|
-
corresponding national or regional publication shall be clearly
|
742
|
-
indicated in the latter.
|
743
|
-
</p>
|
744
|
-
</li>
|
745
|
-
<li>
|
746
|
-
<p id='_'>
|
747
|
-
IEC itself does not provide any attestation of conformity.
|
748
|
-
Independent certification bodies provide conformity assessment
|
749
|
-
services and, in some areas, access to IEC marks of conformity.
|
750
|
-
IEC is not responsible for any services carried out by independent
|
751
|
-
certification bodies.
|
752
|
-
</p>
|
753
|
-
</li>
|
754
|
-
<li>
|
755
|
-
<p id='_'>All users should ensure that they have the latest edition of this publication.</p>
|
756
|
-
</li>
|
757
|
-
<li>
|
758
|
-
<p id='_'>
|
759
|
-
No liability shall attach to IEC or its directors, employees,
|
760
|
-
servants or agents including individual experts and members of its
|
761
|
-
technical committees and IEC National Committees for any personal
|
762
|
-
injury, property damage or other damage of any nature whatsoever,
|
763
|
-
whether direct or indirect, or for costs (including legal fees)
|
764
|
-
and expenses arising out of the publication, use of, or reliance
|
765
|
-
upon, this IEC Publication or any other IEC Publications.
|
766
|
-
</p>
|
767
|
-
</li>
|
768
|
-
<li>
|
769
|
-
<p id='_'>
|
770
|
-
Attention is drawn to the Normative references cited in this
|
771
|
-
publication. Use of the referenced publications is indispensable
|
772
|
-
for the correct application of this publication.
|
773
|
-
</p>
|
774
|
-
</li>
|
775
|
-
<li>
|
776
|
-
<p id='_'>
|
777
|
-
Attention is drawn to the possibility that some of the elements of
|
778
|
-
this IEC Publication may be the subject of patent rights. IEC
|
779
|
-
shall not be held responsible for identifying any or all such
|
780
|
-
patent rights.
|
781
|
-
</p>
|
782
|
-
</li>
|
783
|
-
</ol>
|
784
|
-
</clause>
|
785
|
-
</legal-statement>
|
786
|
-
<license-statement>
|
787
|
-
<clause>
|
788
|
-
<p id='_'>
|
789
|
-
This document is a draft distributed for approval. It may not be
|
790
|
-
referred to as an International Standard until published as such.
|
791
|
-
</p>
|
792
|
-
<p id='_'>
|
793
|
-
In addition to their evaluation as being acceptable for industrial,
|
794
|
-
technological, commercial and user purposes, Final Draft International
|
795
|
-
Standards may on occasion have to be considered in the light of their
|
796
|
-
potential to become standards to which reference may be made in
|
797
|
-
national regulations.
|
798
|
-
</p>
|
799
|
-
<p id='_'>
|
800
|
-
Recipients of this document are invited to submit, with their
|
801
|
-
comments, notification of any relevant patent rights of which they are
|
802
|
-
aware and to provide supporting documentation.
|
803
|
-
</p>
|
804
|
-
</clause>
|
805
|
-
</license-statement>
|
806
|
-
<feedback-statement>
|
807
|
-
<clause id='boilerplate-cenelec-attention'>
|
808
|
-
<title>Attention IEC-CENELEC parallel voting</title>
|
809
|
-
<p id='_'>
|
810
|
-
The attention of IEC National Committees, members of CENELEC, is drawn
|
811
|
-
to the fact that this Final Draft International Standard (FDIS) is
|
812
|
-
submitted for parallel voting.
|
813
|
-
</p>
|
814
|
-
<p id='_'>The CENELEC members are invited to vote through the CENELEC voting system.</p>
|
815
|
-
</clause>
|
816
|
-
</feedback-statement>
|
817
|
-
</boilerplate>
|
818
|
-
<sections/>
|
819
|
-
</iec-standard>
|
830
|
+
<sections/>
|
831
|
+
</iec-standard>
|
820
832
|
OUTPUT
|
833
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
834
|
+
.to be_equivalent_to xmlpp(output)
|
821
835
|
end
|
822
836
|
|
823
837
|
it "defaults substage for stage 60" do
|
824
|
-
|
838
|
+
input = <<~INPUT
|
825
839
|
= Document title
|
826
840
|
Author
|
827
841
|
:docfile: test.adoc
|
@@ -831,61 +845,64 @@ RSpec.describe Asciidoctor::Iec do
|
|
831
845
|
:docnumber: 1000
|
832
846
|
:docstage: 60
|
833
847
|
INPUT
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
848
|
+
output = <<~OUTPUT
|
849
|
+
<iec-standard xmlns="https://www.metanorma.org/ns/iec" type="semantic" version="#{Metanorma::Iec::VERSION}">
|
850
|
+
<bibdata type="standard">
|
851
|
+
<docidentifier type="ISO">IEC 1000 ED 1</docidentifier>
|
852
|
+
<docnumber>1000</docnumber>
|
853
|
+
<contributor>
|
854
|
+
<role type="author"/>
|
855
|
+
<organization>
|
856
|
+
<name>International Electrotechnical Commission</name>
|
857
|
+
<abbreviation>IEC</abbreviation>
|
858
|
+
</organization>
|
859
|
+
</contributor>
|
860
|
+
<contributor>
|
861
|
+
<role type="publisher"/>
|
862
|
+
<organization>
|
863
|
+
<name>International Electrotechnical Commission</name>
|
864
|
+
<abbreviation>IEC</abbreviation>
|
865
|
+
</organization>
|
866
|
+
</contributor>
|
867
|
+
<language>en</language>
|
868
|
+
<script>Latn</script>
|
869
|
+
<status>
|
870
|
+
<stage abbreviation="PPUB">60</stage>
|
871
|
+
<substage abbreviation="PPUB">60</substage>
|
872
|
+
</status>
|
873
|
+
<copyright>
|
874
|
+
<from>#{Date.today.year}</from>
|
875
|
+
<owner>
|
876
|
+
<organization>
|
877
|
+
<name>International Electrotechnical Commission</name>
|
878
|
+
<abbreviation>IEC</abbreviation>
|
879
|
+
</organization>
|
880
|
+
</owner>
|
881
|
+
</copyright>
|
882
|
+
<ext>
|
883
|
+
<doctype>article</doctype>
|
884
|
+
<horizontal>false</horizontal>
|
885
|
+
<editorialgroup>
|
886
|
+
<technical-committee/>
|
887
|
+
<subcommittee/>
|
888
|
+
<workgroup/>
|
889
|
+
</editorialgroup>
|
890
|
+
<structuredidentifier>
|
891
|
+
<project-number>IEC 1000</project-number>
|
892
|
+
</structuredidentifier>
|
893
|
+
<stagename>International standard</stagename>
|
894
|
+
</ext>
|
895
|
+
</bibdata>
|
896
|
+
#{boilerplate(Nokogiri::XML(BLANK_HDR + '</iec-standard>'))}
|
897
|
+
<sections/>
|
898
|
+
</iec-standard>
|
884
899
|
OUTPUT
|
900
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
901
|
+
.to be_equivalent_to xmlpp(output)
|
885
902
|
end
|
886
903
|
|
887
904
|
it "populates metadata for PRF" do
|
888
|
-
|
905
|
+
input = <<~INPUT
|
889
906
|
= Document title
|
890
907
|
Author
|
891
908
|
:docfile: test.adoc
|
@@ -896,62 +913,65 @@ RSpec.describe Asciidoctor::Iec do
|
|
896
913
|
:docstage: 60
|
897
914
|
:docsubstage: 00
|
898
915
|
INPUT
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
916
|
+
output = <<~OUTPUT
|
917
|
+
<iec-standard xmlns="https://www.metanorma.org/ns/iec" type="semantic" version="#{Metanorma::Iec::VERSION}">
|
918
|
+
<bibdata type="standard">
|
919
|
+
<docidentifier type="ISO">IEC 1000 ED 1</docidentifier>
|
920
|
+
<docnumber>1000</docnumber>
|
921
|
+
<contributor>
|
922
|
+
<role type="author"/>
|
923
|
+
<organization>
|
924
|
+
<name>International Electrotechnical Commission</name>
|
925
|
+
<abbreviation>IEC</abbreviation>
|
926
|
+
</organization>
|
927
|
+
</contributor>
|
928
|
+
<contributor>
|
929
|
+
<role type="publisher"/>
|
930
|
+
<organization>
|
931
|
+
<name>International Electrotechnical Commission</name>
|
932
|
+
<abbreviation>IEC</abbreviation>
|
933
|
+
</organization>
|
934
|
+
</contributor>
|
935
|
+
<language>en</language>
|
936
|
+
<script>Latn</script>
|
937
|
+
<status>
|
938
|
+
<stage abbreviation="PPUB">60</stage>
|
939
|
+
<substage abbreviation="BPUB">00</substage>
|
940
|
+
</status>
|
941
|
+
<copyright>
|
942
|
+
<from>#{Date.today.year}</from>
|
943
|
+
<owner>
|
944
|
+
<organization>
|
945
|
+
<name>International Electrotechnical Commission</name>
|
946
|
+
<abbreviation>IEC</abbreviation>
|
947
|
+
</organization>
|
948
|
+
</owner>
|
949
|
+
</copyright>
|
950
|
+
<ext>
|
951
|
+
<doctype>article</doctype>
|
952
|
+
<horizontal>false</horizontal>
|
953
|
+
<editorialgroup>
|
954
|
+
<technical-committee/>
|
955
|
+
<subcommittee/>
|
956
|
+
<workgroup/>
|
957
|
+
</editorialgroup>
|
958
|
+
<structuredidentifier>
|
959
|
+
<project-number>IEC 1000</project-number>
|
960
|
+
</structuredidentifier>
|
961
|
+
<stagename>International standard</stagename>
|
962
|
+
</ext>
|
963
|
+
</bibdata>
|
964
|
+
#{boilerplate(Nokogiri::XML(BLANK_HDR + '</iec-standard>'))}
|
965
|
+
<sections/>
|
966
|
+
</iec-standard>
|
949
967
|
OUTPUT
|
968
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
969
|
+
.to be_equivalent_to xmlpp(output)
|
950
970
|
end
|
951
971
|
|
952
972
|
it "reads scripts into blank HTML document" do
|
953
973
|
FileUtils.rm_f "test.html"
|
954
|
-
Asciidoctor.convert(<<~"INPUT",
|
974
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
955
975
|
= Document title
|
956
976
|
Author
|
957
977
|
:docfile: test.adoc
|
@@ -965,7 +985,7 @@ RSpec.describe Asciidoctor::Iec do
|
|
965
985
|
|
966
986
|
it "uses default fonts" do
|
967
987
|
FileUtils.rm_f "test.html"
|
968
|
-
Asciidoctor.convert(<<~"INPUT",
|
988
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
969
989
|
= Document title
|
970
990
|
Author
|
971
991
|
:docfile: test.adoc
|
@@ -974,14 +994,17 @@ RSpec.describe Asciidoctor::Iec do
|
|
974
994
|
:no-pdf:
|
975
995
|
INPUT
|
976
996
|
html = File.read("test.html", encoding: "utf-8")
|
977
|
-
expect(html)
|
978
|
-
|
979
|
-
expect(html)
|
997
|
+
expect(html)
|
998
|
+
.to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
|
999
|
+
expect(html)
|
1000
|
+
.to match(%r[blockquote[^{]+\{[^{]+font-family: "Arial", sans-serif;]m)
|
1001
|
+
expect(html)
|
1002
|
+
.to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Arial", sans-serif;]m)
|
980
1003
|
end
|
981
1004
|
|
982
1005
|
it "uses Chinese fonts" do
|
983
1006
|
FileUtils.rm_f "test.html"
|
984
|
-
Asciidoctor.convert(<<~"INPUT",
|
1007
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
985
1008
|
= Document title
|
986
1009
|
Author
|
987
1010
|
:docfile: test.adoc
|
@@ -991,14 +1014,17 @@ RSpec.describe Asciidoctor::Iec do
|
|
991
1014
|
:no-pdf:
|
992
1015
|
INPUT
|
993
1016
|
html = File.read("test.html", encoding: "utf-8")
|
994
|
-
expect(html)
|
995
|
-
|
996
|
-
expect(html)
|
1017
|
+
expect(html)
|
1018
|
+
.to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
|
1019
|
+
expect(html)
|
1020
|
+
.to match(%r[blockquote[^{]+\{[^{]+font-family: "Source Han Sans", serif;]m)
|
1021
|
+
expect(html)
|
1022
|
+
.to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Source Han Sans", sans-serif;]m)
|
997
1023
|
end
|
998
1024
|
|
999
1025
|
it "uses specified fonts" do
|
1000
1026
|
FileUtils.rm_f "test.html"
|
1001
|
-
Asciidoctor.convert(<<~"INPUT",
|
1027
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1002
1028
|
= Document title
|
1003
1029
|
Author
|
1004
1030
|
:docfile: test.adoc
|
@@ -1012,14 +1038,15 @@ RSpec.describe Asciidoctor::Iec do
|
|
1012
1038
|
INPUT
|
1013
1039
|
html = File.read("test.html", encoding: "utf-8")
|
1014
1040
|
expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: Andale Mono;]m)
|
1015
|
-
expect(html)
|
1041
|
+
expect(html)
|
1042
|
+
.to match(%r[blockquote[^{]+\{[^{]+font-family: Zapf Chancery;]m)
|
1016
1043
|
expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: Comic Sans;]m)
|
1017
1044
|
end
|
1018
1045
|
|
1019
1046
|
it "strips MS-specific CSS" do
|
1020
1047
|
FileUtils.rm_f "test.html"
|
1021
1048
|
FileUtils.rm_f "test.doc"
|
1022
|
-
Asciidoctor.convert(<<~"INPUT",
|
1049
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1023
1050
|
= Document title
|
1024
1051
|
Author
|
1025
1052
|
:docfile: test.adoc
|