metanorma-plateau 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab9e5b170ac05003c3091580f6846e16b52599553cc6fbcaa7bc1ab11ebdd37f
4
- data.tar.gz: 0d53ba47be6206dd65ca377f008e2b6e7a8c062691d70b15e5e7bfc02e476794
3
+ metadata.gz: f474578bf251dbdf549e093c36ae63801cc828b9f5d5d6a580b422777efa1647
4
+ data.tar.gz: 9de3f8896b7c79ce3a4d017e6f23725dd7a46f12cba249c525c0e81069bb91dd
5
5
  SHA512:
6
- metadata.gz: af32cb85caa4f2ff962894f8c3d93ca4580b008e245715f3905ebc5a4c4cb26348c943438ebe43456aa36c6b23a352c04a9337a14224ce5465d6918f09e9ee48
7
- data.tar.gz: 664b495f66e07b6e557cb9e47e72d297a164063a512db4b94ae3be3d844e2b27c5ea52f75b96028bc912abcd279ad0d0ec826a3cdd41311662aac0135580b597
6
+ metadata.gz: 5630ef34150a346c8b3c9c653483a1e6e683e15458d9adb08639252984d67b325dde8d4a14144200a0aa740863839dd8abf92b02e0c8d198da0f9a21ca69f7e7
7
+ data.tar.gz: bd8a86b5914133550133f5f0270e8240f53acc83a8896760c8ac82ef3c55fff30572fed1801712b9dcffa273eacf4c55f63c546b56ffa99a6ba3c159d7ba0bfb
@@ -8,10 +8,6 @@ module IsoDoc
8
8
 
9
9
  def para_parse(node, out)
10
10
  out.p **attr_code(para_attrs(node)) do |p|
11
- unless @termdomain.empty?
12
- p << "&lt;#{@termdomain}&gt; "
13
- @termdomain = ""
14
- end
15
11
  @lang == "ja" and p << "&#x3000;"
16
12
  node.children.each { |n| parse(n, p) }
17
13
  end
@@ -11,9 +11,8 @@ module IsoDoc
11
11
  end
12
12
 
13
13
  def xref_init(lang, script, _klass, labels, options)
14
- @xrefs = Xref.new(lang, script,
15
- HtmlConvert.new(language: lang, script:),
16
- labels, options)
14
+ p = HtmlConvert.new(language: lang, script:)
15
+ @xrefs = Xref.new(lang, script, p, labels, options)
17
16
  end
18
17
 
19
18
  def i18n_init(lang, script, locale, i18nyaml = nil)
@@ -822,9 +822,10 @@
822
822
  <xsl:choose>
823
823
  <xsl:when test="normalize-space(@id) = ''">false</xsl:when>
824
824
  <xsl:when test="ancestor-or-self::plateau:annex and $level &gt;= 2">false</xsl:when>
825
- <xsl:when test="$type = 'bibliography' and $level &gt;= 2">false</xsl:when>
825
+ <!-- <xsl:when test="$type = 'bibliography' and $level &gt;= 2">false</xsl:when> -->
826
826
  <xsl:when test="$type = 'bibliography'">true</xsl:when>
827
- <xsl:when test="$type = 'references' and $level &gt;= 2">false</xsl:when>
827
+ <!-- <xsl:when test="$type = 'references' and $level &gt;= 2">false</xsl:when> -->
828
+ <xsl:when test="$type = 'references'">true</xsl:when>
828
829
  <xsl:when test="ancestor-or-self::plateau:colophon">true</xsl:when>
829
830
  <xsl:when test="$section = '' and $type = 'clause' and $level = 1 and ancestor::plateau:preface">true</xsl:when>
830
831
  <xsl:when test="$section = '' and $type = 'clause'">false</xsl:when>
@@ -873,6 +874,7 @@
873
874
  <xsl:template match="*[local-name() = 'preface']/*[local-name() = 'page_sequence']/*[local-name() = 'clause']" priority="3">
874
875
  <fo:block>
875
876
  <xsl:call-template name="setId"/>
877
+ <xsl:call-template name="addReviewHelper"/>
876
878
  <xsl:apply-templates/>
877
879
  </fo:block>
878
880
  </xsl:template>
@@ -5330,6 +5332,11 @@
5330
5332
 
5331
5333
  <xsl:value-of select="@reference"/>
5332
5334
 
5335
+ <!-- commented https://github.com/metanorma/isodoc/issues/614 -->
5336
+ <!-- <xsl:if test="$namespace = 'itu'">
5337
+ <xsl:text>)</xsl:text>
5338
+ </xsl:if> -->
5339
+
5333
5340
  <xsl:text>:</xsl:text>
5334
5341
 
5335
5342
  </fo:inline>
@@ -5341,7 +5348,7 @@
5341
5348
 
5342
5349
  </xsl:if>
5343
5350
  </xsl:for-each>
5344
- </xsl:template>
5351
+ </xsl:template> <!-- table_fn_display -->
5345
5352
 
5346
5353
  <xsl:template name="create_fn">
5347
5354
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -5369,8 +5376,10 @@
5369
5376
  <!-- EMD table's footnotes rendering -->
5370
5377
  <!-- ============================ -->
5371
5378
 
5379
+ <!-- ============================ -->
5372
5380
  <!-- figure's footnotes rendering -->
5373
- <xsl:template name="fn_display_figure">
5381
+ <!-- ============================ -->
5382
+ <xsl:template name="fn_display_figure"> <!-- figure_fn_display -->
5374
5383
 
5375
5384
  <!-- current figure id -->
5376
5385
  <xsl:variable name="figure_id_">
@@ -5483,9 +5492,28 @@
5483
5492
 
5484
5493
  </fo:block>
5485
5494
  </xsl:if>
5486
-
5487
5495
  </xsl:template> <!-- fn_display_figure -->
5488
5496
 
5497
+ <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
5498
+ <!-- figure's footnote label -->
5499
+ <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'dl'][@key = 'true']/*[local-name() = 'dt']/ *[local-name() = 'p'][count(node()[normalize-space() != '']) = 1]/*[local-name() = 'sup']" priority="3">
5500
+ <xsl:variable name="key_iso">
5501
+
5502
+ </xsl:variable>
5503
+ <xsl:if test="normalize-space($key_iso) = 'true'">
5504
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
5505
+
5506
+ </xsl:if>
5507
+ <fo:inline xsl:use-attribute-sets="figure-fn-number-style"> <!-- id="{@id}" -->
5508
+ <!-- <xsl:value-of select="@reference"/> -->
5509
+ <xsl:apply-templates/>
5510
+ </fo:inline>
5511
+ </xsl:template>
5512
+
5513
+ <!-- ============================ -->
5514
+ <!-- END: figure's footnotes rendering -->
5515
+ <!-- ============================ -->
5516
+
5489
5517
  <!-- fn reference in the text rendering (for instance, 'some text 1) some text' ) -->
5490
5518
  <xsl:template match="*[local-name()='fn']">
5491
5519
  <fo:inline xsl:use-attribute-sets="fn-reference-style">
@@ -5503,6 +5531,10 @@
5503
5531
 
5504
5532
  <xsl:value-of select="@reference"/>
5505
5533
 
5534
+ <!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
5535
+ <!-- <xsl:if test="$namespace = 'jis'">
5536
+ <fo:inline font-weight="normal">)</fo:inline>
5537
+ </xsl:if> -->
5506
5538
  </fo:basic-link>
5507
5539
  </fo:inline>
5508
5540
  </xsl:template>
@@ -5629,17 +5661,22 @@
5629
5661
  </fo:block>
5630
5662
  </xsl:when> <!-- END: a few components -->
5631
5663
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
5632
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
5664
+ <!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
5665
+ <xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
5633
5666
 
5634
- <xsl:call-template name="refine_figure_key_style"/>
5667
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
5635
5668
 
5636
- <xsl:variable name="title-key">
5637
- <xsl:call-template name="getLocalizedString">
5638
- <xsl:with-param name="key">key</xsl:with-param>
5639
- </xsl:call-template>
5640
- </xsl:variable>
5641
- <xsl:value-of select="$title-key"/>
5642
- </fo:block>
5669
+ <xsl:call-template name="refine_figure_key_style"/>
5670
+
5671
+ <xsl:variable name="title-key">
5672
+ <xsl:call-template name="getLocalizedString">
5673
+ <xsl:with-param name="key">key</xsl:with-param>
5674
+ </xsl:call-template>
5675
+ </xsl:variable>
5676
+ <xsl:value-of select="$title-key"/>
5677
+ </fo:block>
5678
+
5679
+ </xsl:if>
5643
5680
  </xsl:when> <!-- END: definition list in a figure -->
5644
5681
  </xsl:choose>
5645
5682
 
@@ -5825,6 +5862,14 @@
5825
5862
 
5826
5863
  </xsl:template> <!-- END: dl -->
5827
5864
 
5865
+ <!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
5866
+ <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
5867
+ <fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
5868
+ <xsl:call-template name="refine_figure_key_style"/>
5869
+ <xsl:apply-templates/>
5870
+ </fo:block>
5871
+ </xsl:template>
5872
+
5828
5873
  <xsl:template name="refine_dl_formula_where_style">
5829
5874
 
5830
5875
  </xsl:template> <!-- refine_dl_formula_where_style -->
@@ -7855,6 +7900,39 @@
7855
7900
  </xsl:copy>
7856
7901
  </xsl:template>
7857
7902
 
7903
+ <xsl:template match="@*|node()" mode="mathml_linebreak">
7904
+ <xsl:copy>
7905
+ <xsl:apply-templates select="@*|node()" mode="mathml_linebreak"/>
7906
+ </xsl:copy>
7907
+ </xsl:template>
7908
+
7909
+ <!-- split math into two math -->
7910
+ <xsl:template match="mathml:mo[@linebreak] | mathml:mspace[@linebreak]" mode="mathml_linebreak">
7911
+ <xsl:variable name="math_elements_tree_">
7912
+ <xsl:for-each select="ancestor::*[ancestor-or-self::mathml:math]">
7913
+ <element pos="{position()}">
7914
+ <xsl:copy-of select="@*[local-name() != 'id']"/>
7915
+ <xsl:value-of select="name()"/>
7916
+ </element>
7917
+ </xsl:for-each>
7918
+ </xsl:variable>
7919
+
7920
+ <xsl:variable name="math_elements_tree" select="xalan:nodeset($math_elements_tree_)"/>
7921
+
7922
+ <xsl:call-template name="insertClosingElements">
7923
+ <xsl:with-param name="tree" select="$math_elements_tree"/>
7924
+ </xsl:call-template>
7925
+
7926
+ <xsl:element name="br" namespace="{$namespace_full}"/>
7927
+
7928
+ <xsl:call-template name="insertOpeningElements">
7929
+ <xsl:with-param name="tree" select="$math_elements_tree"/>
7930
+ <xsl:with-param name="xmlns">http://www.w3.org/1998/Math/MathML</xsl:with-param>
7931
+ <xsl:with-param name="add_continue">false</xsl:with-param>
7932
+ </xsl:call-template>
7933
+
7934
+ </xsl:template>
7935
+
7858
7936
  <!-- Examples:
7859
7937
  <stem type="AsciiMath">x = 1</stem>
7860
7938
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -8106,9 +8184,11 @@
8106
8184
  </xsl:template>
8107
8185
 
8108
8186
  <xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"> <!-- show in 'stem' template -->
8187
+ <!-- https://github.com/metanorma/isodoc/issues/607
8109
8188
  <xsl:if test="normalize-space() != ''">
8110
- <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
8111
- </xsl:if>
8189
+ <xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
8190
+ </xsl:if> -->
8191
+ <xsl:apply-templates/>
8112
8192
  </xsl:template>
8113
8193
 
8114
8194
  <!-- stem inside formula with name (with formula's number) -->
@@ -8264,6 +8344,17 @@
8264
8344
  </xsl:when>
8265
8345
  <xsl:otherwise>
8266
8346
 
8347
+ <!-- https://github.com/metanorma/isodoc/issues/607 -->
8348
+ <!-- <xsl:if test="$namespace = 'ieee'">
8349
+ <xsl:text>—</xsl:text> em dash &#x2014;
8350
+ </xsl:if> -->
8351
+ <!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
8352
+ <xsl:text>:</xsl:text>
8353
+ </xsl:if> -->
8354
+
8355
+ <!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
8356
+ <xsl:text> – </xsl:text> en dash &#x2013;
8357
+ </xsl:if> -->
8267
8358
  </xsl:otherwise>
8268
8359
  </xsl:choose>
8269
8360
  </xsl:variable>
@@ -8282,6 +8373,16 @@
8282
8373
  </xsl:when>
8283
8374
  <xsl:otherwise>
8284
8375
 
8376
+ <!-- https://github.com/metanorma/isodoc/issues/607 -->
8377
+ <!-- <xsl:if test="$namespace = 'ieee'">
8378
+ <xsl:text>—</xsl:text> em dash &#x2014;
8379
+ </xsl:if> -->
8380
+ <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' or $namespace = 'rsd' or $namespace = 'jcgm'">
8381
+ <xsl:text>:</xsl:text>
8382
+ </xsl:if> -->
8383
+ <!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'unece-rec' or $namespace = 'unece'">
8384
+ <xsl:text> – </xsl:text> en dash &#x2013;
8385
+ </xsl:if> -->
8285
8386
  </xsl:otherwise>
8286
8387
  </xsl:choose>
8287
8388
  </xsl:variable>
@@ -10447,7 +10548,7 @@
10447
10548
  <xsl:if test="normalize-space() != ''">
10448
10549
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
10449
10550
  <xsl:call-template name="refine_termexample-name-style"/>
10450
- <xsl:apply-templates/>
10551
+ <xsl:apply-templates/> <!-- commented $namespace = 'ieee', https://github.com/metanorma/isodoc/issues/614-->
10451
10552
  </fo:inline>
10452
10553
  </xsl:if>
10453
10554
  </xsl:template>
@@ -10609,7 +10710,7 @@
10609
10710
  <xsl:otherwise>
10610
10711
  <fo:inline xsl:use-attribute-sets="example-name-style">
10611
10712
  <xsl:call-template name="refine_example-name-style"/>
10612
- <xsl:apply-templates/>
10713
+ <xsl:apply-templates/> <!-- $namespace = 'ieee', see https://github.com/metanorma/isodoc/issues/614 -->
10613
10714
  </fo:inline>
10614
10715
  </xsl:otherwise>
10615
10716
  </xsl:choose>
@@ -10791,15 +10892,17 @@
10791
10892
 
10792
10893
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10793
10894
  <fo:block role="BlockQuote">
10794
- <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
10895
+ <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source') and not(local-name() = 'attribution')]"/> <!-- process all nested nodes, except author and source -->
10795
10896
  </fo:block>
10796
10897
  </fo:block-container>
10797
10898
  </fo:block-container>
10798
- <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
10899
+ <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source'] or *[local-name() = 'attribution']">
10799
10900
  <fo:block xsl:use-attribute-sets="quote-source-style">
10800
10901
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
10801
10902
  <xsl:apply-templates select="*[local-name() = 'author']"/>
10802
10903
  <xsl:apply-templates select="*[local-name() = 'source']"/>
10904
+ <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
10905
+ <xsl:apply-templates select="*[local-name() = 'attribution']/*[local-name() = 'p']/node()"/>
10803
10906
  </fo:block>
10804
10907
  </xsl:if>
10805
10908
 
@@ -10821,9 +10924,13 @@
10821
10924
  </xsl:template>
10822
10925
 
10823
10926
  <xsl:template match="*[local-name() = 'author']">
10824
- <xsl:text>— </xsl:text>
10927
+ <xsl:if test="local-name(..) = 'quote'"> <!-- for old Presentation XML, https://github.com/metanorma/isodoc/issues/607 -->
10928
+ <xsl:text>— </xsl:text>
10929
+ </xsl:if>
10825
10930
  <xsl:apply-templates/>
10826
10931
  </xsl:template>
10932
+
10933
+ <xsl:template match="*[local-name() = 'quote']//*[local-name() = 'referenceFrom']"/>
10827
10934
  <!-- ====== -->
10828
10935
  <!-- ====== -->
10829
10936
 
@@ -10996,8 +11103,12 @@
10996
11103
  </xsl:template>
10997
11104
 
10998
11105
  <xsl:template match="*[local-name() = 'domain']">
11106
+ <!-- https://github.com/metanorma/isodoc/issues/607
10999
11107
  <fo:inline xsl:use-attribute-sets="domain-style">&lt;<xsl:apply-templates/>&gt;</fo:inline>
11000
- <xsl:text> </xsl:text>
11108
+ <xsl:text> </xsl:text> -->
11109
+ <xsl:if test="not(@hidden = 'true')">
11110
+ <xsl:apply-templates/>
11111
+ </xsl:if>
11001
11112
  </xsl:template>
11002
11113
 
11003
11114
  <xsl:template match="*[local-name() = 'admitted']">
@@ -11045,6 +11156,29 @@
11045
11156
  <!-- END definition -->
11046
11157
  <!-- ========== -->
11047
11158
 
11159
+ <xsl:variable name="reviews_">
11160
+ <xsl:for-each select="//*[local-name() = 'review'][@from]">
11161
+ <xsl:copy>
11162
+ <xsl:copy-of select="@from"/>
11163
+ <xsl:copy-of select="@id"/>
11164
+ </xsl:copy>
11165
+ </xsl:for-each>
11166
+ </xsl:variable>
11167
+ <xsl:variable name="reviews" select="xalan:nodeset($reviews_)"/>
11168
+
11169
+ <xsl:template name="addReviewHelper">
11170
+ <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
11171
+ <xsl:variable name="curr_id" select="@id"/>
11172
+ <xsl:variable name="review_id" select="normalize-space($reviews//*[local-name() = 'review'][@from = $curr_id]/@id)"/>
11173
+ <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
11174
+ <fo:block keep-with-next="always" line-height="0.1" id="{$review_id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$review_id}" fox:alt-text="Annot___{$review_id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
11175
+ </xsl:if>
11176
+ <!-- <fo:block>
11177
+ <curr_id><xsl:value-of select="$curr_id"/></curr_id>
11178
+ <xsl:copy-of select="$reviews"/>
11179
+ </fo:block> -->
11180
+ </xsl:template>
11181
+
11048
11182
  <!-- main sections -->
11049
11183
  <xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
11050
11184
 
@@ -11053,6 +11187,8 @@
11053
11187
 
11054
11188
  <xsl:call-template name="sections_element_style"/>
11055
11189
 
11190
+ <xsl:call-template name="addReviewHelper"/>
11191
+
11056
11192
  <xsl:apply-templates/>
11057
11193
  </fo:block>
11058
11194
 
@@ -11088,6 +11224,7 @@
11088
11224
 
11089
11225
  <fo:block>
11090
11226
  <xsl:call-template name="setId"/>
11227
+ <xsl:call-template name="addReviewHelper"/>
11091
11228
  <xsl:apply-templates/>
11092
11229
  </fo:block>
11093
11230
  </xsl:template>
@@ -11124,6 +11261,8 @@
11124
11261
 
11125
11262
  <xsl:call-template name="refine_clause_style"/>
11126
11263
 
11264
+ <xsl:call-template name="addReviewHelper"/>
11265
+
11127
11266
  <xsl:apply-templates/>
11128
11267
  </fo:block>
11129
11268
  </xsl:template>
@@ -11176,6 +11315,23 @@
11176
11315
 
11177
11316
  <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
11178
11317
 
11318
+ <xsl:if test="1 = 1">
11319
+ <xsl:choose>
11320
+ <!-- if there isn't the attribute '@from', then -->
11321
+ <xsl:when test="$id_from = ''">
11322
+ <fo:block id="{@id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
11323
+ </xsl:when>
11324
+ <!-- if there isn't element with id 'from', then create 'bookmark' here -->
11325
+ <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
11326
+ <fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
11327
+ </xsl:when>
11328
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11329
+ <fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
11330
+ </xsl:when>
11331
+ </xsl:choose>
11332
+ </xsl:if>
11333
+
11334
+ <xsl:if test="1 = 2">
11179
11335
  <xsl:choose>
11180
11336
  <!-- if there isn't the attribute '@from', then -->
11181
11337
  <xsl:when test="$id_from = ''">
@@ -11189,6 +11345,7 @@
11189
11345
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11190
11346
  </xsl:when>
11191
11347
  </xsl:choose>
11348
+ </xsl:if>
11192
11349
 
11193
11350
  </xsl:template>
11194
11351
 
@@ -12565,7 +12722,7 @@
12565
12722
  <!-- remove preprocess-xslt -->
12566
12723
  <xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
12567
12724
 
12568
- <xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image'] | *[local-name() = 'sourcecode'] | *[local-name() = 'bibdata'] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
12725
+ <xsl:template match="*[local-name() = 'stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])] | *[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
12569
12726
  <xsl:copy-of select="."/>
12570
12727
  </xsl:template>
12571
12728
 
@@ -12631,6 +12788,22 @@
12631
12788
  </xsl:choose>
12632
12789
  </xsl:template>
12633
12790
 
12791
+ <xsl:variable name="regex_passthrough">.*\bpdf\b.*</xsl:variable>
12792
+ <xsl:template match="*[local-name() = 'passthrough']" mode="update_xml_step1">
12793
+ <!-- <xsl:if test="contains(@formats, ' pdf ')"> -->
12794
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new(@formats), $regex_passthrough)) = 'true'">
12795
+ <xsl:apply-templates mode="update_xml_step1"/>
12796
+ </xsl:if>
12797
+ </xsl:template>
12798
+
12799
+ <!-- split math by element with @linebreak into maths -->
12800
+ <xsl:template match="mathml:math[.//mathml:mo[@linebreak] or .//mathml:mspace[@linebreak]]" mode="update_xml_step1">
12801
+ <xsl:variable name="maths">
12802
+ <xsl:apply-templates select="." mode="mathml_linebreak"/>
12803
+ </xsl:variable>
12804
+ <xsl:copy-of select="$maths"/>
12805
+ </xsl:template>
12806
+
12634
12807
  <!-- =========================================================================== -->
12635
12808
  <!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
12636
12809
  <!-- =========================================================================== -->
@@ -12734,6 +12907,8 @@
12734
12907
 
12735
12908
  <xsl:template name="insertOpeningElements">
12736
12909
  <xsl:param name="tree"/>
12910
+ <xsl:param name="xmlns"/>
12911
+ <xsl:param name="add_continue">true</xsl:param>
12737
12912
  <xsl:for-each select="$tree//element">
12738
12913
  <xsl:text disable-output-escaping="yes">&lt;</xsl:text>
12739
12914
  <xsl:value-of select="."/>
@@ -12744,7 +12919,8 @@
12744
12919
  <xsl:value-of select="."/>
12745
12920
  <xsl:text>"</xsl:text>
12746
12921
  </xsl:for-each>
12747
- <xsl:if test="position() = 1"> continue="true"</xsl:if>
12922
+ <xsl:if test="position() = 1 and $add_continue = 'true'"> continue="true"</xsl:if>
12923
+ <xsl:if test="position() = 1 and $xmlns != ''"> xmlns="<xsl:value-of select="$xmlns"/>"</xsl:if>
12748
12924
  <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
12749
12925
  <xsl:if test="$debug = 'true'">
12750
12926
  <xsl:message>&lt;<xsl:value-of select="."/>&gt;</xsl:message>
@@ -1783,9 +1783,21 @@ that the `number` given for the series applies to the second iteration of number
1783
1783
  May be used to differentiate rendering of notes in bibliographies</a:documentation>
1784
1784
  </attribute>
1785
1785
  </optional>
1786
- <ref name="LocalizedMarkedUpString">
1786
+ <ref name="LocalizedStringAttributes">
1787
1787
  <a:documentation>The content of the note</a:documentation>
1788
1788
  </ref>
1789
+ <choice>
1790
+ <oneOrMore>
1791
+ <ref name="BasicBlockNoId">
1792
+ <a:documentation>Multiple blocks of content</a:documentation>
1793
+ </ref>
1794
+ </oneOrMore>
1795
+ <oneOrMore>
1796
+ <ref name="TextElement">
1797
+ <a:documentation>Single block of content</a:documentation>
1798
+ </ref>
1799
+ </oneOrMore>
1800
+ </choice>
1789
1801
  </element>
1790
1802
  </define>
1791
1803
  <define name="bibabstract">
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.3.4 -->
20
+ <!-- VERSION v1.4.0 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -326,7 +326,7 @@ normative or informative references, some split references into sections organiz
326
326
  <a:documentation>Content of note</a:documentation>
327
327
  <oneOrMore>
328
328
  <choice>
329
- <ref name="paragraph"/>
329
+ <ref name="paragraph-with-footnote"/>
330
330
  <ref name="ul"/>
331
331
  <ref name="ol"/>
332
332
  <ref name="dl"/>
@@ -412,7 +412,7 @@ normative or informative references, some split references into sections organiz
412
412
  <element name="note">
413
413
  <ref name="OptionalId"/>
414
414
  <oneOrMore>
415
- <ref name="paragraph"/>
415
+ <ref name="paragraph-with-footnote"/>
416
416
  </oneOrMore>
417
417
  </element>
418
418
  </define>
@@ -1977,7 +1977,7 @@ used in document amendments</a:documentation>
1977
1977
  <oneOrMore>
1978
1978
  <choice>
1979
1979
  <a:documentation>Content of the verbal representation of the term</a:documentation>
1980
- <ref name="paragraph"/>
1980
+ <ref name="paragraph-with-footnote"/>
1981
1981
  <ref name="dl"/>
1982
1982
  <ref name="ol"/>
1983
1983
  <ref name="ul"/>
@@ -2015,7 +2015,7 @@ used in document amendments</a:documentation>
2015
2015
  <oneOrMore>
2016
2016
  <choice>
2017
2017
  <a:documentation>Content of the term note</a:documentation>
2018
- <ref name="paragraph"/>
2018
+ <ref name="paragraph-with-footnote"/>
2019
2019
  <ref name="ul"/>
2020
2020
  <ref name="ol"/>
2021
2021
  <ref name="dl"/>
@@ -2037,7 +2037,7 @@ used in document amendments</a:documentation>
2037
2037
  <ref name="dl"/>
2038
2038
  <ref name="quote"/>
2039
2039
  <ref name="sourcecode"/>
2040
- <ref name="paragraph"/>
2040
+ <ref name="paragraph-with-footnote"/>
2041
2041
  <ref name="figure"/>
2042
2042
  </choice>
2043
2043
  </oneOrMore>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Plateau
3
- VERSION = "0.1.9".freeze
3
+ VERSION = "0.1.10".freeze
4
4
  end
5
5
  end
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.test_files = `git ls-files -- {spec}/*`.split("\n")
30
30
  spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
31
31
 
32
- spec.add_dependency "metanorma-jis", "~> 0.3.0"
32
+ spec.add_dependency "metanorma-jis", "~> 0.4.0"
33
33
  spec.add_dependency "pubid"
34
34
 
35
35
  spec.add_development_dependency "debug"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-plateau
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-28 00:00:00.000000000 Z
11
+ date: 2024-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-jis
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.3.0
19
+ version: 0.4.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.3.0
26
+ version: 0.4.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pubid
29
29
  requirement: !ruby/object:Gem::Requirement