metanorma-iho 1.0.4 → 1.0.5
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/isodoc/iho/base_convert.rb +2 -2
 - data/lib/isodoc/iho/html_convert.rb +1 -1
 - data/lib/isodoc/iho/iho.specification.xsl +85 -22
 - data/lib/isodoc/iho/iho.standard.xsl +85 -22
 - data/lib/isodoc/iho/init.rb +3 -3
 - data/lib/isodoc/iho/metadata.rb +2 -2
 - data/lib/isodoc/iho/pdf_convert.rb +1 -1
 - data/lib/isodoc/iho/presentation_xml_convert.rb +1 -1
 - data/lib/isodoc/iho/word_convert.rb +1 -1
 - data/lib/isodoc/iho/xref.rb +1 -1
 - data/lib/metanorma/iho/biblio-standoc.rng +13 -0
 - data/lib/metanorma/iho/biblio.rng +19 -12
 - data/lib/metanorma/iho/converter.rb +7 -7
 - data/lib/metanorma/iho/processor.rb +7 -7
 - data/lib/metanorma/iho/relaton-iho.rng +1 -0
 - data/lib/metanorma/iho/version.rb +2 -2
 - data/lib/metanorma/iho.rb +2 -2
 - data/lib/metanorma-iho.rb +1 -1
 - data/lib/relaton/render/fields.rb +1 -1
 - data/lib/relaton/render/general.rb +3 -3
 - data/lib/relaton/render/parse.rb +1 -1
 - data/metanorma-iho.gemspec +1 -1
 - 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: a1cc181884eb16eb2e32710303190969c58be443141efd8c266e37b2dffde45a
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 64d588181931c6fbb24b406aadf9ef6038a93175b790028a07ea574e86baa90c
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: c46ec7850800bb1b0e0f88709ca59376075f61733914f0c94649c2abd2f433b91b56770102096f7dde8af6c7ff13d38fc9409e54d35ac046c50404ecf2160bd8
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 5cf3130ede380f3767a3f465c6ffb5d5f621ced505b39e88c8c0e0133478330eb05a28d71609815381cbf3de3fe9ae821bc32fc7e75db8cb422e0d248a89961e
         
     | 
| 
         @@ -1,5 +1,5 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module IsoDoc
         
     | 
| 
       2 
     | 
    
         
            -
              module  
     | 
| 
      
 2 
     | 
    
         
            +
              module Iho
         
     | 
| 
       3 
3 
     | 
    
         
             
                module BaseConvert
         
     | 
| 
       4 
4 
     | 
    
         
             
                  # terms not defined in standoc
         
     | 
| 
       5 
5 
     | 
    
         
             
                  def error_parse(node, out)
         
     | 
| 
         @@ -11,7 +11,7 @@ module IsoDoc 
     | 
|
| 
       11 
11 
     | 
    
         
             
                  end
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
                  def configuration
         
     | 
| 
       14 
     | 
    
         
            -
                    Metanorma:: 
     | 
| 
      
 14 
     | 
    
         
            +
                    Metanorma::Iho.configuration
         
     | 
| 
       15 
15 
     | 
    
         
             
                  end
         
     | 
| 
       16 
16 
     | 
    
         
             
                end
         
     | 
| 
       17 
17 
     | 
    
         
             
              end
         
     | 
| 
         @@ -4218,7 +4218,8 @@ 
     | 
|
| 
       4218 
4218 
     | 
    
         
             
            			</xsl:choose>
         
     | 
| 
       4219 
4219 
     | 
    
         
             
            		</xsl:variable>
         
     | 
| 
       4220 
4220 
     | 
    
         
             
            		<xsl:variable name="current_fn_number_text">
         
     | 
| 
       4221 
     | 
    
         
            -
             
     | 
| 
      
 4221 
     | 
    
         
            +
             
     | 
| 
      
 4222 
     | 
    
         
            +
            					<xsl:value-of select="$current_fn_number"/>
         
     | 
| 
       4222 
4223 
     | 
    
         | 
| 
       4223 
4224 
     | 
    
         
             
            		</xsl:variable>
         
     | 
| 
       4224 
4225 
     | 
    
         | 
| 
         @@ -4254,8 +4255,10 @@ 
     | 
|
| 
       4254 
4255 
     | 
    
         | 
| 
       4255 
4256 
     | 
    
         
             
            				<xsl:call-template name="insert_basic_link">
         
     | 
| 
       4256 
4257 
     | 
    
         
             
            					<xsl:with-param name="element">
         
     | 
| 
       4257 
     | 
    
         
            -
            						<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl" 
     | 
| 
       4258 
     | 
    
         
            -
            							< 
     | 
| 
      
 4258 
     | 
    
         
            +
            						<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
         
     | 
| 
      
 4259 
     | 
    
         
            +
            							<fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
         
     | 
| 
      
 4260 
     | 
    
         
            +
            								<xsl:copy-of select="$current_fn_number_text"/>
         
     | 
| 
      
 4261 
     | 
    
         
            +
            							</fo:inline>
         
     | 
| 
       4259 
4262 
     | 
    
         
             
            						</fo:basic-link>
         
     | 
| 
       4260 
4263 
     | 
    
         
             
            					</xsl:with-param>
         
     | 
| 
       4261 
4264 
     | 
    
         
             
            				</xsl:call-template>
         
     | 
| 
         @@ -4536,7 +4539,7 @@ 
     | 
|
| 
       4536 
4539 
     | 
    
         | 
| 
       4537 
4540 
     | 
    
         
             
            			<xsl:call-template name="refine_fn-reference-style"/>
         
     | 
| 
       4538 
4541 
     | 
    
         | 
| 
       4539 
     | 
    
         
            -
            			<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference   | ancestor::*[local-name()='clause'][1]/@id-->
         
     | 
| 
      
 4542 
     | 
    
         
            +
            			<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> <!-- @reference   | ancestor::*[local-name()='clause'][1]/@id-->
         
     | 
| 
       4540 
4543 
     | 
    
         
             
            				<xsl:if test="ancestor::*[local-name()='table'][1]/@id"> <!-- for footnotes in tables -->
         
     | 
| 
       4541 
4544 
     | 
    
         
             
            					<xsl:attribute name="internal-destination">
         
     | 
| 
       4542 
4545 
     | 
    
         
             
            						<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
         
     | 
| 
         @@ -5541,9 +5544,19 @@ 
     | 
|
| 
       5541 
5544 
     | 
    
         
             
            		</fo:inline>
         
     | 
| 
       5542 
5545 
     | 
    
         
             
            	</xsl:template>
         
     | 
| 
       5543 
5546 
     | 
    
         | 
| 
       5544 
     | 
    
         
            -
            	<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
         
     | 
| 
      
 5547 
     | 
    
         
            +
            	<xsl:template match="text()[ancestor::*[local-name()='smallcap']]" name="smallcaps">
         
     | 
| 
      
 5548 
     | 
    
         
            +
            		<xsl:param name="txt"/>
         
     | 
| 
       5545 
5549 
     | 
    
         
             
            		<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
         
     | 
| 
       5546 
     | 
    
         
            -
            		<xsl:variable name="text" 
     | 
| 
      
 5550 
     | 
    
         
            +
            		<xsl:variable name="text">
         
     | 
| 
      
 5551 
     | 
    
         
            +
            			<xsl:choose>
         
     | 
| 
      
 5552 
     | 
    
         
            +
            				<xsl:when test="$txt != ''">
         
     | 
| 
      
 5553 
     | 
    
         
            +
            					<xsl:value-of select="$txt"/>
         
     | 
| 
      
 5554 
     | 
    
         
            +
            				</xsl:when>
         
     | 
| 
      
 5555 
     | 
    
         
            +
            				<xsl:otherwise>
         
     | 
| 
      
 5556 
     | 
    
         
            +
            					<xsl:value-of select="."/>
         
     | 
| 
      
 5557 
     | 
    
         
            +
            				</xsl:otherwise>
         
     | 
| 
      
 5558 
     | 
    
         
            +
            			</xsl:choose>
         
     | 
| 
      
 5559 
     | 
    
         
            +
            		</xsl:variable>
         
     | 
| 
       5547 
5560 
     | 
    
         
             
            		<xsl:variable name="ratio_">
         
     | 
| 
       5548 
5561 
     | 
    
         
             
            			0.75
         
     | 
| 
       5549 
5562 
     | 
    
         
             
            		</xsl:variable>
         
     | 
| 
         @@ -7060,9 +7073,12 @@ 
     | 
|
| 
       7060 
7073 
     | 
    
         
             
            					<xsl:apply-templates/>
         
     | 
| 
       7061 
7074 
     | 
    
         
             
            				</xsl:when>
         
     | 
| 
       7062 
7075 
     | 
    
         
             
            				<xsl:otherwise>
         
     | 
| 
      
 7076 
     | 
    
         
            +
            					<xsl:variable name="alt_text">
         
     | 
| 
      
 7077 
     | 
    
         
            +
            						<xsl:call-template name="getAltText"/>
         
     | 
| 
      
 7078 
     | 
    
         
            +
            					</xsl:variable>
         
     | 
| 
       7063 
7079 
     | 
    
         
             
            					<xsl:call-template name="insert_basic_link">
         
     | 
| 
       7064 
7080 
     | 
    
         
             
            						<xsl:with-param name="element">
         
     | 
| 
       7065 
     | 
    
         
            -
            							<fo:basic-link external-destination="{$target}" fox:alt-text="{$ 
     | 
| 
      
 7081 
     | 
    
         
            +
            							<fo:basic-link external-destination="{$target}" fox:alt-text="{$alt_text}">
         
     | 
| 
       7066 
7082 
     | 
    
         
             
            								<xsl:if test="$isLinkToEmbeddedFile = 'true'">
         
     | 
| 
       7067 
7083 
     | 
    
         
             
            									<xsl:attribute name="role">Annot</xsl:attribute>
         
     | 
| 
       7068 
7084 
     | 
    
         
             
            								</xsl:if>
         
     | 
| 
         @@ -7089,6 +7105,14 @@ 
     | 
|
| 
       7089 
7105 
     | 
    
         
             
            		</fo:inline>
         
     | 
| 
       7090 
7106 
     | 
    
         
             
            	</xsl:template> <!-- link -->
         
     | 
| 
       7091 
7107 
     | 
    
         | 
| 
      
 7108 
     | 
    
         
            +
            	<xsl:template name="getAltText">
         
     | 
| 
      
 7109 
     | 
    
         
            +
            		<xsl:choose>
         
     | 
| 
      
 7110 
     | 
    
         
            +
            			<xsl:when test="normalize-space(.) = ''"><xsl:value-of select="@target"/></xsl:when>
         
     | 
| 
      
 7111 
     | 
    
         
            +
            			<xsl:otherwise><xsl:value-of select="normalize-space(translate(normalize-space(), ' —', ' -'))"/></xsl:otherwise>
         
     | 
| 
      
 7112 
     | 
    
         
            +
            			<!-- <xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise> -->
         
     | 
| 
      
 7113 
     | 
    
         
            +
            		</xsl:choose>
         
     | 
| 
      
 7114 
     | 
    
         
            +
            	</xsl:template>
         
     | 
| 
      
 7115 
     | 
    
         
            +
             
     | 
| 
       7092 
7116 
     | 
    
         
             
            	<!-- ======================== -->
         
     | 
| 
       7093 
7117 
     | 
    
         
             
            	<!-- Appendix processing -->
         
     | 
| 
       7094 
7118 
     | 
    
         
             
            	<!-- ======================== -->
         
     | 
| 
         @@ -7119,7 +7143,7 @@ 
     | 
|
| 
       7119 
7143 
     | 
    
         
             
            	<xsl:template match="*[local-name() = 'callout']">
         
     | 
| 
       7120 
7144 
     | 
    
         
             
            		<xsl:choose>
         
     | 
| 
       7121 
7145 
     | 
    
         
             
            			<xsl:when test="normalize-space(@target) = ''"><<xsl:apply-templates/>></xsl:when>
         
     | 
| 
       7122 
     | 
    
         
            -
            			<xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{ 
     | 
| 
      
 7146 
     | 
    
         
            +
            			<xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{normalize-space()}"><<xsl:apply-templates/>></fo:basic-link></xsl:otherwise>
         
     | 
| 
       7123 
7147 
     | 
    
         
             
            		</xsl:choose>
         
     | 
| 
       7124 
7148 
     | 
    
         
             
            	</xsl:template>
         
     | 
| 
       7125 
7149 
     | 
    
         | 
| 
         @@ -7148,7 +7172,10 @@ 
     | 
|
| 
       7148 
7172 
     | 
    
         
             
            	<xsl:template match="*[local-name() = 'xref']">
         
     | 
| 
       7149 
7173 
     | 
    
         
             
            		<xsl:call-template name="insert_basic_link">
         
     | 
| 
       7150 
7174 
     | 
    
         
             
            			<xsl:with-param name="element">
         
     | 
| 
       7151 
     | 
    
         
            -
            				< 
     | 
| 
      
 7175 
     | 
    
         
            +
            				<xsl:variable name="alt_text">
         
     | 
| 
      
 7176 
     | 
    
         
            +
            					<xsl:call-template name="getAltText"/>
         
     | 
| 
      
 7177 
     | 
    
         
            +
            				</xsl:variable>
         
     | 
| 
      
 7178 
     | 
    
         
            +
            				<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
         
     | 
| 
       7152 
7179 
     | 
    
         
             
            					<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
         
     | 
| 
       7153 
7180 
     | 
    
         
             
            						<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
         
     | 
| 
       7154 
7181 
     | 
    
         
             
            					</xsl:if>
         
     | 
| 
         @@ -9629,12 +9656,14 @@ 
     | 
|
| 
       9629 
9656 
     | 
    
         | 
| 
       9630 
9657 
     | 
    
         
             
            					<xsl:when test="contains(normalize-space($fo_element), 'list')">
         
     | 
| 
       9631 
9658 
     | 
    
         | 
| 
       9632 
     | 
    
         
            -
            						<xsl:variable name=" 
     | 
| 
      
 9659 
     | 
    
         
            +
            						<xsl:variable name="provisional_distance_between_starts_">
         
     | 
| 
       9633 
9660 
     | 
    
         
             
            							7
         
     | 
| 
       9634 
9661 
     | 
    
         
             
            						</xsl:variable>
         
     | 
| 
       9635 
     | 
    
         
            -
            						<xsl:variable name=" 
     | 
| 
      
 9662 
     | 
    
         
            +
            						<xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
         
     | 
| 
      
 9663 
     | 
    
         
            +
            						<xsl:variable name="indent_">
         
     | 
| 
       9636 
9664 
     | 
    
         
             
            							0
         
     | 
| 
       9637 
9665 
     | 
    
         
             
            						</xsl:variable>
         
     | 
| 
      
 9666 
     | 
    
         
            +
            						<xsl:variable name="indent" select="normalize-space($indent_)"/>
         
     | 
| 
       9638 
9667 
     | 
    
         | 
| 
       9639 
9668 
     | 
    
         
             
            						<fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
         
     | 
| 
       9640 
9669 
     | 
    
         
             
            							<fo:list-item>
         
     | 
| 
         @@ -10357,14 +10386,17 @@ 
     | 
|
| 
       10357 
10386 
     | 
    
         
             
            			</xsl:when>
         
     | 
| 
       10358 
10387 
     | 
    
         
             
            			<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
         
     | 
| 
       10359 
10388 
     | 
    
         | 
| 
       10360 
     | 
    
         
            -
            				<xsl:variable name=" 
     | 
| 
      
 10389 
     | 
    
         
            +
            				<xsl:variable name="type" select="../@type"/>
         
     | 
| 
       10361 
10390 
     | 
    
         | 
| 
       10362 
     | 
    
         
            -
             
     | 
| 
      
 10391 
     | 
    
         
            +
            				<xsl:variable name="label">
         
     | 
| 
       10363 
10392 
     | 
    
         | 
| 
       10364 
10393 
     | 
    
         
             
            					<xsl:variable name="style_prefix_">
         
     | 
| 
       10365 
10394 
     | 
    
         
             
            						<xsl:if test="$type = 'roman'">
         
     | 
| 
       10366 
10395 
     | 
    
         
             
            							 <!-- Example: (i) -->
         
     | 
| 
       10367 
10396 
     | 
    
         
             
            						</xsl:if>
         
     | 
| 
      
 10397 
     | 
    
         
            +
            						<xsl:if test="$type = 'alphabet'">
         
     | 
| 
      
 10398 
     | 
    
         
            +
             
     | 
| 
      
 10399 
     | 
    
         
            +
            						</xsl:if>
         
     | 
| 
       10368 
10400 
     | 
    
         
             
            					</xsl:variable>
         
     | 
| 
       10369 
10401 
     | 
    
         
             
            					<xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
         
     | 
| 
       10370 
10402 
     | 
    
         | 
| 
         @@ -10390,13 +10422,15 @@ 
     | 
|
| 
       10390 
10422 
     | 
    
         
             
            					<xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
         
     | 
| 
       10391 
10423 
     | 
    
         
             
            						<xsl:value-of select="$style_prefix"/>
         
     | 
| 
       10392 
10424 
     | 
    
         
             
            					</xsl:if>
         
     | 
| 
      
 10425 
     | 
    
         
            +
             
     | 
| 
       10393 
10426 
     | 
    
         
             
            					<xsl:value-of select="@label"/>
         
     | 
| 
      
 10427 
     | 
    
         
            +
             
     | 
| 
       10394 
10428 
     | 
    
         
             
            					<xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
         
     | 
| 
       10395 
10429 
     | 
    
         
             
            						<xsl:value-of select="$style_suffix"/>
         
     | 
| 
       10396 
10430 
     | 
    
         
             
            					</xsl:if>
         
     | 
| 
       10397 
10431 
     | 
    
         
             
            				</xsl:variable>
         
     | 
| 
       10398 
10432 
     | 
    
         | 
| 
       10399 
     | 
    
         
            -
             
     | 
| 
      
 10433 
     | 
    
         
            +
            						<xsl:value-of select="normalize-space($label)"/>
         
     | 
| 
       10400 
10434 
     | 
    
         | 
| 
       10401 
10435 
     | 
    
         
             
            			</xsl:when>
         
     | 
| 
       10402 
10436 
     | 
    
         
             
            			<xsl:otherwise> <!-- for ordered lists 'ol' -->
         
     | 
| 
         @@ -12596,7 +12630,8 @@ 
     | 
|
| 
       12596 
12630 
     | 
    
         
             
            			<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
         
     | 
| 
       12597 
12631 
     | 
    
         
             
            			<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
         
     | 
| 
       12598 
12632 
     | 
    
         
             
            			<!-- Todo: need update -->
         
     | 
| 
       12599 
     | 
    
         
            -
            			<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = ' 
     | 
| 
      
 12633 
     | 
    
         
            +
            			<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
         
     | 
| 
      
 12634 
     | 
    
         
            +
            			<xsl:variable name="volatile" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
         
     | 
| 
       12600 
12635 
     | 
    
         | 
| 
       12601 
12636 
     | 
    
         
             
            			<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{$filename}" link-as-file-annotation="true">
         
     | 
| 
       12602 
12637 
     | 
    
         
             
            				<xsl:attribute name="src">
         
     | 
| 
         @@ -12617,6 +12652,9 @@ 
     | 
|
| 
       12617 
12652 
     | 
    
         
             
            				<xsl:if test="$afrelationship != ''">
         
     | 
| 
       12618 
12653 
     | 
    
         
             
            					<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
         
     | 
| 
       12619 
12654 
     | 
    
         
             
            				</xsl:if>
         
     | 
| 
      
 12655 
     | 
    
         
            +
            				<xsl:if test="$volatile != ''">
         
     | 
| 
      
 12656 
     | 
    
         
            +
            					<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
         
     | 
| 
      
 12657 
     | 
    
         
            +
            				</xsl:if>
         
     | 
| 
       12620 
12658 
     | 
    
         
             
            			</pdf:embedded-file>
         
     | 
| 
       12621 
12659 
     | 
    
         
             
            		</xsl:for-each>
         
     | 
| 
       12622 
12660 
     | 
    
         
             
            		<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
         
     | 
| 
         @@ -12627,14 +12665,18 @@ 
     | 
|
| 
       12627 
12665 
     | 
    
         
             
            				<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
         
     | 
| 
       12628 
12666 
     | 
    
         
             
            				<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
         
     | 
| 
       12629 
12667 
     | 
    
         
             
            				<!-- Todo: need update -->
         
     | 
| 
       12630 
     | 
    
         
            -
             
     | 
| 
      
 12668 
     | 
    
         
            +
            				<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
         
     | 
| 
      
 12669 
     | 
    
         
            +
            				<xsl:variable name="volatile" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
         
     | 
| 
       12631 
12670 
     | 
    
         
             
            				<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
         
     | 
| 
       12632 
12671 
     | 
    
         
             
            					<xsl:if test="$description != ''">
         
     | 
| 
       12633 
12672 
     | 
    
         
             
            						<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
         
     | 
| 
       12634 
12673 
     | 
    
         
             
            					</xsl:if>
         
     | 
| 
       12635 
12674 
     | 
    
         
             
            					<xsl:if test="$afrelationship != ''">
         
     | 
| 
       12636 
     | 
    
         
            -
             
     | 
| 
       12637 
     | 
    
         
            -
             
     | 
| 
      
 12675 
     | 
    
         
            +
            						<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
         
     | 
| 
      
 12676 
     | 
    
         
            +
            					</xsl:if>
         
     | 
| 
      
 12677 
     | 
    
         
            +
            					<xsl:if test="$volatile != ''">
         
     | 
| 
      
 12678 
     | 
    
         
            +
            						<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
         
     | 
| 
      
 12679 
     | 
    
         
            +
            					</xsl:if>
         
     | 
| 
       12638 
12680 
     | 
    
         
             
            				</pdf:embedded-file>
         
     | 
| 
       12639 
12681 
     | 
    
         
             
            			</xsl:for-each>
         
     | 
| 
       12640 
12682 
     | 
    
         
             
            		</xsl:if>
         
     | 
| 
         @@ -12681,10 +12723,31 @@ 
     | 
|
| 
       12681 
12723 
     | 
    
         
             
            							<xsl:value-of select="$level_total - 2"/>
         
     | 
| 
       12682 
12724 
     | 
    
         
             
            						</xsl:when>
         
     | 
| 
       12683 
12725 
     | 
    
         
             
            						<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'title']">
         
     | 
| 
       12684 
     | 
    
         
            -
            							 
     | 
| 
      
 12726 
     | 
    
         
            +
            							<!-- determine 'depth' depends on upper clause with title/@depth -->
         
     | 
| 
      
 12727 
     | 
    
         
            +
            							<!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
         
     | 
| 
      
 12728 
     | 
    
         
            +
            							<xsl:variable name="clause_with_depth_depth" select="ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/*[local-name() = 'title']/@depth"/>
         
     | 
| 
      
 12729 
     | 
    
         
            +
            							<!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
         
     | 
| 
      
 12730 
     | 
    
         
            +
            							<xsl:variable name="clause_with_depth_level" select="count(ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/ancestor::*)"/>
         
     | 
| 
      
 12731 
     | 
    
         
            +
            							<!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
         
     | 
| 
      
 12732 
     | 
    
         
            +
            							<xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
         
     | 
| 
      
 12733 
     | 
    
         
            +
            							<!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
         
     | 
| 
      
 12734 
     | 
    
         
            +
            							<!-- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/> -->
         
     | 
| 
      
 12735 
     | 
    
         
            +
            							<xsl:variable name="curr_clause_depth" select="number($clause_with_depth_depth) + (number($curr_level) - number($clause_with_depth_level)) "/>
         
     | 
| 
      
 12736 
     | 
    
         
            +
            							<!-- <xsl:message>curr_clause_depth=<xsl:value-of select="$curr_clause_depth"/></xsl:message> -->
         
     | 
| 
       12685 
12737 
     | 
    
         
             
            							<xsl:choose>
         
     | 
| 
       12686 
     | 
    
         
            -
            								<xsl:when test="string(number($ 
     | 
| 
       12687 
     | 
    
         
            -
            									<xsl:value-of select="number($ 
     | 
| 
      
 12738 
     | 
    
         
            +
            								<xsl:when test="string(number($curr_clause_depth)) != 'NaN'">
         
     | 
| 
      
 12739 
     | 
    
         
            +
            									<xsl:value-of select="number($curr_clause_depth)"/>
         
     | 
| 
      
 12740 
     | 
    
         
            +
            								</xsl:when>
         
     | 
| 
      
 12741 
     | 
    
         
            +
            								<xsl:otherwise>
         
     | 
| 
      
 12742 
     | 
    
         
            +
            									<xsl:value-of select="$level_total - 2"/>
         
     | 
| 
      
 12743 
     | 
    
         
            +
            								</xsl:otherwise>
         
     | 
| 
      
 12744 
     | 
    
         
            +
            							</xsl:choose>
         
     | 
| 
      
 12745 
     | 
    
         
            +
            						</xsl:when>
         
     | 
| 
      
 12746 
     | 
    
         
            +
            						<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'name'] and parent::*[local-name() = 'term']">
         
     | 
| 
      
 12747 
     | 
    
         
            +
            							<xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::*[local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
         
     | 
| 
      
 12748 
     | 
    
         
            +
            							<xsl:choose>
         
     | 
| 
      
 12749 
     | 
    
         
            +
            								<xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
         
     | 
| 
      
 12750 
     | 
    
         
            +
            									<xsl:value-of select="number($upper_terms_depth + 1)"/>
         
     | 
| 
       12688 
12751 
     | 
    
         
             
            								</xsl:when>
         
     | 
| 
       12689 
12752 
     | 
    
         
             
            								<xsl:otherwise>
         
     | 
| 
       12690 
12753 
     | 
    
         
             
            									<xsl:value-of select="$level_total - 2"/>
         
     | 
| 
         @@ -12692,7 +12755,7 @@ 
     | 
|
| 
       12692 
12755 
     | 
    
         
             
            							</xsl:choose>
         
     | 
| 
       12693 
12756 
     | 
    
         
             
            						</xsl:when>
         
     | 
| 
       12694 
12757 
     | 
    
         
             
            						<xsl:when test="ancestor::*[local-name() = 'sections']">
         
     | 
| 
       12695 
     | 
    
         
            -
            							<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][1]/*[local-name() = 'title']/@depth)"/>
         
     | 
| 
      
 12758 
     | 
    
         
            +
            							<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause' or local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
         
     | 
| 
       12696 
12759 
     | 
    
         
             
            							<xsl:choose>
         
     | 
| 
       12697 
12760 
     | 
    
         
             
            								<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
         
     | 
| 
       12698 
12761 
     | 
    
         
             
            									<xsl:value-of select="number($upper_clause_depth + 1)"/>
         
     | 
| 
         @@ -4218,7 +4218,8 @@ 
     | 
|
| 
       4218 
4218 
     | 
    
         
             
            			</xsl:choose>
         
     | 
| 
       4219 
4219 
     | 
    
         
             
            		</xsl:variable>
         
     | 
| 
       4220 
4220 
     | 
    
         
             
            		<xsl:variable name="current_fn_number_text">
         
     | 
| 
       4221 
     | 
    
         
            -
             
     | 
| 
      
 4221 
     | 
    
         
            +
             
     | 
| 
      
 4222 
     | 
    
         
            +
            					<xsl:value-of select="$current_fn_number"/>
         
     | 
| 
       4222 
4223 
     | 
    
         | 
| 
       4223 
4224 
     | 
    
         
             
            		</xsl:variable>
         
     | 
| 
       4224 
4225 
     | 
    
         | 
| 
         @@ -4254,8 +4255,10 @@ 
     | 
|
| 
       4254 
4255 
     | 
    
         | 
| 
       4255 
4256 
     | 
    
         
             
            				<xsl:call-template name="insert_basic_link">
         
     | 
| 
       4256 
4257 
     | 
    
         
             
            					<xsl:with-param name="element">
         
     | 
| 
       4257 
     | 
    
         
            -
            						<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl" 
     | 
| 
       4258 
     | 
    
         
            -
            							< 
     | 
| 
      
 4258 
     | 
    
         
            +
            						<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
         
     | 
| 
      
 4259 
     | 
    
         
            +
            							<fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
         
     | 
| 
      
 4260 
     | 
    
         
            +
            								<xsl:copy-of select="$current_fn_number_text"/>
         
     | 
| 
      
 4261 
     | 
    
         
            +
            							</fo:inline>
         
     | 
| 
       4259 
4262 
     | 
    
         
             
            						</fo:basic-link>
         
     | 
| 
       4260 
4263 
     | 
    
         
             
            					</xsl:with-param>
         
     | 
| 
       4261 
4264 
     | 
    
         
             
            				</xsl:call-template>
         
     | 
| 
         @@ -4536,7 +4539,7 @@ 
     | 
|
| 
       4536 
4539 
     | 
    
         | 
| 
       4537 
4540 
     | 
    
         
             
            			<xsl:call-template name="refine_fn-reference-style"/>
         
     | 
| 
       4538 
4541 
     | 
    
         | 
| 
       4539 
     | 
    
         
            -
            			<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference   | ancestor::*[local-name()='clause'][1]/@id-->
         
     | 
| 
      
 4542 
     | 
    
         
            +
            			<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> <!-- @reference   | ancestor::*[local-name()='clause'][1]/@id-->
         
     | 
| 
       4540 
4543 
     | 
    
         
             
            				<xsl:if test="ancestor::*[local-name()='table'][1]/@id"> <!-- for footnotes in tables -->
         
     | 
| 
       4541 
4544 
     | 
    
         
             
            					<xsl:attribute name="internal-destination">
         
     | 
| 
       4542 
4545 
     | 
    
         
             
            						<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
         
     | 
| 
         @@ -5541,9 +5544,19 @@ 
     | 
|
| 
       5541 
5544 
     | 
    
         
             
            		</fo:inline>
         
     | 
| 
       5542 
5545 
     | 
    
         
             
            	</xsl:template>
         
     | 
| 
       5543 
5546 
     | 
    
         | 
| 
       5544 
     | 
    
         
            -
            	<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
         
     | 
| 
      
 5547 
     | 
    
         
            +
            	<xsl:template match="text()[ancestor::*[local-name()='smallcap']]" name="smallcaps">
         
     | 
| 
      
 5548 
     | 
    
         
            +
            		<xsl:param name="txt"/>
         
     | 
| 
       5545 
5549 
     | 
    
         
             
            		<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
         
     | 
| 
       5546 
     | 
    
         
            -
            		<xsl:variable name="text" 
     | 
| 
      
 5550 
     | 
    
         
            +
            		<xsl:variable name="text">
         
     | 
| 
      
 5551 
     | 
    
         
            +
            			<xsl:choose>
         
     | 
| 
      
 5552 
     | 
    
         
            +
            				<xsl:when test="$txt != ''">
         
     | 
| 
      
 5553 
     | 
    
         
            +
            					<xsl:value-of select="$txt"/>
         
     | 
| 
      
 5554 
     | 
    
         
            +
            				</xsl:when>
         
     | 
| 
      
 5555 
     | 
    
         
            +
            				<xsl:otherwise>
         
     | 
| 
      
 5556 
     | 
    
         
            +
            					<xsl:value-of select="."/>
         
     | 
| 
      
 5557 
     | 
    
         
            +
            				</xsl:otherwise>
         
     | 
| 
      
 5558 
     | 
    
         
            +
            			</xsl:choose>
         
     | 
| 
      
 5559 
     | 
    
         
            +
            		</xsl:variable>
         
     | 
| 
       5547 
5560 
     | 
    
         
             
            		<xsl:variable name="ratio_">
         
     | 
| 
       5548 
5561 
     | 
    
         
             
            			0.75
         
     | 
| 
       5549 
5562 
     | 
    
         
             
            		</xsl:variable>
         
     | 
| 
         @@ -7060,9 +7073,12 @@ 
     | 
|
| 
       7060 
7073 
     | 
    
         
             
            					<xsl:apply-templates/>
         
     | 
| 
       7061 
7074 
     | 
    
         
             
            				</xsl:when>
         
     | 
| 
       7062 
7075 
     | 
    
         
             
            				<xsl:otherwise>
         
     | 
| 
      
 7076 
     | 
    
         
            +
            					<xsl:variable name="alt_text">
         
     | 
| 
      
 7077 
     | 
    
         
            +
            						<xsl:call-template name="getAltText"/>
         
     | 
| 
      
 7078 
     | 
    
         
            +
            					</xsl:variable>
         
     | 
| 
       7063 
7079 
     | 
    
         
             
            					<xsl:call-template name="insert_basic_link">
         
     | 
| 
       7064 
7080 
     | 
    
         
             
            						<xsl:with-param name="element">
         
     | 
| 
       7065 
     | 
    
         
            -
            							<fo:basic-link external-destination="{$target}" fox:alt-text="{$ 
     | 
| 
      
 7081 
     | 
    
         
            +
            							<fo:basic-link external-destination="{$target}" fox:alt-text="{$alt_text}">
         
     | 
| 
       7066 
7082 
     | 
    
         
             
            								<xsl:if test="$isLinkToEmbeddedFile = 'true'">
         
     | 
| 
       7067 
7083 
     | 
    
         
             
            									<xsl:attribute name="role">Annot</xsl:attribute>
         
     | 
| 
       7068 
7084 
     | 
    
         
             
            								</xsl:if>
         
     | 
| 
         @@ -7089,6 +7105,14 @@ 
     | 
|
| 
       7089 
7105 
     | 
    
         
             
            		</fo:inline>
         
     | 
| 
       7090 
7106 
     | 
    
         
             
            	</xsl:template> <!-- link -->
         
     | 
| 
       7091 
7107 
     | 
    
         | 
| 
      
 7108 
     | 
    
         
            +
            	<xsl:template name="getAltText">
         
     | 
| 
      
 7109 
     | 
    
         
            +
            		<xsl:choose>
         
     | 
| 
      
 7110 
     | 
    
         
            +
            			<xsl:when test="normalize-space(.) = ''"><xsl:value-of select="@target"/></xsl:when>
         
     | 
| 
      
 7111 
     | 
    
         
            +
            			<xsl:otherwise><xsl:value-of select="normalize-space(translate(normalize-space(), ' —', ' -'))"/></xsl:otherwise>
         
     | 
| 
      
 7112 
     | 
    
         
            +
            			<!-- <xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise> -->
         
     | 
| 
      
 7113 
     | 
    
         
            +
            		</xsl:choose>
         
     | 
| 
      
 7114 
     | 
    
         
            +
            	</xsl:template>
         
     | 
| 
      
 7115 
     | 
    
         
            +
             
     | 
| 
       7092 
7116 
     | 
    
         
             
            	<!-- ======================== -->
         
     | 
| 
       7093 
7117 
     | 
    
         
             
            	<!-- Appendix processing -->
         
     | 
| 
       7094 
7118 
     | 
    
         
             
            	<!-- ======================== -->
         
     | 
| 
         @@ -7119,7 +7143,7 @@ 
     | 
|
| 
       7119 
7143 
     | 
    
         
             
            	<xsl:template match="*[local-name() = 'callout']">
         
     | 
| 
       7120 
7144 
     | 
    
         
             
            		<xsl:choose>
         
     | 
| 
       7121 
7145 
     | 
    
         
             
            			<xsl:when test="normalize-space(@target) = ''"><<xsl:apply-templates/>></xsl:when>
         
     | 
| 
       7122 
     | 
    
         
            -
            			<xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{ 
     | 
| 
      
 7146 
     | 
    
         
            +
            			<xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{normalize-space()}"><<xsl:apply-templates/>></fo:basic-link></xsl:otherwise>
         
     | 
| 
       7123 
7147 
     | 
    
         
             
            		</xsl:choose>
         
     | 
| 
       7124 
7148 
     | 
    
         
             
            	</xsl:template>
         
     | 
| 
       7125 
7149 
     | 
    
         | 
| 
         @@ -7148,7 +7172,10 @@ 
     | 
|
| 
       7148 
7172 
     | 
    
         
             
            	<xsl:template match="*[local-name() = 'xref']">
         
     | 
| 
       7149 
7173 
     | 
    
         
             
            		<xsl:call-template name="insert_basic_link">
         
     | 
| 
       7150 
7174 
     | 
    
         
             
            			<xsl:with-param name="element">
         
     | 
| 
       7151 
     | 
    
         
            -
            				< 
     | 
| 
      
 7175 
     | 
    
         
            +
            				<xsl:variable name="alt_text">
         
     | 
| 
      
 7176 
     | 
    
         
            +
            					<xsl:call-template name="getAltText"/>
         
     | 
| 
      
 7177 
     | 
    
         
            +
            				</xsl:variable>
         
     | 
| 
      
 7178 
     | 
    
         
            +
            				<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
         
     | 
| 
       7152 
7179 
     | 
    
         
             
            					<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
         
     | 
| 
       7153 
7180 
     | 
    
         
             
            						<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
         
     | 
| 
       7154 
7181 
     | 
    
         
             
            					</xsl:if>
         
     | 
| 
         @@ -9629,12 +9656,14 @@ 
     | 
|
| 
       9629 
9656 
     | 
    
         | 
| 
       9630 
9657 
     | 
    
         
             
            					<xsl:when test="contains(normalize-space($fo_element), 'list')">
         
     | 
| 
       9631 
9658 
     | 
    
         | 
| 
       9632 
     | 
    
         
            -
            						<xsl:variable name=" 
     | 
| 
      
 9659 
     | 
    
         
            +
            						<xsl:variable name="provisional_distance_between_starts_">
         
     | 
| 
       9633 
9660 
     | 
    
         
             
            							7
         
     | 
| 
       9634 
9661 
     | 
    
         
             
            						</xsl:variable>
         
     | 
| 
       9635 
     | 
    
         
            -
            						<xsl:variable name=" 
     | 
| 
      
 9662 
     | 
    
         
            +
            						<xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
         
     | 
| 
      
 9663 
     | 
    
         
            +
            						<xsl:variable name="indent_">
         
     | 
| 
       9636 
9664 
     | 
    
         
             
            							0
         
     | 
| 
       9637 
9665 
     | 
    
         
             
            						</xsl:variable>
         
     | 
| 
      
 9666 
     | 
    
         
            +
            						<xsl:variable name="indent" select="normalize-space($indent_)"/>
         
     | 
| 
       9638 
9667 
     | 
    
         | 
| 
       9639 
9668 
     | 
    
         
             
            						<fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
         
     | 
| 
       9640 
9669 
     | 
    
         
             
            							<fo:list-item>
         
     | 
| 
         @@ -10357,14 +10386,17 @@ 
     | 
|
| 
       10357 
10386 
     | 
    
         
             
            			</xsl:when>
         
     | 
| 
       10358 
10387 
     | 
    
         
             
            			<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
         
     | 
| 
       10359 
10388 
     | 
    
         | 
| 
       10360 
     | 
    
         
            -
            				<xsl:variable name=" 
     | 
| 
      
 10389 
     | 
    
         
            +
            				<xsl:variable name="type" select="../@type"/>
         
     | 
| 
       10361 
10390 
     | 
    
         | 
| 
       10362 
     | 
    
         
            -
             
     | 
| 
      
 10391 
     | 
    
         
            +
            				<xsl:variable name="label">
         
     | 
| 
       10363 
10392 
     | 
    
         | 
| 
       10364 
10393 
     | 
    
         
             
            					<xsl:variable name="style_prefix_">
         
     | 
| 
       10365 
10394 
     | 
    
         
             
            						<xsl:if test="$type = 'roman'">
         
     | 
| 
       10366 
10395 
     | 
    
         
             
            							 <!-- Example: (i) -->
         
     | 
| 
       10367 
10396 
     | 
    
         
             
            						</xsl:if>
         
     | 
| 
      
 10397 
     | 
    
         
            +
            						<xsl:if test="$type = 'alphabet'">
         
     | 
| 
      
 10398 
     | 
    
         
            +
             
     | 
| 
      
 10399 
     | 
    
         
            +
            						</xsl:if>
         
     | 
| 
       10368 
10400 
     | 
    
         
             
            					</xsl:variable>
         
     | 
| 
       10369 
10401 
     | 
    
         
             
            					<xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
         
     | 
| 
       10370 
10402 
     | 
    
         | 
| 
         @@ -10390,13 +10422,15 @@ 
     | 
|
| 
       10390 
10422 
     | 
    
         
             
            					<xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
         
     | 
| 
       10391 
10423 
     | 
    
         
             
            						<xsl:value-of select="$style_prefix"/>
         
     | 
| 
       10392 
10424 
     | 
    
         
             
            					</xsl:if>
         
     | 
| 
      
 10425 
     | 
    
         
            +
             
     | 
| 
       10393 
10426 
     | 
    
         
             
            					<xsl:value-of select="@label"/>
         
     | 
| 
      
 10427 
     | 
    
         
            +
             
     | 
| 
       10394 
10428 
     | 
    
         
             
            					<xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
         
     | 
| 
       10395 
10429 
     | 
    
         
             
            						<xsl:value-of select="$style_suffix"/>
         
     | 
| 
       10396 
10430 
     | 
    
         
             
            					</xsl:if>
         
     | 
| 
       10397 
10431 
     | 
    
         
             
            				</xsl:variable>
         
     | 
| 
       10398 
10432 
     | 
    
         | 
| 
       10399 
     | 
    
         
            -
             
     | 
| 
      
 10433 
     | 
    
         
            +
            						<xsl:value-of select="normalize-space($label)"/>
         
     | 
| 
       10400 
10434 
     | 
    
         | 
| 
       10401 
10435 
     | 
    
         
             
            			</xsl:when>
         
     | 
| 
       10402 
10436 
     | 
    
         
             
            			<xsl:otherwise> <!-- for ordered lists 'ol' -->
         
     | 
| 
         @@ -12596,7 +12630,8 @@ 
     | 
|
| 
       12596 
12630 
     | 
    
         
             
            			<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
         
     | 
| 
       12597 
12631 
     | 
    
         
             
            			<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
         
     | 
| 
       12598 
12632 
     | 
    
         
             
            			<!-- Todo: need update -->
         
     | 
| 
       12599 
     | 
    
         
            -
            			<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = ' 
     | 
| 
      
 12633 
     | 
    
         
            +
            			<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
         
     | 
| 
      
 12634 
     | 
    
         
            +
            			<xsl:variable name="volatile" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
         
     | 
| 
       12600 
12635 
     | 
    
         | 
| 
       12601 
12636 
     | 
    
         
             
            			<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{$filename}" link-as-file-annotation="true">
         
     | 
| 
       12602 
12637 
     | 
    
         
             
            				<xsl:attribute name="src">
         
     | 
| 
         @@ -12617,6 +12652,9 @@ 
     | 
|
| 
       12617 
12652 
     | 
    
         
             
            				<xsl:if test="$afrelationship != ''">
         
     | 
| 
       12618 
12653 
     | 
    
         
             
            					<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
         
     | 
| 
       12619 
12654 
     | 
    
         
             
            				</xsl:if>
         
     | 
| 
      
 12655 
     | 
    
         
            +
            				<xsl:if test="$volatile != ''">
         
     | 
| 
      
 12656 
     | 
    
         
            +
            					<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
         
     | 
| 
      
 12657 
     | 
    
         
            +
            				</xsl:if>
         
     | 
| 
       12620 
12658 
     | 
    
         
             
            			</pdf:embedded-file>
         
     | 
| 
       12621 
12659 
     | 
    
         
             
            		</xsl:for-each>
         
     | 
| 
       12622 
12660 
     | 
    
         
             
            		<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
         
     | 
| 
         @@ -12627,14 +12665,18 @@ 
     | 
|
| 
       12627 
12665 
     | 
    
         
             
            				<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
         
     | 
| 
       12628 
12666 
     | 
    
         
             
            				<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
         
     | 
| 
       12629 
12667 
     | 
    
         
             
            				<!-- Todo: need update -->
         
     | 
| 
       12630 
     | 
    
         
            -
             
     | 
| 
      
 12668 
     | 
    
         
            +
            				<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
         
     | 
| 
      
 12669 
     | 
    
         
            +
            				<xsl:variable name="volatile" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
         
     | 
| 
       12631 
12670 
     | 
    
         
             
            				<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
         
     | 
| 
       12632 
12671 
     | 
    
         
             
            					<xsl:if test="$description != ''">
         
     | 
| 
       12633 
12672 
     | 
    
         
             
            						<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
         
     | 
| 
       12634 
12673 
     | 
    
         
             
            					</xsl:if>
         
     | 
| 
       12635 
12674 
     | 
    
         
             
            					<xsl:if test="$afrelationship != ''">
         
     | 
| 
       12636 
     | 
    
         
            -
             
     | 
| 
       12637 
     | 
    
         
            -
             
     | 
| 
      
 12675 
     | 
    
         
            +
            						<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
         
     | 
| 
      
 12676 
     | 
    
         
            +
            					</xsl:if>
         
     | 
| 
      
 12677 
     | 
    
         
            +
            					<xsl:if test="$volatile != ''">
         
     | 
| 
      
 12678 
     | 
    
         
            +
            						<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
         
     | 
| 
      
 12679 
     | 
    
         
            +
            					</xsl:if>
         
     | 
| 
       12638 
12680 
     | 
    
         
             
            				</pdf:embedded-file>
         
     | 
| 
       12639 
12681 
     | 
    
         
             
            			</xsl:for-each>
         
     | 
| 
       12640 
12682 
     | 
    
         
             
            		</xsl:if>
         
     | 
| 
         @@ -12681,10 +12723,31 @@ 
     | 
|
| 
       12681 
12723 
     | 
    
         
             
            							<xsl:value-of select="$level_total - 2"/>
         
     | 
| 
       12682 
12724 
     | 
    
         
             
            						</xsl:when>
         
     | 
| 
       12683 
12725 
     | 
    
         
             
            						<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'title']">
         
     | 
| 
       12684 
     | 
    
         
            -
            							 
     | 
| 
      
 12726 
     | 
    
         
            +
            							<!-- determine 'depth' depends on upper clause with title/@depth -->
         
     | 
| 
      
 12727 
     | 
    
         
            +
            							<!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
         
     | 
| 
      
 12728 
     | 
    
         
            +
            							<xsl:variable name="clause_with_depth_depth" select="ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/*[local-name() = 'title']/@depth"/>
         
     | 
| 
      
 12729 
     | 
    
         
            +
            							<!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
         
     | 
| 
      
 12730 
     | 
    
         
            +
            							<xsl:variable name="clause_with_depth_level" select="count(ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/ancestor::*)"/>
         
     | 
| 
      
 12731 
     | 
    
         
            +
            							<!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
         
     | 
| 
      
 12732 
     | 
    
         
            +
            							<xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
         
     | 
| 
      
 12733 
     | 
    
         
            +
            							<!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
         
     | 
| 
      
 12734 
     | 
    
         
            +
            							<!-- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/> -->
         
     | 
| 
      
 12735 
     | 
    
         
            +
            							<xsl:variable name="curr_clause_depth" select="number($clause_with_depth_depth) + (number($curr_level) - number($clause_with_depth_level)) "/>
         
     | 
| 
      
 12736 
     | 
    
         
            +
            							<!-- <xsl:message>curr_clause_depth=<xsl:value-of select="$curr_clause_depth"/></xsl:message> -->
         
     | 
| 
       12685 
12737 
     | 
    
         
             
            							<xsl:choose>
         
     | 
| 
       12686 
     | 
    
         
            -
            								<xsl:when test="string(number($ 
     | 
| 
       12687 
     | 
    
         
            -
            									<xsl:value-of select="number($ 
     | 
| 
      
 12738 
     | 
    
         
            +
            								<xsl:when test="string(number($curr_clause_depth)) != 'NaN'">
         
     | 
| 
      
 12739 
     | 
    
         
            +
            									<xsl:value-of select="number($curr_clause_depth)"/>
         
     | 
| 
      
 12740 
     | 
    
         
            +
            								</xsl:when>
         
     | 
| 
      
 12741 
     | 
    
         
            +
            								<xsl:otherwise>
         
     | 
| 
      
 12742 
     | 
    
         
            +
            									<xsl:value-of select="$level_total - 2"/>
         
     | 
| 
      
 12743 
     | 
    
         
            +
            								</xsl:otherwise>
         
     | 
| 
      
 12744 
     | 
    
         
            +
            							</xsl:choose>
         
     | 
| 
      
 12745 
     | 
    
         
            +
            						</xsl:when>
         
     | 
| 
      
 12746 
     | 
    
         
            +
            						<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'name'] and parent::*[local-name() = 'term']">
         
     | 
| 
      
 12747 
     | 
    
         
            +
            							<xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::*[local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
         
     | 
| 
      
 12748 
     | 
    
         
            +
            							<xsl:choose>
         
     | 
| 
      
 12749 
     | 
    
         
            +
            								<xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
         
     | 
| 
      
 12750 
     | 
    
         
            +
            									<xsl:value-of select="number($upper_terms_depth + 1)"/>
         
     | 
| 
       12688 
12751 
     | 
    
         
             
            								</xsl:when>
         
     | 
| 
       12689 
12752 
     | 
    
         
             
            								<xsl:otherwise>
         
     | 
| 
       12690 
12753 
     | 
    
         
             
            									<xsl:value-of select="$level_total - 2"/>
         
     | 
| 
         @@ -12692,7 +12755,7 @@ 
     | 
|
| 
       12692 
12755 
     | 
    
         
             
            							</xsl:choose>
         
     | 
| 
       12693 
12756 
     | 
    
         
             
            						</xsl:when>
         
     | 
| 
       12694 
12757 
     | 
    
         
             
            						<xsl:when test="ancestor::*[local-name() = 'sections']">
         
     | 
| 
       12695 
     | 
    
         
            -
            							<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][1]/*[local-name() = 'title']/@depth)"/>
         
     | 
| 
      
 12758 
     | 
    
         
            +
            							<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause' or local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
         
     | 
| 
       12696 
12759 
     | 
    
         
             
            							<xsl:choose>
         
     | 
| 
       12697 
12760 
     | 
    
         
             
            								<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
         
     | 
| 
       12698 
12761 
     | 
    
         
             
            									<xsl:value-of select="number($upper_clause_depth + 1)"/>
         
     | 
    
        data/lib/isodoc/iho/init.rb
    CHANGED
    
    | 
         @@ -3,7 +3,7 @@ require_relative "metadata" 
     | 
|
| 
       3 
3 
     | 
    
         
             
            require_relative "xref"
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            module IsoDoc
         
     | 
| 
       6 
     | 
    
         
            -
              module  
     | 
| 
      
 6 
     | 
    
         
            +
              module Iho
         
     | 
| 
       7 
7 
     | 
    
         
             
                module Init
         
     | 
| 
       8 
8 
     | 
    
         
             
                  def metadata_init(lang, script, locale, labels)
         
     | 
| 
       9 
9 
     | 
    
         
             
                    @meta = Metadata.new(lang, script, locale, labels)
         
     | 
| 
         @@ -18,12 +18,12 @@ module IsoDoc 
     | 
|
| 
       18 
18 
     | 
    
         
             
                    @i18n = I18n.new(
         
     | 
| 
       19 
19 
     | 
    
         
             
                      lang, script, locale: locale,
         
     | 
| 
       20 
20 
     | 
    
         
             
                                    i18nyaml: i18nyaml ||
         
     | 
| 
       21 
     | 
    
         
            -
                      Metanorma:: 
     | 
| 
      
 21 
     | 
    
         
            +
                      Metanorma::Iho.configuration.i18nyaml || @i18nyaml
         
     | 
| 
       22 
22 
     | 
    
         
             
                    )
         
     | 
| 
       23 
23 
     | 
    
         
             
                  end
         
     | 
| 
       24 
24 
     | 
    
         | 
| 
       25 
25 
     | 
    
         
             
                  def bibrenderer(options = {})
         
     | 
| 
       26 
     | 
    
         
            -
                    ::Relaton::Render:: 
     | 
| 
      
 26 
     | 
    
         
            +
                    ::Relaton::Render::Iho::General.new(options.merge(language: @lang,
         
     | 
| 
       27 
27 
     | 
    
         
             
                                                                      i18nhash: @i18n.get))
         
     | 
| 
       28 
28 
     | 
    
         
             
                  end
         
     | 
| 
       29 
29 
     | 
    
         | 
    
        data/lib/isodoc/iho/metadata.rb
    CHANGED
    
    
| 
         @@ -3,7 +3,7 @@ require "metanorma-generic" 
     | 
|
| 
       3 
3 
     | 
    
         
             
            require_relative "base_convert"
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            module IsoDoc
         
     | 
| 
       6 
     | 
    
         
            -
              module  
     | 
| 
      
 6 
     | 
    
         
            +
              module Iho
         
     | 
| 
       7 
7 
     | 
    
         
             
                # A {Converter} implementation that generates PDF HTML output, and a
         
     | 
| 
       8 
8 
     | 
    
         
             
                # document schema encapsulation of the document for validation
         
     | 
| 
       9 
9 
     | 
    
         
             
                class PdfConvert < IsoDoc::Generic::PdfConvert
         
     | 
| 
         @@ -4,7 +4,7 @@ require "metanorma-generic" 
     | 
|
| 
       4 
4 
     | 
    
         
             
            require_relative "../../relaton/render/general"
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            module IsoDoc
         
     | 
| 
       7 
     | 
    
         
            -
              module  
     | 
| 
      
 7 
     | 
    
         
            +
              module Iho
         
     | 
| 
       8 
8 
     | 
    
         
             
                class PresentationXMLConvert < IsoDoc::Generic::PresentationXMLConvert
         
     | 
| 
       9 
9 
     | 
    
         
             
                  def norm_ref_entry_code(ordinal, _idents, _ids, _standard, _datefn, _bib)
         
     | 
| 
       10 
10 
     | 
    
         
             
                    "[#{ordinal}]<tab/>"
         
     | 
| 
         @@ -3,7 +3,7 @@ require "isodoc/generic/word_convert" 
     | 
|
| 
       3 
3 
     | 
    
         
             
            require_relative "init"
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            module IsoDoc
         
     | 
| 
       6 
     | 
    
         
            -
              module  
     | 
| 
      
 6 
     | 
    
         
            +
              module Iho
         
     | 
| 
       7 
7 
     | 
    
         
             
                # A {Converter} implementation that generates Word output, and a document
         
     | 
| 
       8 
8 
     | 
    
         
             
                # schema encapsulation of the document for validation
         
     | 
| 
       9 
9 
     | 
    
         
             
                class WordConvert < IsoDoc::Generic::WordConvert
         
     | 
    
        data/lib/isodoc/iho/xref.rb
    CHANGED
    
    
| 
         @@ -72,6 +72,9 @@ standards defining organization, and that is rendered in a distinct manner</a:do 
     | 
|
| 
       72 
72 
     | 
    
         
             
            from other documents in the same doctype</a:documentation>
         
     | 
| 
       73 
73 
     | 
    
         
             
                  </ref>
         
     | 
| 
       74 
74 
     | 
    
         
             
                </optional>
         
     | 
| 
      
 75 
     | 
    
         
            +
                <ref name="flavor">
         
     | 
| 
      
 76 
     | 
    
         
            +
                  <a:documentation>Flavour of Metanorma used to process this document</a:documentation>
         
     | 
| 
      
 77 
     | 
    
         
            +
                </ref>
         
     | 
| 
       75 
78 
     | 
    
         
             
                <optional>
         
     | 
| 
       76 
79 
     | 
    
         
             
                  <ref name="editorialgroup">
         
     | 
| 
       77 
80 
     | 
    
         
             
                    <a:documentation>Groups associated with the production of the standards document, typically within
         
     | 
| 
         @@ -113,6 +116,16 @@ a standards definition organization</a:documentation> 
     | 
|
| 
       113 
116 
     | 
    
         
             
              <define name="DocumentSubtype">
         
     | 
| 
       114 
117 
     | 
    
         
             
                <text/>
         
     | 
| 
       115 
118 
     | 
    
         
             
              </define>
         
     | 
| 
      
 119 
     | 
    
         
            +
              <define name="flavor">
         
     | 
| 
      
 120 
     | 
    
         
            +
                <element name="flavor">
         
     | 
| 
      
 121 
     | 
    
         
            +
                  <ref name="MetanormaFlavor"/>
         
     | 
| 
      
 122 
     | 
    
         
            +
                </element>
         
     | 
| 
      
 123 
     | 
    
         
            +
              </define>
         
     | 
| 
      
 124 
     | 
    
         
            +
              <define name="MetanormaFlavor">
         
     | 
| 
      
 125 
     | 
    
         
            +
                <a:documentation>This is in fact an enum, as of this writing: standoc iso generic ietf ieee itu nist ogc csa cc iho ribose jis iec bsi bipm plateau.
         
     | 
| 
      
 126 
     | 
    
         
            +
            However we prefer not to hardcode it, given ongoing extension.</a:documentation>
         
     | 
| 
      
 127 
     | 
    
         
            +
                <text/>
         
     | 
| 
      
 128 
     | 
    
         
            +
              </define>
         
     | 
| 
       116 
129 
     | 
    
         
             
              <define name="editorialgroup">
         
     | 
| 
       117 
130 
     | 
    
         
             
                <a:documentation>A group associated with the production of the standards document, typically within
         
     | 
| 
       118 
131 
     | 
    
         
             
            a standards definition organization</a:documentation>
         
     | 
| 
         @@ -1382,18 +1382,7 @@ Applies whether the resource has already been created or not, and whether it is 
     | 
|
| 
       1382 
1382 
     | 
    
         
             
              <define name="bdate">
         
     | 
| 
       1383 
1383 
     | 
    
         
             
                <a:documentation>Significant date in the lifecycle of the bibliographic item, including its production and its access</a:documentation>
         
     | 
| 
       1384 
1384 
     | 
    
         
             
                <element name="date">
         
     | 
| 
       1385 
     | 
    
         
            -
                  < 
     | 
| 
       1386 
     | 
    
         
            -
                    <a:documentation>The phase of the production of or access to a bibliographic item</a:documentation>
         
     | 
| 
       1387 
     | 
    
         
            -
                    <choice>
         
     | 
| 
       1388 
     | 
    
         
            -
                      <ref name="BibliographicDateType"/>
         
     | 
| 
       1389 
     | 
    
         
            -
                      <text/>
         
     | 
| 
       1390 
     | 
    
         
            -
                    </choice>
         
     | 
| 
       1391 
     | 
    
         
            -
                  </attribute>
         
     | 
| 
       1392 
     | 
    
         
            -
                  <optional>
         
     | 
| 
       1393 
     | 
    
         
            -
                    <attribute name="text">
         
     | 
| 
       1394 
     | 
    
         
            -
                      <a:documentation>An optional textual description of the date, especially when a Gregorian date is not applicable</a:documentation>
         
     | 
| 
       1395 
     | 
    
         
            -
                    </attribute>
         
     | 
| 
       1396 
     | 
    
         
            -
                  </optional>
         
     | 
| 
      
 1385 
     | 
    
         
            +
                  <ref name="bDateAttributes"/>
         
     | 
| 
       1397 
1386 
     | 
    
         
             
                  <optional>
         
     | 
| 
       1398 
1387 
     | 
    
         
             
                    <choice>
         
     | 
| 
       1399 
1388 
     | 
    
         
             
                      <group>
         
     | 
| 
         @@ -1416,6 +1405,20 @@ Applies whether the resource has already been created or not, and whether it is 
     | 
|
| 
       1416 
1405 
     | 
    
         
             
                  </optional>
         
     | 
| 
       1417 
1406 
     | 
    
         
             
                </element>
         
     | 
| 
       1418 
1407 
     | 
    
         
             
              </define>
         
     | 
| 
      
 1408 
     | 
    
         
            +
              <define name="bDateAttributes">
         
     | 
| 
      
 1409 
     | 
    
         
            +
                <attribute name="type">
         
     | 
| 
      
 1410 
     | 
    
         
            +
                  <a:documentation>The phase of the production of or access to a bibliographic item</a:documentation>
         
     | 
| 
      
 1411 
     | 
    
         
            +
                  <choice>
         
     | 
| 
      
 1412 
     | 
    
         
            +
                    <ref name="BibliographicDateType"/>
         
     | 
| 
      
 1413 
     | 
    
         
            +
                    <text/>
         
     | 
| 
      
 1414 
     | 
    
         
            +
                  </choice>
         
     | 
| 
      
 1415 
     | 
    
         
            +
                </attribute>
         
     | 
| 
      
 1416 
     | 
    
         
            +
                <optional>
         
     | 
| 
      
 1417 
     | 
    
         
            +
                  <attribute name="text">
         
     | 
| 
      
 1418 
     | 
    
         
            +
                    <a:documentation>An optional textual description of the date, especially when a Gregorian date is not applicable</a:documentation>
         
     | 
| 
      
 1419 
     | 
    
         
            +
                  </attribute>
         
     | 
| 
      
 1420 
     | 
    
         
            +
                </optional>
         
     | 
| 
      
 1421 
     | 
    
         
            +
              </define>
         
     | 
| 
       1419 
1422 
     | 
    
         
             
              <define name="docidentifier">
         
     | 
| 
       1420 
1423 
     | 
    
         
             
                <a:documentation>An identifier of a bibliographic item in an international standard scheme</a:documentation>
         
     | 
| 
       1421 
1424 
     | 
    
         
             
                <element name="docidentifier">
         
     | 
| 
         @@ -1884,6 +1887,10 @@ Detailed in https://www.relaton.org/model/relations/</a:documentation> 
     | 
|
| 
       1884 
1887 
     | 
    
         
             
                  <value>hasAnnotation</value>
         
     | 
| 
       1885 
1888 
     | 
    
         
             
                  <value>draftOf</value>
         
     | 
| 
       1886 
1889 
     | 
    
         
             
                  <value>hasDraft</value>
         
     | 
| 
      
 1890 
     | 
    
         
            +
                  <value>preliminaryDraftOf</value>
         
     | 
| 
      
 1891 
     | 
    
         
            +
                  <value>hasPreliminaryDraft</value>
         
     | 
| 
      
 1892 
     | 
    
         
            +
                  <value>revisionDraftOf</value>
         
     | 
| 
      
 1893 
     | 
    
         
            +
                  <value>hasRevisionDraft</value>
         
     | 
| 
       1887 
1894 
     | 
    
         
             
                  <value>editionOf</value>
         
     | 
| 
       1888 
1895 
     | 
    
         
             
                  <value>hasEdition</value>
         
     | 
| 
       1889 
1896 
     | 
    
         
             
                  <value>updates</value>
         
     | 
| 
         @@ -2,7 +2,7 @@ require "metanorma/standoc/converter" 
     | 
|
| 
       2 
2 
     | 
    
         
             
            require "metanorma/generic/converter"
         
     | 
| 
       3 
3 
     | 
    
         | 
| 
       4 
4 
     | 
    
         
             
            module Metanorma
         
     | 
| 
       5 
     | 
    
         
            -
              module  
     | 
| 
      
 5 
     | 
    
         
            +
              module Iho
         
     | 
| 
       6 
6 
     | 
    
         
             
                class Converter < Metanorma::Generic::Converter
         
     | 
| 
       7 
7 
     | 
    
         
             
                  XML_ROOT_TAG = "iho-standard".freeze
         
     | 
| 
       8 
8 
     | 
    
         
             
                  XML_NAMESPACE = "https://www.metanorma.org/ns/iho".freeze
         
     | 
| 
         @@ -97,27 +97,27 @@ module Metanorma 
     | 
|
| 
       97 
97 
     | 
    
         
             
                  end
         
     | 
| 
       98 
98 
     | 
    
         | 
| 
       99 
99 
     | 
    
         
             
                  def configuration
         
     | 
| 
       100 
     | 
    
         
            -
                    Metanorma:: 
     | 
| 
      
 100 
     | 
    
         
            +
                    Metanorma::Iho.configuration
         
     | 
| 
       101 
101 
     | 
    
         
             
                  end
         
     | 
| 
       102 
102 
     | 
    
         | 
| 
       103 
103 
     | 
    
         
             
                  def presentation_xml_converter(node)
         
     | 
| 
       104 
     | 
    
         
            -
                    IsoDoc:: 
     | 
| 
      
 104 
     | 
    
         
            +
                    IsoDoc::Iho::PresentationXMLConvert
         
     | 
| 
       105 
105 
     | 
    
         
             
                      .new(html_extract_attributes(node)
         
     | 
| 
       106 
     | 
    
         
            -
                      .merge(output_formats: ::Metanorma:: 
     | 
| 
      
 106 
     | 
    
         
            +
                      .merge(output_formats: ::Metanorma::Iho::Processor.new.output_formats))
         
     | 
| 
       107 
107 
     | 
    
         
             
                  end
         
     | 
| 
       108 
108 
     | 
    
         | 
| 
       109 
109 
     | 
    
         
             
                  def html_converter(node)
         
     | 
| 
       110 
     | 
    
         
            -
                    IsoDoc:: 
     | 
| 
      
 110 
     | 
    
         
            +
                    IsoDoc::Iho::HtmlConvert.new(html_extract_attributes(node))
         
     | 
| 
       111 
111 
     | 
    
         
             
                  end
         
     | 
| 
       112 
112 
     | 
    
         | 
| 
       113 
113 
     | 
    
         
             
                  def pdf_converter(node)
         
     | 
| 
       114 
114 
     | 
    
         
             
                    return nil if node.attr("no-pdf")
         
     | 
| 
       115 
115 
     | 
    
         | 
| 
       116 
     | 
    
         
            -
                    IsoDoc:: 
     | 
| 
      
 116 
     | 
    
         
            +
                    IsoDoc::Iho::PdfConvert.new(pdf_extract_attributes(node))
         
     | 
| 
       117 
117 
     | 
    
         
             
                  end
         
     | 
| 
       118 
118 
     | 
    
         | 
| 
       119 
119 
     | 
    
         
             
                  def doc_converter(node)
         
     | 
| 
       120 
     | 
    
         
            -
                    IsoDoc:: 
     | 
| 
      
 120 
     | 
    
         
            +
                    IsoDoc::Iho::WordConvert.new(doc_extract_attributes(node))
         
     | 
| 
       121 
121 
     | 
    
         
             
                  end
         
     | 
| 
       122 
122 
     | 
    
         
             
                end
         
     | 
| 
       123 
123 
     | 
    
         
             
              end
         
     | 
| 
         @@ -1,10 +1,10 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            require "metanorma/processor"
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            module Metanorma
         
     | 
| 
       4 
     | 
    
         
            -
              module  
     | 
| 
      
 4 
     | 
    
         
            +
              module Iho
         
     | 
| 
       5 
5 
     | 
    
         
             
                class Processor < Metanorma::Generic::Processor
         
     | 
| 
       6 
6 
     | 
    
         
             
                  def configuration
         
     | 
| 
       7 
     | 
    
         
            -
                    Metanorma:: 
     | 
| 
      
 7 
     | 
    
         
            +
                    Metanorma::Iho.configuration
         
     | 
| 
       8 
8 
     | 
    
         
             
                  end
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                  def output_formats
         
     | 
| 
         @@ -16,20 +16,20 @@ module Metanorma 
     | 
|
| 
       16 
16 
     | 
    
         
             
                  end
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
18 
     | 
    
         
             
                  def version
         
     | 
| 
       19 
     | 
    
         
            -
                    "Metanorma:: 
     | 
| 
      
 19 
     | 
    
         
            +
                    "Metanorma::Iho #{Metanorma::Iho::VERSION}"
         
     | 
| 
       20 
20 
     | 
    
         
             
                  end
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
                  def output(isodoc_node, inname, outname, format, options={})
         
     | 
| 
       23 
23 
     | 
    
         
             
                    options_preprocess(options)
         
     | 
| 
       24 
24 
     | 
    
         
             
                    case format
         
     | 
| 
       25 
25 
     | 
    
         
             
                    when :html
         
     | 
| 
       26 
     | 
    
         
            -
                      IsoDoc:: 
     | 
| 
      
 26 
     | 
    
         
            +
                      IsoDoc::Iho::HtmlConvert.new(options).convert(inname, isodoc_node, nil, outname)
         
     | 
| 
       27 
27 
     | 
    
         
             
                    when :doc
         
     | 
| 
       28 
     | 
    
         
            -
                      IsoDoc:: 
     | 
| 
      
 28 
     | 
    
         
            +
                      IsoDoc::Iho::WordConvert.new(options).convert(inname, isodoc_node, nil, outname)
         
     | 
| 
       29 
29 
     | 
    
         
             
                    when :pdf
         
     | 
| 
       30 
     | 
    
         
            -
                      IsoDoc:: 
     | 
| 
      
 30 
     | 
    
         
            +
                      IsoDoc::Iho::PdfConvert.new(options).convert(inname, isodoc_node, nil, outname)
         
     | 
| 
       31 
31 
     | 
    
         
             
                    when :presentation
         
     | 
| 
       32 
     | 
    
         
            -
                      IsoDoc:: 
     | 
| 
      
 32 
     | 
    
         
            +
                      IsoDoc::Iho::PresentationXMLConvert.new(options).convert(inname, isodoc_node, nil, outname)
         
     | 
| 
       33 
33 
     | 
    
         
             
                    else
         
     | 
| 
       34 
34 
     | 
    
         
             
                      super
         
     | 
| 
       35 
35 
     | 
    
         
             
                    end
         
     | 
    
        data/lib/metanorma/iho.rb
    CHANGED
    
    | 
         @@ -3,7 +3,7 @@ require "metanorma-generic" 
     | 
|
| 
       3 
3 
     | 
    
         
             
            require "metanorma/iho/processor"
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            module Metanorma
         
     | 
| 
       6 
     | 
    
         
            -
              module  
     | 
| 
      
 6 
     | 
    
         
            +
              module Iho
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
                class Configuration < Metanorma::Generic::Configuration
         
     | 
| 
       9 
9 
     | 
    
         
             
                  def initialize(*args)
         
     | 
| 
         @@ -29,4 +29,4 @@ module Metanorma 
     | 
|
| 
       29 
29 
     | 
    
         
             
                configure {}
         
     | 
| 
       30 
30 
     | 
    
         
             
              end
         
     | 
| 
       31 
31 
     | 
    
         
             
            end
         
     | 
| 
       32 
     | 
    
         
            -
            Metanorma::Registry.instance.register(Metanorma:: 
     | 
| 
      
 32 
     | 
    
         
            +
            Metanorma::Registry.instance.register(Metanorma::Iho::Processor)
         
     | 
    
        data/lib/metanorma-iho.rb
    CHANGED
    
    
| 
         @@ -4,7 +4,7 @@ require_relative "parse" 
     | 
|
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            module Relaton
         
     | 
| 
       6 
6 
     | 
    
         
             
              module Render
         
     | 
| 
       7 
     | 
    
         
            -
                module  
     | 
| 
      
 7 
     | 
    
         
            +
                module Iho
         
     | 
| 
       8 
8 
     | 
    
         
             
                  class General < ::Relaton::Render::IsoDoc::General
         
     | 
| 
       9 
9 
     | 
    
         
             
                    def config_loc
         
     | 
| 
       10 
10 
     | 
    
         
             
                      YAML.load_file(File.join(File.dirname(__FILE__), "config.yml"))
         
     | 
| 
         @@ -12,8 +12,8 @@ module Relaton 
     | 
|
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
                    def klass_initialize(_options)
         
     | 
| 
       14 
14 
     | 
    
         
             
                      super
         
     | 
| 
       15 
     | 
    
         
            -
                      @fieldsklass = Relaton::Render:: 
     | 
| 
       16 
     | 
    
         
            -
                      @parseklass = Relaton::Render:: 
     | 
| 
      
 15 
     | 
    
         
            +
                      @fieldsklass = Relaton::Render::Iho::Fields
         
     | 
| 
      
 16 
     | 
    
         
            +
                      @parseklass = Relaton::Render::Iho::Parse
         
     | 
| 
       17 
17 
     | 
    
         
             
                    end
         
     | 
| 
       18 
18 
     | 
    
         
             
                  end
         
     | 
| 
       19 
19 
     | 
    
         
             
                end
         
     | 
    
        data/lib/relaton/render/parse.rb
    CHANGED
    
    
    
        data/metanorma-iho.gemspec
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: metanorma-iho
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.5
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Ribose Inc.
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2024- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2024-10-14 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: metanorma-generic
         
     |