metanorma-ogc 2.9.0 → 2.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 065450d18c49c89724b52b0db86721eb2abe6fc843322b043f92e3c7082aac4f
4
- data.tar.gz: fb90b5aba879eb33d3c6debfebbd171dd4b33cc387450048e0ad247992cd2243
3
+ metadata.gz: 2f51704a20c55c282a8557e05cb5d20425e3f08a63759aaa0ad9ae9d8d69e188
4
+ data.tar.gz: b9ff0a479fb5cd4e1ca3b84d9aae9962869da3111d33b59ceed42f84f1a30a9d
5
5
  SHA512:
6
- metadata.gz: 6df39210730df8aa755c8c536b212957c69d5474ecbdbeb2173c4ef6febd813bc0c2864647e998b047ed8dbedccf38fbf3c244473c82b0f46ef341b042cdbf97
7
- data.tar.gz: d22994f820930f4fc86af8db65d2d6dc009900b02b56386b0f0de227d507f47a49e2256e76ae0724abbcb4ecb0195e7ea670be8984bd6bb388b1f9ecad009277
6
+ metadata.gz: b9551ab0f6a1f0c43fdfbc07e4b3635417e7d3b2e0e5d6389c4ee790419b4159c92d2eabb1d2a55952117f632695c73daef712732fbb93bd6c7792379f85496f
7
+ data.tar.gz: c7e7e94b1c2f381b57fde63598efb59c5bff3ed94ef97001cfa158986cebc46314dd1ee7ec4dce1aebf15b6c8f0a5bd36f8d3159cc15e7ba916526d928f77df0
@@ -896,26 +896,26 @@ dl pre {
896
896
  list-style-type: none;
897
897
  }
898
898
 
899
- .figure .FigureTitle, .figure .figure-title {
899
+ figure figcaption {
900
900
  font-weight: 700;
901
901
  font-size: 1em;
902
902
  text-align: center;
903
903
  }
904
- .figure > img, .figure > svg {
904
+ figure > img, figure > svg {
905
905
  margin-left: auto;
906
906
  margin-right: auto;
907
907
  display: block;
908
908
  max-width: 100%;
909
909
  height: auto;
910
910
  }
911
- .figure {
911
+ figure {
912
912
  line-height: 1.6em;
913
913
  padding: 1.5em;
914
914
  margin: 2em 0 1em 0;
915
915
  overflow: auto;
916
916
  }
917
917
 
918
- table div.figure {
918
+ table figure {
919
919
  padding: 0;
920
920
  margin: 0;
921
921
  }
@@ -1211,7 +1211,7 @@ td > p:last-child, th > p:last-child {
1211
1211
  margin-bottom: 0em;
1212
1212
  }
1213
1213
 
1214
- p.TableTitle {
1214
+ table > caption {
1215
1215
  text-align: center;
1216
1216
  margin-top: 2.5em;
1217
1217
  font-weight: 400;
@@ -1271,8 +1271,12 @@ p.Biblio, p.NormRef, div.Biblio, div.NormRef {
1271
1271
  margin-left: 2em;
1272
1272
  }
1273
1273
 
1274
+ .Biblio.note, .Biblio.Note, .NormRef.note, .NormRef.Note {
1275
+ margin-left: 3em;
1276
+ }
1277
+
1274
1278
  /* Blocks */
1275
- .SourceTitle, .FigureTitle {
1279
+ .SourceTitle, figcaption {
1276
1280
  font-weight: 700;
1277
1281
  font-size: 1em;
1278
1282
  text-align: center;
@@ -1325,7 +1329,7 @@ pre, .sourcecode {
1325
1329
  margin: 0;
1326
1330
  }
1327
1331
 
1328
- .figure, pre, .pseudocode, .sourcecode {
1332
+ figure, pre, .pseudocode, .sourcecode {
1329
1333
  background-color: #e1eef1;
1330
1334
  color: #424242;
1331
1335
  font-size: {{monospacefontsize}};
@@ -148,11 +148,11 @@ nav {
148
148
  }
149
149
  }
150
150
 
151
- .figure {
151
+ figure {
152
152
  @include figureBlock();
153
153
  }
154
154
 
155
- table div.figure {
155
+ table figure {
156
156
  padding: 0;
157
157
  margin: 0;
158
158
  }
@@ -374,7 +374,7 @@ td > p:last-child, th > p:last-child {
374
374
  }
375
375
 
376
376
 
377
- p.TableTitle {
377
+ table > caption {
378
378
  text-align: center;
379
379
  margin-top: 2.5em;
380
380
  font-weight: 400;
@@ -421,10 +421,13 @@ p.Biblio, p.NormRef, div.Biblio, div.NormRef {
421
421
  margin-left: 2em;
422
422
  }
423
423
 
424
+ .Biblio.note, .Biblio.Note, .NormRef.note, .NormRef.Note {
425
+ margin-left: 3em;
426
+ }
424
427
 
425
428
  /* Blocks */
426
429
 
427
- .SourceTitle, .FigureTitle {
430
+ .SourceTitle, figcaption {
428
431
  @include blockTitle();
429
432
  }
430
433
 
@@ -463,7 +466,7 @@ pre, .sourcecode {
463
466
  }
464
467
  }
465
468
 
466
- .figure, pre, .pseudocode, .sourcecode {
469
+ figure, pre, .pseudocode, .sourcecode {
467
470
  background-color: #e1eef1;
468
471
  color: #424242;
469
472
  font-size: $monospacefontsize;
@@ -141,12 +141,12 @@ module IsoDoc
141
141
  end
142
142
 
143
143
  def figure_parse1(node, out)
144
- out.div **figure_attrs(node) do |div|
144
+ out.figure **figure_attrs(node) do |div|
145
145
  node.children.each do |n|
146
146
  parse(n, div) unless n.name == "fmt-name"
147
147
  end
148
+ figure_name_parse(node, out, node.at(ns("./fmt-name")))
148
149
  end
149
- figure_name_parse(node, out, node.at(ns("./fmt-name")))
150
150
  end
151
151
 
152
152
  def html_cleanup(html)
@@ -42,7 +42,7 @@ module IsoDoc
42
42
 
43
43
  def logo_new
44
44
  File.expand_path(File.join(File.dirname(__FILE__), "html",
45
- "logo.2021.svg"))
45
+ "logo.2021.svg"))
46
46
  end
47
47
 
48
48
  def images(_isoxml, _out)
@@ -35,7 +35,7 @@
35
35
 
36
36
  <xsl:variable name="doctype">
37
37
  <xsl:call-template name="capitalizeWords">
38
- <xsl:with-param name="str" select="/mn:metanorma/mn:bibdata/mn:ext/mn:doctype"/>
38
+ <xsl:with-param name="str"><xsl:call-template name="getDoctype"/></xsl:with-param>
39
39
  </xsl:call-template>
40
40
  </xsl:variable>
41
41
 
@@ -528,7 +528,7 @@
528
528
  </xsl:for-each>
529
529
  <!-- </xsl:for-each> -->
530
530
 
531
- <xsl:apply-templates select="//mn:indexsect" mode="sections"/>
531
+ <!-- <xsl:apply-templates select="//mn:indexsect" mode="sections"/> -->
532
532
 
533
533
  </xsl:for-each>
534
534
 
@@ -1185,8 +1185,8 @@
1185
1185
  <!-- <xsl:apply-templates select="."/> -->
1186
1186
 
1187
1187
  <xsl:choose>
1188
- <xsl:when test="self::mn:indexsect">
1189
- <xsl:apply-templates select="."/>
1188
+ <xsl:when test=".//mn:indexsect">
1189
+ <xsl:apply-templates select=".//mn:indexsect" mode="index"/>
1190
1190
  </xsl:when>
1191
1191
  <xsl:otherwise>
1192
1192
  <xsl:apply-templates/>
@@ -1199,6 +1199,16 @@
1199
1199
 
1200
1200
  </xsl:template>
1201
1201
 
1202
+ <xsl:template match="mn:indexsect"/>
1203
+ <xsl:template match="mn:indexsect" mode="index">
1204
+ <fo:block id="{@id}" span="all">
1205
+ <xsl:apply-templates select="mn:fmt-title"/>
1206
+ </fo:block>
1207
+ <fo:block role="Index">
1208
+ <xsl:apply-templates select="*[not(self::mn:fmt-title)]"/>
1209
+ </fo:block>
1210
+ </xsl:template>
1211
+
1202
1212
  <xsl:template match="node()">
1203
1213
  <xsl:apply-templates/>
1204
1214
  </xsl:template>
@@ -1240,18 +1250,21 @@
1240
1250
  <xsl:call-template name="getName"/>
1241
1251
  </xsl:variable>
1242
1252
 
1243
- <xsl:variable name="type">
1244
- <xsl:value-of select="local-name()"/>
1245
- </xsl:variable>
1253
+ <xsl:variable name="type" select="local-name()"/>
1246
1254
 
1247
1255
  <mnx:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
1256
+ <xsl:if test="$type = 'indexsect'">
1257
+ <xsl:attribute name="level">1</xsl:attribute>
1258
+ </xsl:if>
1248
1259
  <xsl:if test="ancestor::mn:annex">
1249
1260
  <xsl:attribute name="parent">annex</xsl:attribute>
1250
1261
  </xsl:if>
1251
1262
  <mnx:title>
1252
1263
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
1253
1264
  </mnx:title>
1254
- <xsl:apply-templates mode="contents"/>
1265
+ <xsl:if test="$type != 'indexsect'">
1266
+ <xsl:apply-templates mode="contents"/>
1267
+ </xsl:if>
1255
1268
  </mnx:item>
1256
1269
  </xsl:if>
1257
1270
 
@@ -1830,7 +1843,9 @@
1830
1843
  <xsl:param name="title"/>
1831
1844
  <xsl:param name="level">1</xsl:param>
1832
1845
  <fo:block>
1833
- <fo:block font-size="18pt" color="{$color_text_title}" keep-with-next="always" line-height="150%">
1846
+ <xsl:variable name="title_styles"><styles xsl:use-attribute-sets="title-style"/></xsl:variable>
1847
+ <fo:block line-height="150%">
1848
+ <xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*[local-name() = 'font-size' or local-name() = 'color' or local-name() = 'keep-with-next']"/>
1834
1849
  <xsl:if test="$section != ''">
1835
1850
  <fo:inline padding-right="2mm">
1836
1851
  <xsl:call-template name="addLetterSpacing">
@@ -3414,7 +3429,23 @@
3414
3429
  <xsl:sort select="@displayorder" data-type="number"/>
3415
3430
  <xsl:element name="page_sequence" namespace="{$namespace_full}">
3416
3431
  <xsl:attribute name="main_page_sequence"/>
3417
- <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
3432
+
3433
+ <!-- from common <xsl:template name="index-pages"> -->
3434
+ <xsl:variable name="docid">
3435
+ <xsl:call-template name="getDocumentId"/>
3436
+ </xsl:variable>
3437
+
3438
+ <xsl:variable name="current_document_index_id">
3439
+ <xsl:apply-templates select="." mode="index_add_id">
3440
+ <xsl:with-param name="docid" select="$docid"/>
3441
+ </xsl:apply-templates>
3442
+ </xsl:variable>
3443
+ <xsl:variable name="current_document_index">
3444
+ <xsl:apply-templates select="xalan:nodeset($current_document_index_id)" mode="index_update"/>
3445
+ </xsl:variable>
3446
+
3447
+ <!-- xalan:nodeset($current_document_index) -->
3448
+ <xsl:apply-templates select="xalan:nodeset($current_document_index)" mode="update_xml_step_move_pagebreak"/>
3418
3449
  </xsl:element>
3419
3450
  </xsl:for-each>
3420
3451
  </xsl:template>
@@ -4511,6 +4542,7 @@
4511
4542
  </xsl:template>
4512
4543
 
4513
4544
  <xsl:attribute-set name="tt-style">
4545
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
4514
4546
  <xsl:attribute name="font-family">Fira Code, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
4515
4547
  </xsl:attribute-set>
4516
4548
 
@@ -6318,6 +6350,11 @@
6318
6350
  <!-- Display table's name before table as standalone block -->
6319
6351
  <!-- $namespace = 'iso' or -->
6320
6352
  <xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
6353
+ <xsl:if test="not(mn:fmt-name)"> <!-- for https://github.com/metanorma/mn-samples-jis/issues/75#issuecomment-3922169930 -->
6354
+ <xsl:apply-templates select="mn:name">
6355
+ <xsl:with-param name="process">true</xsl:with-param>
6356
+ </xsl:apply-templates>
6357
+ </xsl:if>
6321
6358
  <xsl:call-template name="table_name_fn_display"/>
6322
6359
 
6323
6360
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
@@ -6569,7 +6606,13 @@
6569
6606
  </xsl:template>
6570
6607
 
6571
6608
  <!-- table/name-->
6572
- <xsl:template match="*[local-name()='table']/mn:fmt-name">
6609
+ <xsl:template match="mn:table[not(mn:fmt-name)]/mn:name"> <!-- for https://github.com/metanorma/mn-samples-jis/issues/75#issuecomment-3922169930 -->
6610
+ <xsl:param name="process">false</xsl:param>
6611
+ <xsl:if test="$process = 'true'">
6612
+ <xsl:call-template name="table_name"/>
6613
+ </xsl:if>
6614
+ </xsl:template>
6615
+ <xsl:template match="*[local-name()='table']/mn:fmt-name" name="table_name">
6573
6616
  <xsl:param name="continued"/>
6574
6617
  <xsl:param name="cols-count"/>
6575
6618
  <xsl:if test="normalize-space() != ''">
@@ -7045,12 +7088,14 @@
7045
7088
  <xsl:param name="colwidths"/>
7046
7089
  <xsl:param name="colgroup"/>
7047
7090
 
7048
- <xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ../mn:key or ..//mn:fn[not(parent::mn:fmt-name)] or ../mn:fmt-source or ../mn:p"/>
7091
+ <xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ../mn:key or (..//mn:fn[not(parent::mn:fmt-name)] and not(ancestor::mn:table[1]//mn:tfoot//mn:fmt-footnote-container)) or ../mn:fmt-source or ../mn:p"/>
7092
+ <!-- in JIS fmt-footnote-container renders in tfoot, so no need render fn in the separate table -->
7049
7093
 
7050
- <xsl:variable name="isNoteOrFnExistShowAfterTable">
7094
+ <xsl:variable name="isNoteOrFnExistShowAfterTable_">
7051
7095
  </xsl:variable>
7096
+ <xsl:variable name="isNoteOrFnExistShowAfterTable" select="normalize-space($isNoteOrFnExistShowAfterTable_)"/>
7052
7097
 
7053
- <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
7098
+ <xsl:if test="$isNoteOrFnExist = 'true' or $isNoteOrFnExistShowAfterTable = 'true'">
7054
7099
 
7055
7100
  <xsl:variable name="cols-count">
7056
7101
  <xsl:choose>
@@ -12669,8 +12714,24 @@
12669
12714
  <!-- End Highlight syntax styles -->
12670
12715
 
12671
12716
  <!-- Index section styles -->
12717
+
12718
+ <xsl:attribute-set name="indexsect-region-body-style">
12719
+ <xsl:attribute name="column-count">2</xsl:attribute>
12720
+ <xsl:attribute name="column-gap">10mm</xsl:attribute>
12721
+ </xsl:attribute-set>
12722
+
12723
+ <xsl:attribute-set name="indexsect-title-block-style">
12724
+ <xsl:attribute name="role">SKIP</xsl:attribute>
12725
+ <xsl:attribute name="span">all</xsl:attribute>
12726
+ </xsl:attribute-set>
12727
+
12672
12728
  <xsl:attribute-set name="indexsect-title-style">
12673
12729
  <xsl:attribute name="role">H1</xsl:attribute>
12730
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
12731
+ <xsl:attribute name="margin-bottom">24pt</xsl:attribute>
12732
+ <xsl:attribute name="font-size">18pt</xsl:attribute>
12733
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
12734
+ <xsl:attribute name="color"><xsl:value-of select="$color_text_title"/></xsl:attribute>
12674
12735
  </xsl:attribute-set> <!-- indexsect-title-style -->
12675
12736
 
12676
12737
  <xsl:template name="refine_indexsect-title-style">
@@ -12696,6 +12757,27 @@
12696
12757
  </xsl:for-each>
12697
12758
  </xsl:variable>
12698
12759
 
12760
+ <xsl:template name="index-pages">
12761
+ <xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
12762
+
12763
+ <xsl:variable name="docid">
12764
+ <xsl:call-template name="getDocumentId"/>
12765
+ </xsl:variable>
12766
+
12767
+ <xsl:variable name="current_document_index_id">
12768
+ <xsl:apply-templates select="//mn:indexsect" mode="index_add_id">
12769
+ <xsl:with-param name="docid" select="$docid"/>
12770
+ </xsl:apply-templates>
12771
+ </xsl:variable>
12772
+ <xsl:variable name="current_document_index">
12773
+ <xsl:apply-templates select="xalan:nodeset($current_document_index_id)" mode="index_update"/>
12774
+ </xsl:variable>
12775
+
12776
+ <xsl:apply-templates select="xalan:nodeset($current_document_index)" mode="index">
12777
+ <xsl:with-param name="num" select="$num"/>
12778
+ </xsl:apply-templates>
12779
+ </xsl:template>
12780
+
12699
12781
  <xsl:template match="@*|node()" mode="index_add_id">
12700
12782
  <xsl:param name="docid"/>
12701
12783
  <xsl:copy>
@@ -12748,7 +12830,7 @@
12748
12830
  <xsl:template match="mn:indexsect//mn:li" mode="index_update">
12749
12831
  <xsl:copy>
12750
12832
  <xsl:apply-templates select="@*" mode="index_update"/>
12751
- <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
12833
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
12752
12834
  </xsl:copy>
12753
12835
  </xsl:template>
12754
12836
 
@@ -12956,11 +13038,24 @@
12956
13038
  <!-- End of Index processing -->
12957
13039
  <!-- =================== -->
12958
13040
 
12959
- <!-- =================== -->
13041
+ <xsl:attribute-set name="form-checkbox-style">
13042
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
13043
+ <xsl:attribute name="background-color">yellow</xsl:attribute>
13044
+ </xsl:attribute-set>
13045
+
13046
+ <xsl:variable name="METANORMA_FORM_START_PREFIX">_metanorma_form_start</xsl:variable>
13047
+ <xsl:variable name="METANORMA_FORM_ITEM_PREFIX">_metanorma_form_item_</xsl:variable>
13048
+ <xsl:variable name="METANORMA_FORM_ITEM_BORDER">1pt solid black</xsl:variable>
13049
+
13050
+ <!-- =================== -->
12960
13051
  <!-- Form's elements processing -->
12961
13052
  <!-- =================== -->
12962
13053
  <xsl:template match="mn:form">
12963
13054
  <fo:block>
13055
+ <fo:inline>
13056
+ <xsl:attribute name="id"><xsl:value-of select="concat($METANORMA_FORM_START_PREFIX, '___', @id, '___', @name)"/></xsl:attribute>
13057
+ <xsl:value-of select="$hair_space"/>
13058
+ </fo:inline>
12964
13059
  <xsl:apply-templates/>
12965
13060
  </fo:block>
12966
13061
  </xsl:template>
@@ -12969,7 +13064,23 @@
12969
13064
  <fo:inline><xsl:apply-templates/></fo:inline>
12970
13065
  </xsl:template>
12971
13066
 
12972
- <xsl:template match="mn:form//mn:input[@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
13067
+ <xsl:template match="mn:form//mn:input[@type = 'text']">
13068
+ <!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
13069
+ <fo:inline>
13070
+ <xsl:call-template name="set_id_metanorma_form_item">
13071
+ <xsl:with-param name="add_border_prefix">true</xsl:with-param>
13072
+ </xsl:call-template>
13073
+ <xsl:value-of select="$hair_space"/>
13074
+ </fo:inline>
13075
+ <fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove, this border needs for mn2pdf FOPIFFormsHandler -->
13076
+ <fo:inline>
13077
+ <xsl:call-template name="set_id_metanorma_form_item"/>
13078
+ <xsl:call-template name="text_input"/>
13079
+ </fo:inline>
13080
+ </fo:inline>
13081
+ </xsl:template>
13082
+
13083
+ <xsl:template match="mn:form//mn:input[@type = 'date' or @type = 'file' or @type = 'password']">
12973
13084
  <fo:inline>
12974
13085
  <xsl:call-template name="text_input"/>
12975
13086
  </fo:inline>
@@ -13001,7 +13112,20 @@
13001
13112
  </xsl:template>
13002
13113
 
13003
13114
  <xsl:template match="mn:form//mn:input[@type = 'checkbox']">
13004
- <fo:inline padding-right="1mm">
13115
+ <xsl:variable name="form_item_type">checkbox</xsl:variable>
13116
+ <!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
13117
+ <fo:inline>
13118
+ <xsl:call-template name="set_id_metanorma_form_item">
13119
+ <xsl:with-param name="form_item_type" select="$form_item_type"/>
13120
+ <xsl:with-param name="add_border_prefix">true</xsl:with-param>
13121
+ </xsl:call-template>
13122
+ <xsl:value-of select="$hair_space"/>
13123
+ </fo:inline>
13124
+
13125
+ <fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove 'border', this border needs for mn2pdf FOPIFFormsHandler -->
13126
+ <xsl:call-template name="set_id_metanorma_form_item">
13127
+ <xsl:with-param name="form_item_type" select="$form_item_type"/>
13128
+ </xsl:call-template>
13005
13129
  <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
13006
13130
  <xsl:attribute name="height">3.5mm</xsl:attribute>
13007
13131
  <xsl:attribute name="content-width">100%</xsl:attribute>
@@ -13011,11 +13135,24 @@
13011
13135
  <polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
13012
13136
  </svg>
13013
13137
  </fo:instream-foreign-object>
13014
- </fo:inline>
13138
+ </fo:inline><fo:inline padding-right="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
13015
13139
  </xsl:template>
13016
13140
 
13017
13141
  <xsl:template match="mn:form//mn:input[@type = 'radio']">
13018
- <fo:inline padding-right="1mm">
13142
+ <xsl:variable name="form_item_type">radiobutton</xsl:variable>
13143
+ <!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
13144
+ <fo:inline>
13145
+ <xsl:call-template name="set_id_metanorma_form_item">
13146
+ <xsl:with-param name="form_item_type" select="$form_item_type"/>
13147
+ <xsl:with-param name="add_border_prefix">true</xsl:with-param>
13148
+ </xsl:call-template>
13149
+ <xsl:value-of select="$hair_space"/>
13150
+ </fo:inline>
13151
+
13152
+ <fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove 'border', this border needs for mn2pdf FOPIFFormsHandler -->
13153
+ <xsl:call-template name="set_id_metanorma_form_item">
13154
+ <xsl:with-param name="form_item_type" select="$form_item_type"/>
13155
+ </xsl:call-template>
13019
13156
  <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
13020
13157
  <xsl:attribute name="height">3.5mm</xsl:attribute>
13021
13158
  <xsl:attribute name="content-width">100%</xsl:attribute>
@@ -13027,6 +13164,7 @@
13027
13164
  </svg>
13028
13165
  </fo:instream-foreign-object>
13029
13166
  </fo:inline>
13167
+ <fo:inline padding-right="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
13030
13168
  </xsl:template>
13031
13169
 
13032
13170
  <xsl:template match="mn:form//mn:select">
@@ -13036,11 +13174,28 @@
13036
13174
  </xsl:template>
13037
13175
 
13038
13176
  <xsl:template match="mn:form//mn:textarea">
13039
- <fo:block-container border="1pt solid black" width="50%">
13177
+ <fo:block-container border="{$METANORMA_FORM_ITEM_BORDER}" width="50%">
13040
13178
  <fo:block> </fo:block>
13041
13179
  </fo:block-container>
13042
13180
  </xsl:template>
13043
13181
 
13182
+ <xsl:template name="set_id_metanorma_form_item">
13183
+ <xsl:param name="form_item_type">textfield</xsl:param>
13184
+ <xsl:param name="add_border_prefix">false</xsl:param>
13185
+ <xsl:variable name="border_prefix"><xsl:if test="normalize-space($add_border_prefix) = 'true'">border_</xsl:if></xsl:variable>
13186
+ <xsl:if test="@id">
13187
+ <!-- _metanorma_form_item_border____form_item_type___id___name___value -->
13188
+ <!-- split by '___': [2] - form_item_type, [3] - id, [4] - name, [5] - value -->
13189
+ <xsl:variable name="value">
13190
+ <xsl:choose>
13191
+ <xsl:when test="@type = 'checkbox'"><xsl:value-of select="normalize-space(@checked = 'true')"/><!-- true or false --></xsl:when>
13192
+ <xsl:otherwise><xsl:value-of select="@value"/></xsl:otherwise>
13193
+ </xsl:choose>
13194
+ </xsl:variable>
13195
+ <xsl:attribute name="id"><xsl:value-of select="concat($METANORMA_FORM_ITEM_PREFIX, $border_prefix, '___', $form_item_type, '___', @id, '___', @name, '___', $value)"/></xsl:attribute>
13196
+ </xsl:if>
13197
+ </xsl:template>
13198
+
13044
13199
  <!-- =================== -->
13045
13200
  <!-- End Form's elements processing -->
13046
13201
  <!-- =================== -->
@@ -13097,6 +13252,7 @@
13097
13252
  </xsl:template>
13098
13253
 
13099
13254
  <xsl:attribute-set name="toc-pagenumber-style">
13255
+ <xsl:attribute name="role">SKIP</xsl:attribute>
13100
13256
  </xsl:attribute-set>
13101
13257
 
13102
13258
  <xsl:template name="refine_toc-pagenumber-style">
@@ -14927,7 +15083,12 @@
14927
15083
  <xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
14928
15084
  <xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
14929
15085
  <xsl:choose>
14930
- <xsl:when test="$external-destination = 'true' or $internal-destination = 'true'">
15086
+ <xsl:when test="$internal-destination = 'true'">
15087
+ <fo:wrapper role="Reference">
15088
+ <xsl:copy-of select="$element_node"/>
15089
+ </fo:wrapper>
15090
+ </xsl:when>
15091
+ <xsl:when test="$external-destination = 'true'">
14931
15092
  <xsl:copy-of select="$element_node"/>
14932
15093
  </xsl:when>
14933
15094
  <xsl:otherwise>