metanorma-itu 2.3.1 → 2.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b485ec959d83220ae57c71e774e12136e823013c8c5ba41042a56fa03d477496
4
- data.tar.gz: 7467e85568f8ffa7d421bed9a1213c2b3c86e2ac210868bd37f99c449aab8980
3
+ metadata.gz: 89153ccca8d96bb635d80f3c5cdf1cd624a830eb7cf438e40ad3fb79d345e833
4
+ data.tar.gz: 0ac5aa2db96f8d8195c8c376b247b231c918b5f2f48d901e0d7cea48fdf53eb3
5
5
  SHA512:
6
- metadata.gz: 613b74c11bd22d589f90f020d7bd848fa6e9e9a1b89c08f9b12f7e4084013970537508119c36c33e2f2c87135e7f060a143e21487d8a5d34cf39b56f95dab226
7
- data.tar.gz: 1fab3d12d67a9a5f6c7f84706d935cc60096b0dc0db24ccfb2ae07767a4a5f27ba4201584983ecbaa6c12f0e5b88cdb4a152640b9121cc63179d343a6782d229
6
+ metadata.gz: 56384d0dd8b0bb6311a28576cdcb77ff9af449921b8603e55a353ba570a6c874fa9da03fe16c8b1e7b294c165fa766ab542657a76bc0578955471e76d0461cf7
7
+ data.tar.gz: 4a4c3c5d75c9cbebba0ccf314ad045f048cc0a3e3e8d53b707b948f4b13fd923fe028aaae441d2136b732690818ee342f565440617a7fbbe03d311197cbec727
@@ -596,7 +596,9 @@
596
596
  <xsl:call-template name="setWritingMode"/>
597
597
  <fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
598
598
  <fo:block>
599
- <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
599
+ <xsl:variable name="docidentifier_left_part" select="normalize-space(substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' '))"/>
600
+ <xsl:value-of select="$docidentifier_left_part"/>
601
+ <xsl:if test="$docidentifier_left_part = ''"><xsl:text>ITU-T</xsl:text></xsl:if>
600
602
  </fo:block>
601
603
  </fo:block>
602
604
  </fo:block-container>
@@ -917,9 +919,12 @@
917
919
  </xsl:call-template>
918
920
  <xsl:text> </xsl:text>
919
921
  </xsl:if>
920
- <xsl:value-of select="$doctypeTitle"/>
921
- <xsl:text>  </xsl:text>
922
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
922
+ <xsl:variable name="identifier" select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
923
+ <xsl:if test="$identifier != ''">
924
+ <xsl:value-of select="$doctypeTitle"/>
925
+ <xsl:text>  </xsl:text>
926
+ <xsl:value-of select="$identifier"/>
927
+ </xsl:if>
923
928
  </xsl:when>
924
929
  <xsl:when test="$doctype = 'implementers-guide'"/>
925
930
  <xsl:when test="$doctype = 'resolution'"/>
@@ -929,15 +934,22 @@
929
934
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
930
935
  </xsl:when>
931
936
  <xsl:otherwise>
932
- <xsl:value-of select="$doctypeTitle"/>
933
- <xsl:text>  </xsl:text>
934
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
935
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
936
- <xsl:text>-</xsl:text>
937
+ <xsl:variable name="identifier">
938
+ <xsl:text>  </xsl:text>
939
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
940
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
941
+ <xsl:text>-</xsl:text>
942
+ </xsl:if>
943
+ <xsl:if test="$doctype != 'recommendation'">
944
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
945
+ <xsl:text>  </xsl:text>
946
+ </xsl:if>
947
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
948
+ </xsl:variable>
949
+ <xsl:if test="normalize-space(translate($identifier, ' ', '')) != ''">
950
+ <xsl:value-of select="$doctypeTitle"/>
951
+ <xsl:value-of select="$identifier"/>
937
952
  </xsl:if>
938
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
939
- <xsl:text>  </xsl:text>
940
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
941
953
  </xsl:otherwise>
942
954
  </xsl:choose>
943
955
 
@@ -596,7 +596,9 @@
596
596
  <xsl:call-template name="setWritingMode"/>
597
597
  <fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
598
598
  <fo:block>
599
- <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
599
+ <xsl:variable name="docidentifier_left_part" select="normalize-space(substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' '))"/>
600
+ <xsl:value-of select="$docidentifier_left_part"/>
601
+ <xsl:if test="$docidentifier_left_part = ''"><xsl:text>ITU-T</xsl:text></xsl:if>
600
602
  </fo:block>
601
603
  </fo:block>
602
604
  </fo:block-container>
@@ -917,9 +919,12 @@
917
919
  </xsl:call-template>
918
920
  <xsl:text> </xsl:text>
919
921
  </xsl:if>
920
- <xsl:value-of select="$doctypeTitle"/>
921
- <xsl:text>  </xsl:text>
922
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
922
+ <xsl:variable name="identifier" select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
923
+ <xsl:if test="$identifier != ''">
924
+ <xsl:value-of select="$doctypeTitle"/>
925
+ <xsl:text>  </xsl:text>
926
+ <xsl:value-of select="$identifier"/>
927
+ </xsl:if>
923
928
  </xsl:when>
924
929
  <xsl:when test="$doctype = 'implementers-guide'"/>
925
930
  <xsl:when test="$doctype = 'resolution'"/>
@@ -929,15 +934,22 @@
929
934
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
930
935
  </xsl:when>
931
936
  <xsl:otherwise>
932
- <xsl:value-of select="$doctypeTitle"/>
933
- <xsl:text>  </xsl:text>
934
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
935
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
936
- <xsl:text>-</xsl:text>
937
+ <xsl:variable name="identifier">
938
+ <xsl:text>  </xsl:text>
939
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
940
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
941
+ <xsl:text>-</xsl:text>
942
+ </xsl:if>
943
+ <xsl:if test="$doctype != 'recommendation'">
944
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
945
+ <xsl:text>  </xsl:text>
946
+ </xsl:if>
947
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
948
+ </xsl:variable>
949
+ <xsl:if test="normalize-space(translate($identifier, ' ', '')) != ''">
950
+ <xsl:value-of select="$doctypeTitle"/>
951
+ <xsl:value-of select="$identifier"/>
937
952
  </xsl:if>
938
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
939
- <xsl:text>  </xsl:text>
940
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
941
953
  </xsl:otherwise>
942
954
  </xsl:choose>
943
955
 
@@ -596,7 +596,9 @@
596
596
  <xsl:call-template name="setWritingMode"/>
597
597
  <fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
598
598
  <fo:block>
599
- <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
599
+ <xsl:variable name="docidentifier_left_part" select="normalize-space(substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' '))"/>
600
+ <xsl:value-of select="$docidentifier_left_part"/>
601
+ <xsl:if test="$docidentifier_left_part = ''"><xsl:text>ITU-T</xsl:text></xsl:if>
600
602
  </fo:block>
601
603
  </fo:block>
602
604
  </fo:block-container>
@@ -917,9 +919,12 @@
917
919
  </xsl:call-template>
918
920
  <xsl:text> </xsl:text>
919
921
  </xsl:if>
920
- <xsl:value-of select="$doctypeTitle"/>
921
- <xsl:text>  </xsl:text>
922
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
922
+ <xsl:variable name="identifier" select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
923
+ <xsl:if test="$identifier != ''">
924
+ <xsl:value-of select="$doctypeTitle"/>
925
+ <xsl:text>  </xsl:text>
926
+ <xsl:value-of select="$identifier"/>
927
+ </xsl:if>
923
928
  </xsl:when>
924
929
  <xsl:when test="$doctype = 'implementers-guide'"/>
925
930
  <xsl:when test="$doctype = 'resolution'"/>
@@ -929,15 +934,22 @@
929
934
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
930
935
  </xsl:when>
931
936
  <xsl:otherwise>
932
- <xsl:value-of select="$doctypeTitle"/>
933
- <xsl:text>  </xsl:text>
934
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
935
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
936
- <xsl:text>-</xsl:text>
937
+ <xsl:variable name="identifier">
938
+ <xsl:text>  </xsl:text>
939
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
940
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
941
+ <xsl:text>-</xsl:text>
942
+ </xsl:if>
943
+ <xsl:if test="$doctype != 'recommendation'">
944
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
945
+ <xsl:text>  </xsl:text>
946
+ </xsl:if>
947
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
948
+ </xsl:variable>
949
+ <xsl:if test="normalize-space(translate($identifier, ' ', '')) != ''">
950
+ <xsl:value-of select="$doctypeTitle"/>
951
+ <xsl:value-of select="$identifier"/>
937
952
  </xsl:if>
938
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
939
- <xsl:text>  </xsl:text>
940
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
941
953
  </xsl:otherwise>
942
954
  </xsl:choose>
943
955
 
@@ -596,7 +596,9 @@
596
596
  <xsl:call-template name="setWritingMode"/>
597
597
  <fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
598
598
  <fo:block>
599
- <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
599
+ <xsl:variable name="docidentifier_left_part" select="normalize-space(substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' '))"/>
600
+ <xsl:value-of select="$docidentifier_left_part"/>
601
+ <xsl:if test="$docidentifier_left_part = ''"><xsl:text>ITU-T</xsl:text></xsl:if>
600
602
  </fo:block>
601
603
  </fo:block>
602
604
  </fo:block-container>
@@ -917,9 +919,12 @@
917
919
  </xsl:call-template>
918
920
  <xsl:text> </xsl:text>
919
921
  </xsl:if>
920
- <xsl:value-of select="$doctypeTitle"/>
921
- <xsl:text>  </xsl:text>
922
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
922
+ <xsl:variable name="identifier" select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
923
+ <xsl:if test="$identifier != ''">
924
+ <xsl:value-of select="$doctypeTitle"/>
925
+ <xsl:text>  </xsl:text>
926
+ <xsl:value-of select="$identifier"/>
927
+ </xsl:if>
923
928
  </xsl:when>
924
929
  <xsl:when test="$doctype = 'implementers-guide'"/>
925
930
  <xsl:when test="$doctype = 'resolution'"/>
@@ -929,15 +934,22 @@
929
934
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
930
935
  </xsl:when>
931
936
  <xsl:otherwise>
932
- <xsl:value-of select="$doctypeTitle"/>
933
- <xsl:text>  </xsl:text>
934
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
935
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
936
- <xsl:text>-</xsl:text>
937
+ <xsl:variable name="identifier">
938
+ <xsl:text>  </xsl:text>
939
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
940
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
941
+ <xsl:text>-</xsl:text>
942
+ </xsl:if>
943
+ <xsl:if test="$doctype != 'recommendation'">
944
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
945
+ <xsl:text>  </xsl:text>
946
+ </xsl:if>
947
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
948
+ </xsl:variable>
949
+ <xsl:if test="normalize-space(translate($identifier, ' ', '')) != ''">
950
+ <xsl:value-of select="$doctypeTitle"/>
951
+ <xsl:value-of select="$identifier"/>
937
952
  </xsl:if>
938
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
939
- <xsl:text>  </xsl:text>
940
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
941
953
  </xsl:otherwise>
942
954
  </xsl:choose>
943
955
 
@@ -596,7 +596,9 @@
596
596
  <xsl:call-template name="setWritingMode"/>
597
597
  <fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
598
598
  <fo:block>
599
- <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
599
+ <xsl:variable name="docidentifier_left_part" select="normalize-space(substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' '))"/>
600
+ <xsl:value-of select="$docidentifier_left_part"/>
601
+ <xsl:if test="$docidentifier_left_part = ''"><xsl:text>ITU-T</xsl:text></xsl:if>
600
602
  </fo:block>
601
603
  </fo:block>
602
604
  </fo:block-container>
@@ -917,9 +919,12 @@
917
919
  </xsl:call-template>
918
920
  <xsl:text> </xsl:text>
919
921
  </xsl:if>
920
- <xsl:value-of select="$doctypeTitle"/>
921
- <xsl:text>  </xsl:text>
922
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
922
+ <xsl:variable name="identifier" select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
923
+ <xsl:if test="$identifier != ''">
924
+ <xsl:value-of select="$doctypeTitle"/>
925
+ <xsl:text>  </xsl:text>
926
+ <xsl:value-of select="$identifier"/>
927
+ </xsl:if>
923
928
  </xsl:when>
924
929
  <xsl:when test="$doctype = 'implementers-guide'"/>
925
930
  <xsl:when test="$doctype = 'resolution'"/>
@@ -929,15 +934,22 @@
929
934
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
930
935
  </xsl:when>
931
936
  <xsl:otherwise>
932
- <xsl:value-of select="$doctypeTitle"/>
933
- <xsl:text>  </xsl:text>
934
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
935
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
936
- <xsl:text>-</xsl:text>
937
+ <xsl:variable name="identifier">
938
+ <xsl:text>  </xsl:text>
939
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
940
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
941
+ <xsl:text>-</xsl:text>
942
+ </xsl:if>
943
+ <xsl:if test="$doctype != 'recommendation'">
944
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
945
+ <xsl:text>  </xsl:text>
946
+ </xsl:if>
947
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
948
+ </xsl:variable>
949
+ <xsl:if test="normalize-space(translate($identifier, ' ', '')) != ''">
950
+ <xsl:value-of select="$doctypeTitle"/>
951
+ <xsl:value-of select="$identifier"/>
937
952
  </xsl:if>
938
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
939
- <xsl:text>  </xsl:text>
940
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
941
953
  </xsl:otherwise>
942
954
  </xsl:choose>
943
955
 
@@ -596,7 +596,9 @@
596
596
  <xsl:call-template name="setWritingMode"/>
597
597
  <fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
598
598
  <fo:block>
599
- <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
599
+ <xsl:variable name="docidentifier_left_part" select="normalize-space(substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' '))"/>
600
+ <xsl:value-of select="$docidentifier_left_part"/>
601
+ <xsl:if test="$docidentifier_left_part = ''"><xsl:text>ITU-T</xsl:text></xsl:if>
600
602
  </fo:block>
601
603
  </fo:block>
602
604
  </fo:block-container>
@@ -917,9 +919,12 @@
917
919
  </xsl:call-template>
918
920
  <xsl:text> </xsl:text>
919
921
  </xsl:if>
920
- <xsl:value-of select="$doctypeTitle"/>
921
- <xsl:text>  </xsl:text>
922
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
922
+ <xsl:variable name="identifier" select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
923
+ <xsl:if test="$identifier != ''">
924
+ <xsl:value-of select="$doctypeTitle"/>
925
+ <xsl:text>  </xsl:text>
926
+ <xsl:value-of select="$identifier"/>
927
+ </xsl:if>
923
928
  </xsl:when>
924
929
  <xsl:when test="$doctype = 'implementers-guide'"/>
925
930
  <xsl:when test="$doctype = 'resolution'"/>
@@ -929,15 +934,22 @@
929
934
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
930
935
  </xsl:when>
931
936
  <xsl:otherwise>
932
- <xsl:value-of select="$doctypeTitle"/>
933
- <xsl:text>  </xsl:text>
934
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
935
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
936
- <xsl:text>-</xsl:text>
937
+ <xsl:variable name="identifier">
938
+ <xsl:text>  </xsl:text>
939
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
940
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
941
+ <xsl:text>-</xsl:text>
942
+ </xsl:if>
943
+ <xsl:if test="$doctype != 'recommendation'">
944
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
945
+ <xsl:text>  </xsl:text>
946
+ </xsl:if>
947
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
948
+ </xsl:variable>
949
+ <xsl:if test="normalize-space(translate($identifier, ' ', '')) != ''">
950
+ <xsl:value-of select="$doctypeTitle"/>
951
+ <xsl:value-of select="$identifier"/>
937
952
  </xsl:if>
938
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
939
- <xsl:text>  </xsl:text>
940
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
941
953
  </xsl:otherwise>
942
954
  </xsl:choose>
943
955
 
@@ -596,7 +596,9 @@
596
596
  <xsl:call-template name="setWritingMode"/>
597
597
  <fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
598
598
  <fo:block>
599
- <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
599
+ <xsl:variable name="docidentifier_left_part" select="normalize-space(substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' '))"/>
600
+ <xsl:value-of select="$docidentifier_left_part"/>
601
+ <xsl:if test="$docidentifier_left_part = ''"><xsl:text>ITU-T</xsl:text></xsl:if>
600
602
  </fo:block>
601
603
  </fo:block>
602
604
  </fo:block-container>
@@ -917,9 +919,12 @@
917
919
  </xsl:call-template>
918
920
  <xsl:text> </xsl:text>
919
921
  </xsl:if>
920
- <xsl:value-of select="$doctypeTitle"/>
921
- <xsl:text>  </xsl:text>
922
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
922
+ <xsl:variable name="identifier" select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
923
+ <xsl:if test="$identifier != ''">
924
+ <xsl:value-of select="$doctypeTitle"/>
925
+ <xsl:text>  </xsl:text>
926
+ <xsl:value-of select="$identifier"/>
927
+ </xsl:if>
923
928
  </xsl:when>
924
929
  <xsl:when test="$doctype = 'implementers-guide'"/>
925
930
  <xsl:when test="$doctype = 'resolution'"/>
@@ -929,15 +934,22 @@
929
934
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
930
935
  </xsl:when>
931
936
  <xsl:otherwise>
932
- <xsl:value-of select="$doctypeTitle"/>
933
- <xsl:text>  </xsl:text>
934
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
935
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
936
- <xsl:text>-</xsl:text>
937
+ <xsl:variable name="identifier">
938
+ <xsl:text>  </xsl:text>
939
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
940
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
941
+ <xsl:text>-</xsl:text>
942
+ </xsl:if>
943
+ <xsl:if test="$doctype != 'recommendation'">
944
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
945
+ <xsl:text>  </xsl:text>
946
+ </xsl:if>
947
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
948
+ </xsl:variable>
949
+ <xsl:if test="normalize-space(translate($identifier, ' ', '')) != ''">
950
+ <xsl:value-of select="$doctypeTitle"/>
951
+ <xsl:value-of select="$identifier"/>
937
952
  </xsl:if>
938
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
939
- <xsl:text>  </xsl:text>
940
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
941
953
  </xsl:otherwise>
942
954
  </xsl:choose>
943
955
 
@@ -596,7 +596,9 @@
596
596
  <xsl:call-template name="setWritingMode"/>
597
597
  <fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
598
598
  <fo:block>
599
- <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
599
+ <xsl:variable name="docidentifier_left_part" select="normalize-space(substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' '))"/>
600
+ <xsl:value-of select="$docidentifier_left_part"/>
601
+ <xsl:if test="$docidentifier_left_part = ''"><xsl:text>ITU-T</xsl:text></xsl:if>
600
602
  </fo:block>
601
603
  </fo:block>
602
604
  </fo:block-container>
@@ -917,9 +919,12 @@
917
919
  </xsl:call-template>
918
920
  <xsl:text> </xsl:text>
919
921
  </xsl:if>
920
- <xsl:value-of select="$doctypeTitle"/>
921
- <xsl:text>  </xsl:text>
922
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
922
+ <xsl:variable name="identifier" select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
923
+ <xsl:if test="$identifier != ''">
924
+ <xsl:value-of select="$doctypeTitle"/>
925
+ <xsl:text>  </xsl:text>
926
+ <xsl:value-of select="$identifier"/>
927
+ </xsl:if>
923
928
  </xsl:when>
924
929
  <xsl:when test="$doctype = 'implementers-guide'"/>
925
930
  <xsl:when test="$doctype = 'resolution'"/>
@@ -929,15 +934,22 @@
929
934
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
930
935
  </xsl:when>
931
936
  <xsl:otherwise>
932
- <xsl:value-of select="$doctypeTitle"/>
933
- <xsl:text>  </xsl:text>
934
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
935
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
936
- <xsl:text>-</xsl:text>
937
+ <xsl:variable name="identifier">
938
+ <xsl:text>  </xsl:text>
939
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
940
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
941
+ <xsl:text>-</xsl:text>
942
+ </xsl:if>
943
+ <xsl:if test="$doctype != 'recommendation'">
944
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
945
+ <xsl:text>  </xsl:text>
946
+ </xsl:if>
947
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
948
+ </xsl:variable>
949
+ <xsl:if test="normalize-space(translate($identifier, ' ', '')) != ''">
950
+ <xsl:value-of select="$doctypeTitle"/>
951
+ <xsl:value-of select="$identifier"/>
937
952
  </xsl:if>
938
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
939
- <xsl:text>  </xsl:text>
940
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
941
953
  </xsl:otherwise>
942
954
  </xsl:choose>
943
955
 
@@ -596,7 +596,9 @@
596
596
  <xsl:call-template name="setWritingMode"/>
597
597
  <fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
598
598
  <fo:block>
599
- <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
599
+ <xsl:variable name="docidentifier_left_part" select="normalize-space(substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' '))"/>
600
+ <xsl:value-of select="$docidentifier_left_part"/>
601
+ <xsl:if test="$docidentifier_left_part = ''"><xsl:text>ITU-T</xsl:text></xsl:if>
600
602
  </fo:block>
601
603
  </fo:block>
602
604
  </fo:block-container>
@@ -917,9 +919,12 @@
917
919
  </xsl:call-template>
918
920
  <xsl:text> </xsl:text>
919
921
  </xsl:if>
920
- <xsl:value-of select="$doctypeTitle"/>
921
- <xsl:text>  </xsl:text>
922
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
922
+ <xsl:variable name="identifier" select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
923
+ <xsl:if test="$identifier != ''">
924
+ <xsl:value-of select="$doctypeTitle"/>
925
+ <xsl:text>  </xsl:text>
926
+ <xsl:value-of select="$identifier"/>
927
+ </xsl:if>
923
928
  </xsl:when>
924
929
  <xsl:when test="$doctype = 'implementers-guide'"/>
925
930
  <xsl:when test="$doctype = 'resolution'"/>
@@ -929,15 +934,22 @@
929
934
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
930
935
  </xsl:when>
931
936
  <xsl:otherwise>
932
- <xsl:value-of select="$doctypeTitle"/>
933
- <xsl:text>  </xsl:text>
934
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
935
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
936
- <xsl:text>-</xsl:text>
937
+ <xsl:variable name="identifier">
938
+ <xsl:text>  </xsl:text>
939
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
940
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
941
+ <xsl:text>-</xsl:text>
942
+ </xsl:if>
943
+ <xsl:if test="$doctype != 'recommendation'">
944
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
945
+ <xsl:text>  </xsl:text>
946
+ </xsl:if>
947
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
948
+ </xsl:variable>
949
+ <xsl:if test="normalize-space(translate($identifier, ' ', '')) != ''">
950
+ <xsl:value-of select="$doctypeTitle"/>
951
+ <xsl:value-of select="$identifier"/>
937
952
  </xsl:if>
938
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
939
- <xsl:text>  </xsl:text>
940
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
941
953
  </xsl:otherwise>
942
954
  </xsl:choose>
943
955
 
@@ -75,12 +75,12 @@ module IsoDoc
75
75
  %i(affiliations addresses emails faxes phones).each { |i| set(i, []) }
76
76
  authors.each do |a|
77
77
  append(:affiliations,
78
- a&.at(ns("./affiliation/organization/name"))&.text)
79
- append(:addresses, a&.at(ns("./affiliation/organization/address/" \
80
- "formattedAddress"))&.text)
81
- append(:emails, a&.at(ns("./email"))&.text)
82
- append(:faxes, a&.at(ns("./phone[@type = 'fax']"))&.text)
83
- append(:phones, a&.at(ns("./phone[not(@type = 'fax')]"))&.text)
78
+ a.at(ns("./affiliation/organization/name"))&.text)
79
+ append(:addresses, a.at(ns("./affiliation/organization/address/" \
80
+ "formattedAddress"))&.text)
81
+ append(:emails, a.at(ns("./email"))&.text)
82
+ append(:faxes, a.at(ns("./phone[@type = 'fax']"))&.text)
83
+ append(:phones, a.at(ns("./phone[not(@type = 'fax')]"))&.text)
84
84
  end
85
85
  end
86
86
 
@@ -117,7 +117,7 @@ module IsoDoc
117
117
  pubdate and
118
118
  set(:placedate_year,
119
119
  @labels["placedate"]
120
- .sub(/%/, pubdate.text.sub(/^(\d\d\d\d).*$/, "\\1")))
120
+ .sub("%", pubdate.text.sub(/^(\d\d\d\d).*$/, "\\1")))
121
121
  end
122
122
 
123
123
  def monthyr(isodate)
@@ -142,7 +142,7 @@ module IsoDoc
142
142
  else super
143
143
  end
144
144
  d = get[:doctype] and
145
- set(:draft_new_doctype, @labels["draft_new"].sub(/%/, d))
145
+ set(:draft_new_doctype, @labels["draft_new"].sub("%", d))
146
146
  end
147
147
 
148
148
  def ip_notice_received(isoxml, _out)
@@ -187,27 +187,27 @@ module IsoDoc
187
187
  end
188
188
 
189
189
  def techreport(isoxml, _out)
190
- if a = isoxml&.at(ns("//bibdata/ext/meeting"))&.text
190
+ if a = isoxml.at(ns("//bibdata/ext/meeting"))&.text
191
191
  set(:meeting, a)
192
192
  set(:meeting_acronym, a)
193
193
  end
194
- a = isoxml&.at(ns("//bibdata/ext/meeting/@acronym"))&.text and
194
+ a = isoxml.at(ns("//bibdata/ext/meeting/@acronym"))&.text and
195
195
  set(:meeting_acronym, a)
196
- a = isoxml&.at(ns("//bibdata/ext/meeting-place"))&.text and
196
+ a = isoxml.at(ns("//bibdata/ext/meeting-place"))&.text and
197
197
  set(:meeting_place, a)
198
- a = isoxml&.at(ns("//bibdata/ext/intended-type"))&.text and
198
+ a = isoxml.at(ns("//bibdata/ext/intended-type"))&.text and
199
199
  set(:intended_type, a)
200
- a = isoxml&.at(ns("//bibdata/ext/source"))&.text and set(:source, a)
200
+ a = isoxml.at(ns("//bibdata/ext/source"))&.text and set(:source, a)
201
201
  meeting(isoxml)
202
202
  end
203
203
 
204
204
  def meeting(isoxml)
205
205
  resolution =
206
- isoxml&.at(ns("//bibdata/ext/doctype"))&.text == "resolution"
207
- if o = isoxml&.at(ns("//bibdata/ext/meeting-date/on"))&.text
206
+ isoxml.at(ns("//bibdata/ext/doctype"))&.text == "resolution"
207
+ if o = isoxml.at(ns("//bibdata/ext/meeting-date/on"))&.text
208
208
  set(:meeting_date, resolution ? ddMMMMYYYY(o, nil) : ddMMMYYYY(o))
209
- elsif f = isoxml&.at(ns("//bibdata/ext/meeting-date/from"))&.text
210
- t = isoxml&.at(ns("//bibdata/ext/meeting-date/to"))&.text
209
+ elsif f = isoxml.at(ns("//bibdata/ext/meeting-date/from"))&.text
210
+ t = isoxml.at(ns("//bibdata/ext/meeting-date/to"))&.text
211
211
  set(:meeting_date,
212
212
  resolution ? ddMMMMYYYY(f, t) : "#{ddMMMYYYY(f)}/#{ddMMMYYYY(t)}")
213
213
  end
@@ -12,9 +12,8 @@ module IsoDoc
12
12
  super
13
13
  end
14
14
 
15
- def pdf_stylesheet(docxml)
16
- doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
17
- if File.exist?(File.join(@libdir, "itu.#{doctype}.xsl"))
15
+ def pdf_stylesheet(_docxml)
16
+ if File.exist?(File.join(@libdir, "itu.#{@doctype}.xsl"))
18
17
  "itu.#{doctype}.xsl"
19
18
  else
20
19
  "itu.recommendation.xsl"
@@ -79,8 +79,7 @@ module IsoDoc
79
79
  end
80
80
 
81
81
  def clause1(elem)
82
- elem.at(ns("//bibdata/ext/doctype"))&.text ==
83
- "resolution" or return super
82
+ @doctype == "resolution" or return super
84
83
  %w(sections bibliography).include? elem.parent.name or return super
85
84
  @suppressheadingnumbers || elem["unnumbered"] and return
86
85
  t = elem.at(ns("./title")) and t["depth"] = "1"
@@ -91,8 +90,7 @@ module IsoDoc
91
90
  end
92
91
 
93
92
  def annex1(elem)
94
- elem.at(ns("//bibdata/ext/doctype"))&.text == "resolution" or
95
- return super
93
+ @doctype == "resolution" or return super
96
94
  elem.elements.first.previous = annex1_supertitle(elem)
97
95
  t = elem.at(ns("./title")) and
98
96
  t.children = "<strong>#{to_xml(t.children)}</strong>"
@@ -141,8 +139,7 @@ module IsoDoc
141
139
  end
142
140
 
143
141
  def toc_title(docxml)
144
- doctype = docxml.at(ns("//bibdata/ext/doctype"))
145
- doctype&.text == "resolution" and return
142
+ @doctype == "resolution" and return
146
143
  super
147
144
  end
148
145
 
@@ -42,7 +42,7 @@ module IsoDoc
42
42
  end
43
43
 
44
44
  def convert1(docxml, filename, dir)
45
- if docxml&.at(ns("//bibdata/ext/doctype"))&.text == "service-publication"
45
+ if @doctype == "service-publication"
46
46
  @wordcoverpage = html_doc_path("word_itu_titlepage_sp.html")
47
47
  options[:bodyfont] = "Arial"
48
48
  options[:headerfont] = "Arial"
@@ -35,11 +35,6 @@ module IsoDoc
35
35
  { path: "//preface/*", multi: true }]
36
36
  end
37
37
 
38
- def initial_anchor_names(doc)
39
- @doctype = doc&.at(ns("//bibdata/ext/doctype"))&.text
40
- super
41
- end
42
-
43
38
  def annextype(clause)
44
39
  if clause["obligation"] == "informative" then @labels["appendix"]
45
40
  else @labels["annex"]
@@ -346,6 +346,8 @@
346
346
  <ref name="keyword"/>
347
347
  <ref name="xref"/>
348
348
  <ref name="hyperlink"/>
349
+ <ref name="index"/>
350
+ <ref name="index-xref"/>
349
351
  </choice>
350
352
  </oneOrMore>
351
353
  </element>
@@ -623,6 +625,8 @@
623
625
  <ref name="eref"/>
624
626
  <ref name="xref"/>
625
627
  <ref name="hyperlink"/>
628
+ <ref name="index"/>
629
+ <ref name="index-xref"/>
626
630
  </choice>
627
631
  </zeroOrMore>
628
632
  </element>
@@ -636,6 +640,8 @@
636
640
  <ref name="eref"/>
637
641
  <ref name="xref"/>
638
642
  <ref name="hyperlink"/>
643
+ <ref name="index"/>
644
+ <ref name="index-xref"/>
639
645
  </choice>
640
646
  </zeroOrMore>
641
647
  </element>
@@ -648,6 +654,8 @@
648
654
  <ref name="eref"/>
649
655
  <ref name="xref"/>
650
656
  <ref name="hyperlink"/>
657
+ <ref name="index"/>
658
+ <ref name="index-xref"/>
651
659
  </choice>
652
660
  </zeroOrMore>
653
661
  </element>
@@ -655,7 +663,11 @@
655
663
  <define name="keyword">
656
664
  <element name="keyword">
657
665
  <zeroOrMore>
658
- <ref name="PureTextElement"/>
666
+ <choice>
667
+ <ref name="PureTextElement"/>
668
+ <ref name="index"/>
669
+ <ref name="index-xref"/>
670
+ </choice>
659
671
  </zeroOrMore>
660
672
  </element>
661
673
  </define>
@@ -676,7 +688,11 @@
676
688
  <define name="strike">
677
689
  <element name="strike">
678
690
  <zeroOrMore>
679
- <ref name="PureTextElement"/>
691
+ <choice>
692
+ <ref name="PureTextElement"/>
693
+ <ref name="index"/>
694
+ <ref name="index-xref"/>
695
+ </choice>
680
696
  </zeroOrMore>
681
697
  </element>
682
698
  </define>
@@ -1283,7 +1283,7 @@
1283
1283
  <value>mergedInto</value>
1284
1284
  <value>splits</value>
1285
1285
  <value>splitInto</value>
1286
- <value>instance</value>
1286
+ <value>instanceOf</value>
1287
1287
  <value>hasInstance</value>
1288
1288
  <value>exemplarOf</value>
1289
1289
  <value>hasExemplar</value>
@@ -9,8 +9,7 @@ module Metanorma
9
9
  end
10
10
 
11
11
  def resolution_inline_header(xml)
12
- return unless xml&.at("//bibdata/ext/doctype")&.text == "resolution"
13
-
12
+ @doctype == "resolution" or return
14
13
  xml.xpath("//clause//clause").each do |c|
15
14
  next if (title = c.at("./title")) && !title&.text&.empty?
16
15
 
@@ -138,7 +138,9 @@ module Metanorma
138
138
  end
139
139
 
140
140
  def presentation_xml_converter(node)
141
- IsoDoc::ITU::PresentationXMLConvert.new(html_extract_attributes(node))
141
+ IsoDoc::ITU::PresentationXMLConvert
142
+ .new(html_extract_attributes(node)
143
+ .merge(output_formats: ::Metanorma::ITU::Processor.new.output_formats))
142
144
  end
143
145
 
144
146
  def html_converter(node)
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.2.4 -->
20
+ <!-- VERSION v1.2.6 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -485,6 +485,8 @@
485
485
  <choice>
486
486
  <text/>
487
487
  <ref name="callout"/>
488
+ <ref name="xref"/>
489
+ <ref name="eref"/>
488
490
  </choice>
489
491
  </oneOrMore>
490
492
  <zeroOrMore>
@@ -865,6 +867,7 @@
865
867
  <ref name="PureTextElement"/>
866
868
  <ref name="stem"/>
867
869
  <ref name="index"/>
870
+ <ref name="index-xref"/>
868
871
  <ref name="eref"/>
869
872
  <ref name="erefstack"/>
870
873
  <ref name="xref"/>
@@ -880,6 +883,7 @@
880
883
  <ref name="PureTextElement"/>
881
884
  <ref name="stem"/>
882
885
  <ref name="index"/>
886
+ <ref name="index-xref"/>
883
887
  <ref name="eref"/>
884
888
  <ref name="erefstack"/>
885
889
  <ref name="xref"/>
@@ -894,6 +898,7 @@
894
898
  <choice>
895
899
  <ref name="PureTextElement"/>
896
900
  <ref name="index"/>
901
+ <ref name="index-xref"/>
897
902
  <ref name="eref"/>
898
903
  <ref name="erefstack"/>
899
904
  <ref name="xref"/>
@@ -908,6 +913,7 @@
908
913
  <choice>
909
914
  <ref name="PureTextElement"/>
910
915
  <ref name="index"/>
916
+ <ref name="index-xref"/>
911
917
  </choice>
912
918
  </zeroOrMore>
913
919
  </element>
@@ -918,6 +924,7 @@
918
924
  <choice>
919
925
  <ref name="PureTextElement"/>
920
926
  <ref name="index"/>
927
+ <ref name="index-xref"/>
921
928
  </choice>
922
929
  </zeroOrMore>
923
930
  </element>
@@ -928,6 +935,7 @@
928
935
  <choice>
929
936
  <ref name="PureTextElement"/>
930
937
  <ref name="index"/>
938
+ <ref name="index-xref"/>
931
939
  </choice>
932
940
  </zeroOrMore>
933
941
  </element>
@@ -938,6 +946,7 @@
938
946
  <choice>
939
947
  <ref name="PureTextElement"/>
940
948
  <ref name="index"/>
949
+ <ref name="index-xref"/>
941
950
  </choice>
942
951
  </zeroOrMore>
943
952
  </element>
@@ -1004,6 +1013,14 @@
1004
1013
  </oneOrMore>
1005
1014
  </element>
1006
1015
  </define>
1016
+ <define name="BasicBlock" combine="choice">
1017
+ <ref name="columnbreak"/>
1018
+ </define>
1019
+ <define name="columnbreak">
1020
+ <element name="columnbreak">
1021
+ <empty/>
1022
+ </element>
1023
+ </define>
1007
1024
  <define name="MultilingualRenderingType">
1008
1025
  <choice>
1009
1026
  <value>common</value>
@@ -1047,6 +1064,8 @@
1047
1064
  <ref name="keyword"/>
1048
1065
  <ref name="xref"/>
1049
1066
  <ref name="hyperlink"/>
1067
+ <ref name="index"/>
1068
+ <ref name="index-xref"/>
1050
1069
  </choice>
1051
1070
  </element>
1052
1071
  </define>
@@ -1060,6 +1079,8 @@
1060
1079
  <ref name="keyword"/>
1061
1080
  <ref name="xref"/>
1062
1081
  <ref name="hyperlink"/>
1082
+ <ref name="index"/>
1083
+ <ref name="index-xref"/>
1063
1084
  </choice>
1064
1085
  </element>
1065
1086
  </define>
@@ -1126,6 +1147,8 @@
1126
1147
  <choice>
1127
1148
  <ref name="PureTextElement"/>
1128
1149
  <ref name="stem"/>
1150
+ <ref name="index"/>
1151
+ <ref name="index-xref"/>
1129
1152
  </choice>
1130
1153
  </zeroOrMore>
1131
1154
  </element>
@@ -1136,6 +1159,8 @@
1136
1159
  <choice>
1137
1160
  <ref name="PureTextElement"/>
1138
1161
  <ref name="stem"/>
1162
+ <ref name="index"/>
1163
+ <ref name="index-xref"/>
1139
1164
  </choice>
1140
1165
  </zeroOrMore>
1141
1166
  </element>
@@ -34,6 +34,7 @@ module Metanorma
34
34
  end
35
35
 
36
36
  def output(isodoc_node, inname, outname, format, options={})
37
+ options_preprocess(options)
37
38
  case format
38
39
  when :html
39
40
  IsoDoc::ITU::HtmlConvert.new(options).convert(inname, isodoc_node,
@@ -7,13 +7,12 @@ module Metanorma
7
7
  end
8
8
 
9
9
  def doctype_validate(xmldoc)
10
- doctype = xmldoc&.at("//bibdata/ext/doctype")&.text
11
10
  %w(recommendation recommendation-supplement recommendation-amendment
12
11
  recommendation-corrigendum recommendation-errata recommendation-annex
13
12
  focus-group implementers-guide technical-paper technical-report
14
- joint-itu-iso-iec service-publication).include? doctype or
13
+ joint-itu-iso-iec service-publication).include? @doctype or
15
14
  @log.add("Document Attributes", nil,
16
- "#{doctype} is not a recognised document type")
15
+ "#{@doctype} is not a recognised document type")
17
16
  end
18
17
 
19
18
  def stage_validate(xmldoc)
@@ -111,9 +110,8 @@ module Metanorma
111
110
  end
112
111
 
113
112
  def unnumbered_check(xmldoc)
114
- doctype = xmldoc&.at("//bibdata/ext/doctype")&.text
115
113
  xmldoc.xpath("//clause[@unnumbered = 'true']").each do |c|
116
- next if (doctype == "resolution") && (c.parent.name == "sections") &&
114
+ next if (@doctype == "resolution") && (c.parent.name == "sections") &&
117
115
  !c.at("./preceding-sibling::clause")
118
116
 
119
117
  @log.add("Style", c, "Unnumbered clause out of place")
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ITU
3
- VERSION = "2.3.1".freeze
3
+ VERSION = "2.3.3".freeze
4
4
  end
5
5
  end
@@ -25,8 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.require_paths = ["lib"]
26
26
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
27
27
 
28
- spec.add_dependency "htmlentities", "~> 4.3.4"
29
- spec.add_dependency "metanorma-standoc", "~> 2.5.4"
28
+ spec.add_dependency "metanorma-standoc", "~> 2.6.0"
30
29
  spec.add_dependency "ruby-jing"
31
30
  spec.add_dependency "twitter_cldr", ">= 3.0.0"
32
31
  spec.add_dependency "tzinfo-data" # we need this for windows only
metadata CHANGED
@@ -1,43 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-itu
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-28 00:00:00.000000000 Z
11
+ date: 2023-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: htmlentities
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 4.3.4
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 4.3.4
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: metanorma-standoc
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: 2.5.4
19
+ version: 2.6.0
34
20
  type: :runtime
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
24
  - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: 2.5.4
26
+ version: 2.6.0
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: ruby-jing
43
29
  requirement: !ruby/object:Gem::Requirement