metanorma-nist 1.0.6 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +8 -0
- data/.github/workflows/ubuntu.yml +10 -0
- data/.github/workflows/windows.yml +8 -0
- data/README.adoc +22 -0
- data/lib/asciidoctor/nist/biblio.rng +36 -6
- data/lib/asciidoctor/nist/cleanup.rb +5 -4
- data/lib/asciidoctor/nist/converter.rb +19 -48
- data/lib/asciidoctor/nist/front.rb +1 -0
- data/lib/asciidoctor/nist/front_id.rb +73 -23
- data/lib/asciidoctor/nist/isodoc.rng +450 -4
- data/lib/asciidoctor/nist/reqt.rng +23 -0
- data/lib/isodoc/nist/base_convert.rb +66 -62
- data/lib/isodoc/nist/html/nist.scss +1 -1
- data/lib/isodoc/nist/html/nist_cswp.scss +1 -1
- data/lib/isodoc/nist/html/scripts.html +10 -7
- data/lib/isodoc/nist/html_convert.rb +29 -64
- data/lib/isodoc/nist/metadata.rb +0 -12
- data/lib/isodoc/nist/nist.cswp.xsl +192 -60
- data/lib/isodoc/nist/nist.sp.xsl +193 -61
- data/lib/isodoc/nist/pdf_convert.rb +4 -15
- data/lib/isodoc/nist/presentation_xml_convert.rb +10 -0
- data/lib/isodoc/nist/refs.rb +47 -3
- data/lib/isodoc/nist/section.rb +55 -0
- data/lib/isodoc/nist/word_convert.rb +2 -42
- data/lib/isodoc/nist/{xrefs.rb → xref.rb} +2 -23
- data/lib/metanorma-nist.rb +2 -0
- data/lib/metanorma/nist/processor.rb +13 -4
- data/lib/metanorma/nist/version.rb +1 -1
- data/metanorma-nist.gemspec +3 -2
- metadata +27 -13
- data/lib/isodoc/nist/html/scripts.pdf.html +0 -72
data/lib/isodoc/nist/nist.sp.xsl
CHANGED
@@ -2092,7 +2092,7 @@
|
|
2092
2092
|
</xsl:variable>
|
2093
2093
|
<fo:list-item>
|
2094
2094
|
<fo:list-item-label end-indent="label-end()">
|
2095
|
-
<fo:block>
|
2095
|
+
<fo:block display-align="center">
|
2096
2096
|
<xsl:choose>
|
2097
2097
|
<!-- <xsl:when test="local-name(..) = 'ul'">—</xsl:when>--> <!-- dash -->
|
2098
2098
|
<xsl:when test="local-name(..) = 'ul'">•</xsl:when>
|
@@ -2340,19 +2340,21 @@
|
|
2340
2340
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2341
2341
|
</xsl:if>
|
2342
2342
|
<xsl:text>[</xsl:text><xsl:value-of select="@citeas" disable-output-escaping="yes"/><xsl:text>]</xsl:text>
|
2343
|
-
|
2344
|
-
|
2345
|
-
|
2346
|
-
<xsl:when test="nist:locality/@type = 'section'">Section </xsl:when>
|
2347
|
-
<xsl:when test="nist:locality/@type = 'clause'">Clause </xsl:when>
|
2348
|
-
<xsl:otherwise/>
|
2349
|
-
</xsl:choose>
|
2350
|
-
<xsl:apply-templates select="nist:locality"/>
|
2351
|
-
</xsl:if>
|
2343
|
+
|
2344
|
+
<xsl:apply-templates select="nist:localityStack"/>
|
2345
|
+
|
2352
2346
|
</fo:basic-link>
|
2353
2347
|
<!-- </fo:inline> -->
|
2354
2348
|
</xsl:template>
|
2355
2349
|
|
2350
|
+
<xsl:template match="nist:locality">
|
2351
|
+
<xsl:choose>
|
2352
|
+
<xsl:when test="@type = 'section'">Section </xsl:when>
|
2353
|
+
<xsl:when test="@type = 'clause'">Clause </xsl:when>
|
2354
|
+
<xsl:otherwise/>
|
2355
|
+
</xsl:choose>
|
2356
|
+
<xsl:text> </xsl:text><xsl:value-of select="nist:referenceFrom"/>
|
2357
|
+
</xsl:template>
|
2356
2358
|
|
2357
2359
|
<xsl:template match="nist:terms[nist:term[nist:preferred and nist:definition]]">
|
2358
2360
|
<fo:block id="{@id}">
|
@@ -3599,11 +3601,14 @@
|
|
3599
3601
|
</xsl:if>
|
3600
3602
|
</xsl:template>
|
3601
3603
|
|
3602
|
-
<xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="linebreak" select="'
'"/><xsl:
|
3604
|
+
<xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="linebreak" select="'
'"/><xsl:attribute-set xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="link-style">
|
3605
|
+
|
3606
|
+
|
3607
|
+
</xsl:attribute-set><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="text()">
|
3603
3608
|
<xsl:value-of select="."/>
|
3604
3609
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='br']">
|
3605
3610
|
<xsl:value-of select="$linebreak"/>
|
3606
|
-
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='td']//text() | *[local-name()='th']//text()" priority="1">
|
3611
|
+
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
3607
3612
|
<xsl:call-template name="add-zero-spaces"/>
|
3608
3613
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']">
|
3609
3614
|
|
@@ -3619,6 +3624,9 @@
|
|
3619
3624
|
|
3620
3625
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
3621
3626
|
|
3627
|
+
<!-- <xsl:if test="$namespace = 'iso'">
|
3628
|
+
<fo:block space-before="6pt"> </fo:block>
|
3629
|
+
</xsl:if> -->
|
3622
3630
|
|
3623
3631
|
<xsl:choose>
|
3624
3632
|
<xsl:when test="@unnumbered = 'true'"/>
|
@@ -3628,12 +3636,15 @@
|
|
3628
3636
|
|
3629
3637
|
<fo:block font-weight="bold" text-align="center" margin-bottom="6pt" keep-with-next="always">
|
3630
3638
|
|
3639
|
+
|
3640
|
+
|
3631
3641
|
<xsl:attribute name="font-family">Arial</xsl:attribute>
|
3632
3642
|
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
3633
3643
|
|
3634
3644
|
|
3635
3645
|
|
3636
3646
|
|
3647
|
+
|
3637
3648
|
<xsl:text>Table </xsl:text>
|
3638
3649
|
<xsl:choose>
|
3639
3650
|
<xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
|
@@ -3643,6 +3654,8 @@
|
|
3643
3654
|
|
3644
3655
|
|
3645
3656
|
|
3657
|
+
|
3658
|
+
|
3646
3659
|
<xsl:variable name="annex-id" select="ancestor::*[local-name()='annex']/@id"/>
|
3647
3660
|
<xsl:number format="A-" count="*[local-name()='annex']"/>
|
3648
3661
|
<xsl:number format="1" level="any" count="*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true'][ancestor::*[local-name()='annex'][@id = $annex-id]]"/>
|
@@ -3652,10 +3665,11 @@
|
|
3652
3665
|
|
3653
3666
|
</xsl:when>
|
3654
3667
|
<xsl:otherwise>
|
3655
|
-
|
3656
|
-
|
3657
|
-
|
3658
|
-
|
3668
|
+
|
3669
|
+
|
3670
|
+
<xsl:number format="A." count="*[local-name()='annex']"/>
|
3671
|
+
<xsl:number format="1" level="any" count="//*[local-name()='table'] [not(ancestor::*[local-name()='annex']) and not(ancestor::*[local-name()='executivesummary']) and not(ancestor::*[local-name()='bibdata'])] [not(@unnumbered) or @unnumbered != 'true']"/>
|
3672
|
+
|
3659
3673
|
</xsl:otherwise>
|
3660
3674
|
</xsl:choose>
|
3661
3675
|
<xsl:if test="*[local-name()='name']">
|
@@ -3700,11 +3714,11 @@
|
|
3700
3714
|
</xsl:call-template>
|
3701
3715
|
</xsl:variable>
|
3702
3716
|
|
3703
|
-
<xsl:variable name="colwidths2">
|
3717
|
+
<!-- <xsl:variable name="colwidths2">
|
3704
3718
|
<xsl:call-template name="calculate-column-widths">
|
3705
3719
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3706
3720
|
</xsl:call-template>
|
3707
|
-
</xsl:variable>
|
3721
|
+
</xsl:variable> -->
|
3708
3722
|
|
3709
3723
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
3710
3724
|
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
@@ -3725,7 +3739,11 @@
|
|
3725
3739
|
|
3726
3740
|
|
3727
3741
|
|
3728
|
-
|
3742
|
+
|
3743
|
+
|
3744
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
|
3745
|
+
|
3746
|
+
|
3729
3747
|
|
3730
3748
|
|
3731
3749
|
|
@@ -3756,6 +3774,9 @@
|
|
3756
3774
|
</xsl:for-each>
|
3757
3775
|
<xsl:apply-templates/>
|
3758
3776
|
</fo:table>
|
3777
|
+
|
3778
|
+
|
3779
|
+
|
3759
3780
|
</fo:block-container>
|
3760
3781
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']/*[local-name()='name']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']/*[local-name()='name']" mode="process">
|
3761
3782
|
<xsl:apply-templates/>
|
@@ -3809,9 +3830,13 @@
|
|
3809
3830
|
</xsl:when>
|
3810
3831
|
<xsl:otherwise>
|
3811
3832
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
3833
|
+
<xsl:variable name="td_text">
|
3834
|
+
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
3835
|
+
</xsl:variable>
|
3812
3836
|
<xsl:variable name="words">
|
3813
3837
|
<xsl:call-template name="tokenize">
|
3814
|
-
<xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/>
|
3838
|
+
<!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
|
3839
|
+
<xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/>
|
3815
3840
|
</xsl:call-template>
|
3816
3841
|
</xsl:variable>
|
3817
3842
|
<xsl:variable name="max_length">
|
@@ -3852,51 +3877,82 @@
|
|
3852
3877
|
<xsl:with-param name="table" select="$table"/>
|
3853
3878
|
</xsl:call-template>
|
3854
3879
|
</xsl:if>
|
3880
|
+
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="text()" mode="td_text">
|
3881
|
+
<xsl:variable name="zero-space"></xsl:variable>
|
3882
|
+
<xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
|
3855
3883
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table2']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='thead']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='thead']" mode="process">
|
3856
|
-
<!--
|
3857
|
-
|
3858
|
-
|
3859
|
-
|
3884
|
+
<!-- font-weight="bold" -->
|
3885
|
+
<fo:table-header>
|
3886
|
+
<xsl:apply-templates/>
|
3887
|
+
</fo:table-header>
|
3860
3888
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tfoot']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tfoot']" mode="process">
|
3861
3889
|
<xsl:apply-templates/>
|
3890
|
+
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="insertTableFooter">
|
3891
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3892
|
+
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
3893
|
+
|
3894
|
+
<fo:table-footer>
|
3895
|
+
|
3896
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
3897
|
+
|
3898
|
+
<!-- if there are note(s) or fn(s) then create footer row -->
|
3899
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3900
|
+
|
3901
|
+
<xsl:variable name="cols-count">
|
3902
|
+
<xsl:choose>
|
3903
|
+
<xsl:when test="../*[local-name()='thead']">
|
3904
|
+
<!-- <xsl:value-of select="count(../*[local-name()='thead']/*[local-name()='tr']/*[local-name()='th'])"/> -->
|
3905
|
+
<xsl:call-template name="calculate-columns-numbers">
|
3906
|
+
<xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
3907
|
+
</xsl:call-template>
|
3908
|
+
</xsl:when>
|
3909
|
+
<xsl:otherwise>
|
3910
|
+
<!-- <xsl:value-of select="count(./*[local-name()='tr'][1]/*[local-name()='td'])"/> -->
|
3911
|
+
<xsl:call-template name="calculate-columns-numbers">
|
3912
|
+
<xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
|
3913
|
+
</xsl:call-template>
|
3914
|
+
</xsl:otherwise>
|
3915
|
+
</xsl:choose>
|
3916
|
+
</xsl:variable>
|
3917
|
+
|
3918
|
+
<fo:table-row>
|
3919
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
3920
|
+
|
3921
|
+
|
3922
|
+
|
3923
|
+
<!-- fn will be processed inside 'note' processing -->
|
3924
|
+
|
3925
|
+
|
3926
|
+
<!-- except gb -->
|
3927
|
+
|
3928
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3929
|
+
|
3930
|
+
|
3931
|
+
<!-- horizontal row separator -->
|
3932
|
+
|
3933
|
+
|
3934
|
+
<!-- fn processing -->
|
3935
|
+
<xsl:call-template name="fn_display"/>
|
3936
|
+
|
3937
|
+
</fo:table-cell>
|
3938
|
+
</fo:table-row>
|
3939
|
+
|
3940
|
+
</xsl:if>
|
3941
|
+
</fo:table-footer>
|
3942
|
+
|
3943
|
+
</xsl:if>
|
3862
3944
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tbody']">
|
3863
|
-
|
3864
|
-
|
3865
|
-
|
3866
|
-
|
3867
|
-
|
3868
|
-
<xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
3869
|
-
</xsl:call-template>
|
3870
|
-
</xsl:when>
|
3871
|
-
<xsl:otherwise>
|
3872
|
-
<!-- <xsl:value-of select="count(./*[local-name()='tr'][1]/*[local-name()='td'])"/> -->
|
3873
|
-
<xsl:call-template name="calculate-columns-numbers">
|
3874
|
-
<xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
|
3875
|
-
</xsl:call-template>
|
3876
|
-
</xsl:otherwise>
|
3877
|
-
</xsl:choose>
|
3878
|
-
</xsl:variable>
|
3879
|
-
|
3945
|
+
|
3946
|
+
<xsl:apply-templates select="../*[local-name()='thead']" mode="process"/>
|
3947
|
+
|
3948
|
+
<xsl:call-template name="insertTableFooter"/>
|
3949
|
+
|
3880
3950
|
<fo:table-body>
|
3881
|
-
<xsl:apply-templates select="../*[local-name()='thead']" mode="process"/>
|
3882
3951
|
<xsl:apply-templates/>
|
3883
|
-
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
3884
|
-
|
3885
|
-
<xsl:if test="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']">
|
3886
|
-
<fo:table-row>
|
3887
|
-
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
3888
|
-
|
3889
|
-
|
3890
|
-
<!-- fn will be processed inside 'note' processing -->
|
3891
|
-
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3892
|
-
<!-- fn processing -->
|
3893
|
-
<xsl:call-template name="fn_display"/>
|
3894
|
-
|
3895
|
-
</fo:table-cell>
|
3896
|
-
</fo:table-row>
|
3897
|
-
|
3898
|
-
</xsl:if>
|
3952
|
+
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
3953
|
+
|
3899
3954
|
</fo:table-body>
|
3955
|
+
|
3900
3956
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tr']">
|
3901
3957
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
3902
3958
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
@@ -3910,11 +3966,14 @@
|
|
3910
3966
|
|
3911
3967
|
|
3912
3968
|
|
3969
|
+
|
3913
3970
|
</xsl:if>
|
3914
3971
|
<xsl:if test="$parent-name = 'tfoot'">
|
3915
3972
|
|
3973
|
+
|
3916
3974
|
</xsl:if>
|
3917
3975
|
|
3976
|
+
|
3918
3977
|
<xsl:apply-templates/>
|
3919
3978
|
</fo:table-row>
|
3920
3979
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='th']">
|
@@ -3922,6 +3981,7 @@
|
|
3922
3981
|
|
3923
3982
|
|
3924
3983
|
|
3984
|
+
|
3925
3985
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
3926
3986
|
<xsl:attribute name="background-color">black</xsl:attribute>
|
3927
3987
|
<xsl:attribute name="color">white</xsl:attribute>
|
@@ -3951,6 +4011,9 @@
|
|
3951
4011
|
|
3952
4012
|
|
3953
4013
|
|
4014
|
+
|
4015
|
+
|
4016
|
+
|
3954
4017
|
<xsl:if test="ancestor::*[local-name()='thead']">
|
3955
4018
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
3956
4019
|
</xsl:if>
|
@@ -3986,10 +4049,14 @@
|
|
3986
4049
|
|
3987
4050
|
<fo:block font-size="10pt" margin-bottom="12pt">
|
3988
4051
|
|
4052
|
+
|
4053
|
+
|
3989
4054
|
<fo:inline padding-right="2mm">
|
4055
|
+
|
3990
4056
|
<xsl:text>NOTE </xsl:text>
|
3991
4057
|
|
3992
4058
|
|
4059
|
+
|
3993
4060
|
<xsl:number format="1 "/>
|
3994
4061
|
|
3995
4062
|
</fo:inline>
|
@@ -4013,6 +4080,8 @@
|
|
4013
4080
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
4014
4081
|
<fo:block margin-bottom="12pt">
|
4015
4082
|
|
4083
|
+
|
4084
|
+
|
4016
4085
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
4017
4086
|
|
4018
4087
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -4020,6 +4089,8 @@
|
|
4020
4089
|
|
4021
4090
|
|
4022
4091
|
|
4092
|
+
|
4093
|
+
|
4023
4094
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
4024
4095
|
|
4025
4096
|
<xsl:value-of select="@reference"/>
|
@@ -4066,6 +4137,7 @@
|
|
4066
4137
|
<fo:table width="95%" table-layout="fixed">
|
4067
4138
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
4068
4139
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
4140
|
+
|
4069
4141
|
</xsl:if>
|
4070
4142
|
<fo:table-column column-width="15%"/>
|
4071
4143
|
<fo:table-column column-width="85%"/>
|
@@ -4105,6 +4177,7 @@
|
|
4105
4177
|
<fo:inline font-size="80%" keep-with-previous.within-line="always">
|
4106
4178
|
|
4107
4179
|
|
4180
|
+
|
4108
4181
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
4109
4182
|
<xsl:attribute name="color">blue</xsl:attribute>
|
4110
4183
|
|
@@ -4132,7 +4205,7 @@
|
|
4132
4205
|
|
4133
4206
|
|
4134
4207
|
<fo:block margin-bottom="12pt" text-align="left">
|
4135
|
-
|
4208
|
+
|
4136
4209
|
<xsl:text>where </xsl:text>
|
4137
4210
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
4138
4211
|
<xsl:text/>
|
@@ -4145,12 +4218,15 @@
|
|
4145
4218
|
|
4146
4219
|
|
4147
4220
|
|
4221
|
+
|
4148
4222
|
<xsl:text>where</xsl:text>
|
4149
4223
|
</fo:block>
|
4150
4224
|
</xsl:when>
|
4151
4225
|
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
4152
4226
|
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt">
|
4153
4227
|
|
4228
|
+
|
4229
|
+
|
4154
4230
|
<xsl:text>Key</xsl:text>
|
4155
4231
|
</fo:block>
|
4156
4232
|
</xsl:when>
|
@@ -4166,13 +4242,13 @@
|
|
4166
4242
|
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
4167
4243
|
</xsl:if>
|
4168
4244
|
|
4169
|
-
|
4170
4245
|
<fo:block>
|
4171
4246
|
|
4172
4247
|
<xsl:if test="not(.//*[local-name()='dt']//*[local-name()='stem'])">
|
4173
4248
|
<xsl:attribute name="margin-left">-2.5mm</xsl:attribute>
|
4174
4249
|
</xsl:if>
|
4175
4250
|
|
4251
|
+
|
4176
4252
|
<!-- create virtual html table for dl/[dt and dd] -->
|
4177
4253
|
<xsl:variable name="html-table">
|
4178
4254
|
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
@@ -4192,12 +4268,14 @@
|
|
4192
4268
|
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
4193
4269
|
|
4194
4270
|
<fo:table width="95%" table-layout="fixed">
|
4271
|
+
|
4195
4272
|
<xsl:choose>
|
4196
4273
|
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
4197
4274
|
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
4198
4275
|
</xsl:when>
|
4199
4276
|
<xsl:when test="normalize-space($key_iso) = 'true'">
|
4200
4277
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
4278
|
+
|
4201
4279
|
</xsl:when>
|
4202
4280
|
</xsl:choose>
|
4203
4281
|
<xsl:choose>
|
@@ -4302,6 +4380,8 @@
|
|
4302
4380
|
<fo:table-row>
|
4303
4381
|
<fo:table-cell>
|
4304
4382
|
<fo:block margin-top="6pt">
|
4383
|
+
|
4384
|
+
|
4305
4385
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
4306
4386
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
4307
4387
|
|
@@ -4312,6 +4392,7 @@
|
|
4312
4392
|
|
4313
4393
|
|
4314
4394
|
<xsl:apply-templates/>
|
4395
|
+
|
4315
4396
|
</fo:block>
|
4316
4397
|
</fo:table-cell>
|
4317
4398
|
<fo:table-cell>
|
@@ -4350,7 +4431,7 @@
|
|
4350
4431
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']" mode="process">
|
4351
4432
|
<xsl:apply-templates/>
|
4352
4433
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
4353
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
4434
|
+
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
4354
4435
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='em']">
|
4355
4436
|
<fo:inline font-style="italic">
|
4356
4437
|
<xsl:apply-templates/>
|
@@ -4465,6 +4546,7 @@
|
|
4465
4546
|
<xsl:variable name="zero-space-after-dot">.</xsl:variable>
|
4466
4547
|
<xsl:variable name="zero-space-after-colon">:</xsl:variable>
|
4467
4548
|
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
4549
|
+
<xsl:variable name="zero-space-after-underscore">_</xsl:variable>
|
4468
4550
|
<xsl:variable name="zero-space"></xsl:variable>
|
4469
4551
|
<xsl:choose>
|
4470
4552
|
<xsl:when test="contains($text, $zero-space-after-chars)">
|
@@ -4499,6 +4581,14 @@
|
|
4499
4581
|
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
|
4500
4582
|
</xsl:call-template>
|
4501
4583
|
</xsl:when>
|
4584
|
+
<xsl:when test="contains($text, $zero-space-after-underscore)">
|
4585
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-underscore)"/>
|
4586
|
+
<xsl:value-of select="$zero-space-after-underscore"/>
|
4587
|
+
<xsl:value-of select="$zero-space"/>
|
4588
|
+
<xsl:call-template name="add-zero-spaces">
|
4589
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-underscore)"/>
|
4590
|
+
</xsl:call-template>
|
4591
|
+
</xsl:when>
|
4502
4592
|
<xsl:otherwise>
|
4503
4593
|
<xsl:value-of select="$text"/>
|
4504
4594
|
</xsl:otherwise>
|
@@ -4669,4 +4759,46 @@
|
|
4669
4759
|
<xsl:value-of select="substring($str2, 2)"/>
|
4670
4760
|
</xsl:otherwise>
|
4671
4761
|
</xsl:choose>
|
4762
|
+
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="mathml:math">
|
4763
|
+
<fo:inline font-family="STIX2Math">
|
4764
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
4765
|
+
<xsl:copy-of select="."/>
|
4766
|
+
</fo:instream-foreign-object>
|
4767
|
+
</fo:inline>
|
4768
|
+
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='localityStack']">
|
4769
|
+
<xsl:for-each select="*[local-name()='locality']">
|
4770
|
+
<xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
|
4771
|
+
<xsl:apply-templates select="."/>
|
4772
|
+
<xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
|
4773
|
+
</xsl:for-each>
|
4774
|
+
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='link']" name="link">
|
4775
|
+
<xsl:variable name="target">
|
4776
|
+
<xsl:choose>
|
4777
|
+
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
4778
|
+
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
4779
|
+
</xsl:when>
|
4780
|
+
<xsl:otherwise>
|
4781
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
4782
|
+
</xsl:otherwise>
|
4783
|
+
</xsl:choose>
|
4784
|
+
</xsl:variable>
|
4785
|
+
<fo:inline xsl:use-attribute-sets="link-style">
|
4786
|
+
<xsl:choose>
|
4787
|
+
<xsl:when test="$target = ''">
|
4788
|
+
<xsl:apply-templates/>
|
4789
|
+
</xsl:when>
|
4790
|
+
<xsl:otherwise>
|
4791
|
+
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
4792
|
+
<xsl:choose>
|
4793
|
+
<xsl:when test="normalize-space(.) = ''">
|
4794
|
+
<xsl:value-of select="$target"/>
|
4795
|
+
</xsl:when>
|
4796
|
+
<xsl:otherwise>
|
4797
|
+
<xsl:apply-templates/>
|
4798
|
+
</xsl:otherwise>
|
4799
|
+
</xsl:choose>
|
4800
|
+
</fo:basic-link>
|
4801
|
+
</xsl:otherwise>
|
4802
|
+
</xsl:choose>
|
4803
|
+
</fo:inline>
|
4672
4804
|
</xsl:template></xsl:stylesheet>
|