metanorma-ogc 1.3.7 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/ogc/boilerplate.xml +6 -6
- data/lib/asciidoctor/ogc/cleanup.rb +145 -0
- data/lib/asciidoctor/ogc/converter.rb +52 -64
- data/lib/asciidoctor/ogc/front.rb +1 -1
- data/lib/asciidoctor/ogc/isodoc.rng +52 -11
- data/lib/asciidoctor/ogc/ogc.rng +13 -13
- data/lib/asciidoctor/ogc/reqt.rng +15 -4
- data/lib/asciidoctor/ogc/validate.rb +35 -20
- data/lib/isodoc/ogc/base_convert.rb +47 -10
- data/lib/isodoc/ogc/biblio.rb +57 -51
- data/lib/isodoc/ogc/html/htmlstyle.css +10 -0
- data/lib/isodoc/ogc/html/htmlstyle.scss +12 -0
- data/lib/isodoc/ogc/html/ogc.css +4 -0
- data/lib/isodoc/ogc/html/ogc.scss +4 -0
- data/lib/isodoc/ogc/i18n-en.yaml +24 -8
- data/lib/isodoc/ogc/metadata.rb +1 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +398 -143
- data/lib/isodoc/ogc/ogc.best-practice.xsl +398 -143
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +398 -143
- data/lib/isodoc/ogc/ogc.community-practice.xsl +398 -143
- data/lib/isodoc/ogc/ogc.community-standard.xsl +398 -143
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +398 -143
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +398 -143
- data/lib/isodoc/ogc/ogc.other.xsl +398 -143
- data/lib/isodoc/ogc/ogc.policy.xsl +398 -143
- data/lib/isodoc/ogc/ogc.reference-model.xsl +398 -143
- data/lib/isodoc/ogc/ogc.release-notes.xsl +398 -143
- data/lib/isodoc/ogc/ogc.standard.xsl +398 -143
- data/lib/isodoc/ogc/ogc.test-suite.xsl +398 -143
- data/lib/isodoc/ogc/ogc.user-guide.xsl +398 -143
- data/lib/isodoc/ogc/ogc.white-paper.xsl +330 -98
- data/lib/isodoc/ogc/presentation_xml_convert.rb +58 -48
- data/lib/isodoc/ogc/reqt.rb +99 -38
- data/lib/isodoc/ogc/xref.rb +59 -43
- data/lib/metanorma/ogc/processor.rb +2 -1
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +3 -2
@@ -784,6 +784,12 @@ ul > li {
|
|
784
784
|
ul > li:first-child {
|
785
785
|
margin-top: 1em; }
|
786
786
|
|
787
|
+
ul ul > li:first-child {
|
788
|
+
margin-top: 0; }
|
789
|
+
|
790
|
+
ol ul > li:first-child {
|
791
|
+
margin-top: 0; }
|
792
|
+
|
787
793
|
span.keyword {
|
788
794
|
font-weight: 600; }
|
789
795
|
|
@@ -865,6 +871,10 @@ p.AltTerms {
|
|
865
871
|
font-size: 24px;
|
866
872
|
margin-top: 1em; }
|
867
873
|
|
874
|
+
span.AdmittedLabel {
|
875
|
+
color: #00335b;
|
876
|
+
background-color: #CFE2F3; }
|
877
|
+
|
868
878
|
/* Links, selection */
|
869
879
|
a, a:visited {
|
870
880
|
text-decoration: none;
|
@@ -273,6 +273,13 @@ ul {
|
|
273
273
|
}
|
274
274
|
}
|
275
275
|
|
276
|
+
ul ul > li:first-child {
|
277
|
+
margin-top: 0;
|
278
|
+
}
|
279
|
+
ol ul > li:first-child {
|
280
|
+
margin-top: 0;
|
281
|
+
}
|
282
|
+
|
276
283
|
|
277
284
|
span.keyword {
|
278
285
|
font-weight: 600;
|
@@ -363,6 +370,11 @@ p.AltTerms {
|
|
363
370
|
margin-top: 1em;
|
364
371
|
}
|
365
372
|
|
373
|
+
span.AdmittedLabel {
|
374
|
+
color: #00335b;
|
375
|
+
background-color: #CFE2F3;
|
376
|
+
}
|
377
|
+
|
366
378
|
|
367
379
|
/* Links, selection */
|
368
380
|
|
data/lib/isodoc/ogc/html/ogc.css
CHANGED
data/lib/isodoc/ogc/i18n-en.yaml
CHANGED
@@ -1,15 +1,31 @@
|
|
1
|
+
admitted: ADMITTED
|
1
2
|
foreword: Preface
|
2
3
|
submitters: Submitters
|
3
|
-
recommendationtest: Recommendation
|
4
|
-
requirementtest: Requirement
|
5
|
-
permissiontest: Permission
|
6
|
-
recommendationclass:
|
7
|
-
requirementclass:
|
8
|
-
permissionclass:
|
9
|
-
abstracttest: Abstract
|
10
|
-
conformanceclass: Conformance
|
4
|
+
recommendationtest: Recommendation test
|
5
|
+
requirementtest: Requirement test
|
6
|
+
permissiontest: Permission test
|
7
|
+
recommendationclass: Recommendations class
|
8
|
+
requirementclass: Requirements class
|
9
|
+
permissionclass: Permissions class
|
10
|
+
abstracttest: Abstract test
|
11
|
+
conformanceclass: Conformance class
|
11
12
|
example: Example
|
12
13
|
security_empty: No security considerations have been made for this %.
|
14
|
+
internal_terms_boilerplate: |
|
15
|
+
<p>This document uses the terms defined in <link target="https://portal.ogc.org/public_ogc/directives/directives.php">OGC Policy Directive 49</link>, which is based on the ISO/IEC Directives, Part 2, Rules for the structure and drafting of International Standards. In particular, the word “shall” (not “must”) is the verb form used to indicate a requirement to be strictly followed to conform to this standard and OGC documents do not use the equivalent phrases in the ISO/IEC Directives, Part 2.</p>
|
16
|
+
<p>This document also uses terms defined in the OGC Standard for Modular specifications (<link target="https://portal.opengeospatial.org/files/?artifact_id=34762">OGC 08-131r3</link>), also known as the 'ModSpec'. The definitions of terms such as standard, specification, requirement, and conformance test are provided in the ModSpec.</p>
|
17
|
+
<p>For the purposes of this document, the following additional terms and definitions apply.</p>
|
18
|
+
external_terms_boilerplate: |
|
19
|
+
<p>This document uses the terms defined in <link target="https://portal.ogc.org/public_ogc/directives/directives.php">OGC Policy Directive 49</link>, which is based on the ISO/IEC Directives, Part 2, Rules for the structure and drafting of International Standards. In particular, the word “shall” (not “must”) is the verb form used to indicate a requirement to be strictly followed to conform to this standard and OGC documents do not use the equivalent phrases in the ISO/IEC Directives, Part 2.</p>
|
20
|
+
<p>This document also uses terms defined in the OGC Standard for Modular specifications (<link target="https://portal.opengeospatial.org/files/?artifact_id=34762">OGC 08-131r3</link>), also known as the 'ModSpec'. The definitions of terms such as standard, specification, requirement, and conformance test are provided in the ModSpec.</p>
|
21
|
+
<p>For the purposes of this document,
|
22
|
+
the terms and definitions given in % additionally apply.</p>
|
23
|
+
internal_external_terms_boilerplate: |
|
24
|
+
<p>This document uses the terms defined in <link target="https://portal.ogc.org/public_ogc/directives/directives.php">OGC Policy Directive 49</link>, which is based on the ISO/IEC Directives, Part 2, Rules for the structure and drafting of International Standards. In particular, the word “shall” (not “must”) is the verb form used to indicate a requirement to be strictly followed to conform to this standard and OGC documents do not use the equivalent phrases in the ISO/IEC Directives, Part 2.</p>
|
25
|
+
<p>This document also uses terms defined in the OGC Standard for Modular specifications (<link target="https://portal.opengeospatial.org/files/?artifact_id=34762">OGC 08-131r3</link>), also known as the 'ModSpec'. The definitions of terms such as standard, specification, requirement, and conformance test are provided in the ModSpec.</p>
|
26
|
+
<p>For the purposes of this document, the terms and definitions
|
27
|
+
given in % and the following additionally apply.</p>
|
28
|
+
term_defined_in: "(%)"
|
13
29
|
stage_dict:
|
14
30
|
swg-draft: Candidate SWG Draft
|
15
31
|
oab-review: Candidate OAB Review Draft
|
data/lib/isodoc/ogc/metadata.rb
CHANGED
@@ -96,7 +96,7 @@ module IsoDoc
|
|
96
96
|
if t = isoxml&.at(ns("//bibdata/ext/doctype"))&.text
|
97
97
|
set(:doctype, type_capitalise(t))
|
98
98
|
set(:doctype_abbr, doctype_abbr(t))
|
99
|
-
if st = isoxml&.at(ns("//bibdata/ext/
|
99
|
+
if st = isoxml&.at(ns("//bibdata/ext/subdoctype"))&.text
|
100
100
|
set(:docsubtype, type_capitalise(st))
|
101
101
|
set(:docsubtype_abbr, docsubtype_abbr(st, t))
|
102
102
|
end
|
@@ -174,7 +174,7 @@
|
|
174
174
|
|
175
175
|
<fo:block-container absolute-position="fixed" left="16.5mm" top="83mm" height="90mm">
|
176
176
|
<fo:block-container width="155mm">
|
177
|
-
<fo:block font-size="33pt">
|
177
|
+
<fo:block font-size="33pt" role="H1">
|
178
178
|
<xsl:call-template name="addLetterSpacing">
|
179
179
|
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctitle))"/>
|
180
180
|
<xsl:with-param name="letter-spacing" select="1.1"/>
|
@@ -332,7 +332,7 @@
|
|
332
332
|
<fo:block-container margin-left="-18mm">
|
333
333
|
<fo:block-container margin-left="0mm">
|
334
334
|
<fo:block margin-bottom="40pt">
|
335
|
-
<fo:block font-size="33pt" margin-bottom="4pt">
|
335
|
+
<fo:block font-size="33pt" margin-bottom="4pt" role="H1">
|
336
336
|
<xsl:call-template name="addLetterSpacing">
|
337
337
|
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($title-toc))"/>
|
338
338
|
<xsl:with-param name="letter-spacing" select="1.1"/>
|
@@ -348,70 +348,70 @@
|
|
348
348
|
|
349
349
|
|
350
350
|
<fo:block-container line-height="130%">
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
<fo:block>
|
355
|
-
<xsl:if test="@level = 1">
|
356
|
-
<xsl:attribute name="margin-top">14pt</xsl:attribute>
|
357
|
-
</xsl:if>
|
358
|
-
<xsl:if test="@level = 1 or @parent = 'annex'">
|
359
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
360
|
-
</xsl:if>
|
361
|
-
<xsl:if test="@level = 2 and not(@parent = 'annex')">
|
362
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
363
|
-
</xsl:if>
|
364
|
-
|
365
|
-
<xsl:choose>
|
366
|
-
<xsl:when test="@level = 1">
|
367
|
-
<fo:list-block provisional-distance-between-starts="7mm">
|
368
|
-
<xsl:if test="@type = 'annex'">
|
369
|
-
<xsl:attribute name="provisional-distance-between-starts">0mm</xsl:attribute>
|
370
|
-
</xsl:if>
|
371
|
-
<fo:list-item>
|
372
|
-
<fo:list-item-label end-indent="label-end()">
|
373
|
-
<fo:block>
|
374
|
-
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@section))"/>
|
375
|
-
</fo:block>
|
376
|
-
</fo:list-item-label>
|
377
|
-
<fo:list-item-body start-indent="body-start()">
|
378
|
-
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
379
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
|
380
|
-
<xsl:variable name="sectionTitle">
|
381
|
-
<xsl:apply-templates select="title"/>
|
382
|
-
</xsl:variable>
|
383
|
-
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($sectionTitle))"/>
|
384
|
-
<xsl:text> </xsl:text>
|
385
|
-
<fo:inline keep-together.within-line="always">
|
386
|
-
<fo:leader leader-pattern="dots"/>
|
387
|
-
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
388
|
-
</fo:inline>
|
389
|
-
</fo:basic-link>
|
390
|
-
</fo:block>
|
391
|
-
</fo:list-item-body>
|
392
|
-
</fo:list-item>
|
393
|
-
</fo:list-block>
|
394
|
-
</xsl:when>
|
395
|
-
<xsl:otherwise>
|
396
|
-
<fo:block text-align-last="justify" margin-left="7mm">
|
397
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
|
398
|
-
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@section))"/>
|
399
|
-
<xsl:text> </xsl:text>
|
400
|
-
<xsl:apply-templates select="title"/>
|
401
|
-
<xsl:text> </xsl:text>
|
402
|
-
<fo:inline keep-together.within-line="always">
|
403
|
-
<fo:leader leader-pattern="dots"/>
|
404
|
-
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
405
|
-
</fo:inline>
|
406
|
-
</fo:basic-link>
|
407
|
-
</fo:block>
|
408
|
-
</xsl:otherwise>
|
409
|
-
</xsl:choose>
|
410
|
-
|
351
|
+
<fo:block role="TOC">
|
352
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
411
353
|
|
412
|
-
|
413
|
-
|
414
|
-
|
354
|
+
<fo:block role="TOCI">
|
355
|
+
<xsl:if test="@level = 1">
|
356
|
+
<xsl:attribute name="margin-top">14pt</xsl:attribute>
|
357
|
+
</xsl:if>
|
358
|
+
<xsl:if test="@level = 1 or @parent = 'annex'">
|
359
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
360
|
+
</xsl:if>
|
361
|
+
<xsl:if test="@level = 2 and not(@parent = 'annex')">
|
362
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
363
|
+
</xsl:if>
|
364
|
+
|
365
|
+
<xsl:choose>
|
366
|
+
<xsl:when test="@level = 1">
|
367
|
+
<fo:list-block provisional-distance-between-starts="8mm">
|
368
|
+
<xsl:if test="@type = 'annex'">
|
369
|
+
<xsl:attribute name="provisional-distance-between-starts">0mm</xsl:attribute>
|
370
|
+
</xsl:if>
|
371
|
+
<fo:list-item>
|
372
|
+
<fo:list-item-label end-indent="label-end()">
|
373
|
+
<fo:block>
|
374
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@section))"/>
|
375
|
+
</fo:block>
|
376
|
+
</fo:list-item-label>
|
377
|
+
<fo:list-item-body start-indent="body-start()">
|
378
|
+
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
379
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
|
380
|
+
<xsl:variable name="sectionTitle">
|
381
|
+
<xsl:apply-templates select="title"/>
|
382
|
+
</xsl:variable>
|
383
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($sectionTitle))"/>
|
384
|
+
<xsl:text> </xsl:text>
|
385
|
+
<fo:inline keep-together.within-line="always">
|
386
|
+
<fo:leader leader-pattern="dots"/>
|
387
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
388
|
+
</fo:inline>
|
389
|
+
</fo:basic-link>
|
390
|
+
</fo:block>
|
391
|
+
</fo:list-item-body>
|
392
|
+
</fo:list-item>
|
393
|
+
</fo:list-block>
|
394
|
+
</xsl:when>
|
395
|
+
<xsl:otherwise>
|
396
|
+
<fo:block text-align-last="justify" margin-left="8mm">
|
397
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
|
398
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@section))"/>
|
399
|
+
<xsl:text> </xsl:text>
|
400
|
+
<xsl:apply-templates select="title"/>
|
401
|
+
<xsl:text> </xsl:text>
|
402
|
+
<fo:inline keep-together.within-line="always">
|
403
|
+
<fo:leader leader-pattern="dots"/>
|
404
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
405
|
+
</fo:inline>
|
406
|
+
</fo:basic-link>
|
407
|
+
</fo:block>
|
408
|
+
</xsl:otherwise>
|
409
|
+
</xsl:choose>
|
410
|
+
|
411
|
+
|
412
|
+
</fo:block>
|
413
|
+
</xsl:for-each>
|
414
|
+
</fo:block>
|
415
415
|
</fo:block-container>
|
416
416
|
|
417
417
|
<xsl:if test="//ogc:table[@id and ogc:name]">
|
@@ -430,7 +430,7 @@
|
|
430
430
|
</fo:block-container>
|
431
431
|
<fo:block-container line-height="130%">
|
432
432
|
<xsl:for-each select="//ogc:table[@id and ogc:name]">
|
433
|
-
<fo:block text-align-last="justify" margin-top="2pt">
|
433
|
+
<fo:block text-align-last="justify" margin-top="2pt" role="TOCI">
|
434
434
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{ogc:name}">
|
435
435
|
<xsl:apply-templates select="ogc:name" mode="contents"/>
|
436
436
|
<fo:inline keep-together.within-line="always">
|
@@ -459,7 +459,7 @@
|
|
459
459
|
|
460
460
|
<fo:block-container line-height="130%">
|
461
461
|
<xsl:for-each select="//ogc:figure[@id and ogc:name]">
|
462
|
-
<fo:block text-align-last="justify" margin-top="2pt">
|
462
|
+
<fo:block text-align-last="justify" margin-top="2pt" role="TOCI">
|
463
463
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{ogc:name}">
|
464
464
|
<xsl:apply-templates select="ogc:name" mode="contents"/>
|
465
465
|
<fo:inline keep-together.within-line="always">
|
@@ -492,7 +492,7 @@
|
|
492
492
|
<!-- <xsl:for-each select="//ogc:permission[@id and ogc:name] | //ogc:recommendation[@id and ogc:name] | //ogc:requirement[@id and ogc:name]"> -->
|
493
493
|
<xsl:for-each select="//ogc:table[.//ogc:p[@class = 'RecommendationTitle']]">
|
494
494
|
<xsl:variable name="table_id" select="@id"/>
|
495
|
-
<fo:block text-align-last="justify" margin-top="6pt">
|
495
|
+
<fo:block text-align-last="justify" margin-top="6pt" role="TOCI">
|
496
496
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{.//ogc:p[@class = 'RecommendationTitle'][1]/text()}">
|
497
497
|
<xsl:apply-templates select=".//ogc:p[@class = 'RecommendationTitle'][ancestor::ogc:table[1][@id= $table_id]]/node()"/>
|
498
498
|
<xsl:text> </xsl:text>
|
@@ -579,7 +579,7 @@
|
|
579
579
|
<xsl:value-of select="translate(., $thinspace, ' ')"/>
|
580
580
|
</xsl:template>
|
581
581
|
|
582
|
-
<xsl:template match="text()" priority="3" mode="contents">
|
582
|
+
<xsl:template match="ogc:title//text() | ogc:name//text()" priority="3" mode="contents">
|
583
583
|
<xsl:value-of select="translate(., $thinspace, ' ')"/>
|
584
584
|
</xsl:template>
|
585
585
|
|
@@ -587,7 +587,9 @@
|
|
587
587
|
<xsl:variable name="content">
|
588
588
|
<xsl:call-template name="add-zero-spaces"/>
|
589
589
|
</xsl:variable>
|
590
|
-
|
590
|
+
<!-- add zero-width space in the words like 'adeOfAbstractTransportaonSpace' to split it in the table's cell -->
|
591
|
+
<xsl:variable name="content2" select="java:replaceAll(java:java.lang.String.new($content),'([a-z]{2,})([A-Z])(.?)','$1$2$3')"/>
|
592
|
+
<xsl:value-of select="translate($content2, $thinspace, ' ')"/>
|
591
593
|
</xsl:template>
|
592
594
|
|
593
595
|
|
@@ -739,14 +741,20 @@
|
|
739
741
|
</fo:block>
|
740
742
|
</xsl:template>
|
741
743
|
|
742
|
-
<xsl:template match="ogc:license-statement//ogc:title">
|
743
|
-
<
|
744
|
+
<xsl:template match="ogc:license-statement//ogc:title">
|
745
|
+
<xsl:variable name="level">
|
746
|
+
<xsl:call-template name="getLevel"/>
|
747
|
+
</xsl:variable>
|
748
|
+
<fo:block font-weight="bold" color="{$color_blue}" role="H{$level}">
|
744
749
|
<xsl:apply-templates/>
|
745
750
|
</fo:block>
|
746
751
|
</xsl:template>
|
747
752
|
|
748
753
|
<xsl:template match="ogc:copyright-statement//ogc:title">
|
749
|
-
<
|
754
|
+
<xsl:variable name="level">
|
755
|
+
<xsl:call-template name="getLevel"/>
|
756
|
+
</xsl:variable>
|
757
|
+
<fo:block font-weight="bold" color="{$color_blue}" margin-top="24pt" role="H{$level}">
|
750
758
|
<xsl:apply-templates/>
|
751
759
|
</fo:block>
|
752
760
|
</xsl:template>
|
@@ -764,7 +772,10 @@
|
|
764
772
|
</xsl:template>
|
765
773
|
|
766
774
|
<xsl:template match="ogc:legal-statement//ogc:title">
|
767
|
-
<
|
775
|
+
<xsl:variable name="level">
|
776
|
+
<xsl:call-template name="getLevel"/>
|
777
|
+
</xsl:variable>
|
778
|
+
<fo:inline font-weight="bold" role="H{$level}">
|
768
779
|
<xsl:apply-templates/><xsl:text>: </xsl:text>
|
769
780
|
</fo:inline>
|
770
781
|
</xsl:template>
|
@@ -839,7 +850,7 @@
|
|
839
850
|
<xsl:when test="$level = 1">
|
840
851
|
<fo:block-container margin-left="-22mm">
|
841
852
|
<fo:block-container margin-left="0mm">
|
842
|
-
<fo:block margin-bottom="10pt" space-before="36pt" keep-with-next="always">
|
853
|
+
<fo:block margin-bottom="10pt" space-before="36pt" keep-with-next="always" role="H{$level}">
|
843
854
|
<fo:table table-layout="fixed" width="100%">
|
844
855
|
<fo:table-column column-width="22mm"/>
|
845
856
|
<fo:table-column column-width="158mm"/>
|
@@ -883,7 +894,7 @@
|
|
883
894
|
</fo:block-container>
|
884
895
|
</xsl:when>
|
885
896
|
<xsl:when test="$level = 2">
|
886
|
-
<fo:block space-before="24pt" margin-bottom="10pt">
|
897
|
+
<fo:block space-before="24pt" margin-bottom="10pt" role="H{$level}">
|
887
898
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
888
899
|
<xsl:variable name="title">
|
889
900
|
<xsl:choose>
|
@@ -905,12 +916,14 @@
|
|
905
916
|
<xsl:otherwise>
|
906
917
|
<xsl:element name="{$element-name}">
|
907
918
|
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
908
|
-
<xsl:attribute name="font-weight"><xsl:value-of select="$font-weight"/></xsl:attribute>
|
909
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
910
|
-
<xsl:attribute name="margin-top">30pt</xsl:attribute>
|
911
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
912
|
-
<xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
|
919
|
+
<xsl:attribute name="font-weight"><xsl:value-of select="$font-weight"/></xsl:attribute>
|
920
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
921
|
+
<xsl:attribute name="margin-top">30pt</xsl:attribute>
|
922
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
923
|
+
<xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
|
924
|
+
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
913
925
|
<xsl:apply-templates/>
|
926
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
914
927
|
</xsl:element>
|
915
928
|
</xsl:otherwise>
|
916
929
|
</xsl:choose>
|
@@ -1046,6 +1059,9 @@
|
|
1046
1059
|
<xsl:if test="ancestor::ogc:table">
|
1047
1060
|
<xsl:attribute name="margin-left">1.5mm</xsl:attribute>
|
1048
1061
|
</xsl:if>
|
1062
|
+
<xsl:if test="ancestor::ogc:ul or ancestor::ogc:ol">
|
1063
|
+
<xsl:attribute name="margin-top">10pt</xsl:attribute>
|
1064
|
+
</xsl:if>
|
1049
1065
|
<fo:block-container margin-left="0mm">
|
1050
1066
|
<fo:list-block provisional-distance-between-starts="12mm" space-after="12pt" line-height="115%">
|
1051
1067
|
<xsl:if test="ancestor::ogc:table">
|
@@ -1080,17 +1096,25 @@
|
|
1080
1096
|
<xsl:number format="a)" lang="en"/>
|
1081
1097
|
</xsl:when>
|
1082
1098
|
<xsl:when test="../@type = 'alphabet'">
|
1083
|
-
<xsl:number format="1
|
1099
|
+
<xsl:number format="1."/>
|
1084
1100
|
</xsl:when>
|
1085
1101
|
<xsl:when test="../@type = 'alphabet_upper'">
|
1086
1102
|
<xsl:number format="A)" lang="en"/>
|
1087
1103
|
</xsl:when>
|
1088
|
-
|
1089
1104
|
<xsl:when test="../@type = 'roman'">
|
1090
1105
|
<xsl:number format="i)"/>
|
1091
1106
|
</xsl:when>
|
1107
|
+
<xsl:when test="ancestor::ogc:table">
|
1108
|
+
<xsl:variable name="level" select="count(ancestor-or-self::ogc:li[ancestor::ogc:table])"/>
|
1109
|
+
<xsl:choose>
|
1110
|
+
<xsl:when test="$level = 1"><xsl:number format="a)" lang="en"/></xsl:when>
|
1111
|
+
<xsl:when test="$level = 2"><xsl:number format="1."/></xsl:when>
|
1112
|
+
<xsl:when test="$level = 3"><xsl:number format="i)"/></xsl:when>
|
1113
|
+
<xsl:otherwise><xsl:number format="a)" lang="en"/></xsl:otherwise>
|
1114
|
+
</xsl:choose>
|
1115
|
+
</xsl:when>
|
1092
1116
|
<xsl:otherwise>
|
1093
|
-
<xsl:number format="1
|
1117
|
+
<xsl:number format="1."/>
|
1094
1118
|
</xsl:otherwise>
|
1095
1119
|
</xsl:choose>
|
1096
1120
|
</xsl:otherwise>
|
@@ -1099,6 +1123,9 @@
|
|
1099
1123
|
</fo:list-item-label>
|
1100
1124
|
<fo:list-item-body start-indent="body-start()" line-height-shift-adjustment="disregard-shifts">
|
1101
1125
|
<fo:block margin-bottom="10pt">
|
1126
|
+
<xsl:if test="not(following-sibling::*) and not(../following-sibling::*)">
|
1127
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
1128
|
+
</xsl:if>
|
1102
1129
|
<xsl:apply-templates/>
|
1103
1130
|
</fo:block>
|
1104
1131
|
</fo:list-item-body>
|
@@ -1118,7 +1145,10 @@
|
|
1118
1145
|
</xsl:template>
|
1119
1146
|
|
1120
1147
|
<xsl:template match="ogc:term/ogc:name" priority="2">
|
1121
|
-
<
|
1148
|
+
<xsl:variable name="levelTerm">
|
1149
|
+
<xsl:call-template name="getLevelTermName"/>
|
1150
|
+
</xsl:variable>
|
1151
|
+
<fo:block space-before="36pt" margin-bottom="10pt" keep-with-next="always" role="H{$levelTerm}">
|
1122
1152
|
<fo:block color="{$color_blue}" keep-with-next="always">
|
1123
1153
|
<fo:inline font-size="18pt" padding-right="1mm"><xsl:apply-templates/></fo:inline>
|
1124
1154
|
<xsl:apply-templates select="../ogc:preferred | ../ogc:deprecated | ../ogc:admitted" mode="term_name"/>
|
@@ -1263,7 +1293,7 @@
|
|
1263
1293
|
|
1264
1294
|
<xsl:template name="insertHeaderFooter">
|
1265
1295
|
<xsl:param name="color" select="$color_blue"/>
|
1266
|
-
<fo:static-content flow-name="footer">
|
1296
|
+
<fo:static-content flow-name="footer" role="artifact">
|
1267
1297
|
<fo:block-container font-size="8pt" height="100%" color="{$color}" padding-top="6mm">
|
1268
1298
|
<fo:table table-layout="fixed" width="100%">
|
1269
1299
|
<fo:table-column column-width="90%"/>
|
@@ -1423,6 +1453,15 @@
|
|
1423
1453
|
</fo:inline>
|
1424
1454
|
</xsl:if>
|
1425
1455
|
<xsl:apply-templates select="xalan:nodeset($title)" mode="titlesmall"/>
|
1456
|
+
|
1457
|
+
<xsl:variable name="variant-title">
|
1458
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="titlesmall"/>
|
1459
|
+
</xsl:variable>
|
1460
|
+
<xsl:if test="normalize-space($variant-title) != ''">
|
1461
|
+
<fo:inline padding-right="5mm"> </fo:inline>
|
1462
|
+
<fo:inline><xsl:copy-of select="$variant-title"/></fo:inline>
|
1463
|
+
</xsl:if>
|
1464
|
+
|
1426
1465
|
</fo:block>
|
1427
1466
|
<xsl:call-template name="insertOrangeHorizontalLine"/>
|
1428
1467
|
</fo:block>
|
@@ -1640,6 +1679,7 @@
|
|
1640
1679
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1641
1680
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1642
1681
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
1682
|
+
<xsl:attribute name="role">Code</xsl:attribute>
|
1643
1683
|
|
1644
1684
|
|
1645
1685
|
|
@@ -1691,8 +1731,13 @@
|
|
1691
1731
|
|
1692
1732
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1693
1733
|
|
1694
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1695
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1734
|
+
</xsl:attribute-set><xsl:attribute-set name="subject-style">
|
1735
|
+
</xsl:attribute-set><xsl:attribute-set name="inherit-style">
|
1736
|
+
</xsl:attribute-set><xsl:attribute-set name="description-style">
|
1737
|
+
</xsl:attribute-set><xsl:attribute-set name="specification-style">
|
1738
|
+
</xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
|
1739
|
+
</xsl:attribute-set><xsl:attribute-set name="verification-style">
|
1740
|
+
</xsl:attribute-set><xsl:attribute-set name="import-style">
|
1696
1741
|
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
1697
1742
|
|
1698
1743
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -1774,6 +1819,7 @@
|
|
1774
1819
|
|
1775
1820
|
|
1776
1821
|
|
1822
|
+
|
1777
1823
|
|
1778
1824
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
1779
1825
|
|
@@ -1790,7 +1836,9 @@
|
|
1790
1836
|
|
1791
1837
|
|
1792
1838
|
|
1793
|
-
</xsl:attribute-set><xsl:
|
1839
|
+
</xsl:attribute-set><xsl:variable name="table-border_">
|
1840
|
+
|
1841
|
+
</xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
|
1794
1842
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1795
1843
|
|
1796
1844
|
|
@@ -1802,7 +1850,7 @@
|
|
1802
1850
|
|
1803
1851
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
1804
1852
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1805
|
-
<xsl:attribute name="font-weight">
|
1853
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute><!-- normal -->
|
1806
1854
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1807
1855
|
|
1808
1856
|
|
@@ -1918,7 +1966,8 @@
|
|
1918
1966
|
|
1919
1967
|
|
1920
1968
|
|
1921
|
-
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1969
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1970
|
+
<xsl:attribute name="role">BlockQuote</xsl:attribute>
|
1922
1971
|
|
1923
1972
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1924
1973
|
<xsl:attribute name="margin-left">13mm</xsl:attribute>
|
@@ -1961,6 +2010,7 @@
|
|
1961
2010
|
|
1962
2011
|
|
1963
2012
|
|
2013
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1964
2014
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1965
2015
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1966
2016
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
@@ -2120,11 +2170,15 @@
|
|
2120
2170
|
<fo:block> </fo:block>
|
2121
2171
|
</xsl:if> -->
|
2122
2172
|
|
2173
|
+
|
2174
|
+
<!-- Display table's name before table as standalone block -->
|
2123
2175
|
<!-- $namespace = 'iso' or -->
|
2124
2176
|
|
2125
2177
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2126
2178
|
|
2127
|
-
|
2179
|
+
|
2180
|
+
|
2181
|
+
|
2128
2182
|
|
2129
2183
|
<xsl:call-template name="fn_name_display"/>
|
2130
2184
|
|
@@ -2203,6 +2257,12 @@
|
|
2203
2257
|
|
2204
2258
|
|
2205
2259
|
|
2260
|
+
|
2261
|
+
|
2262
|
+
|
2263
|
+
<!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
|
2264
|
+
|
2265
|
+
|
2206
2266
|
<xsl:variable name="table_width">
|
2207
2267
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
2208
2268
|
|
@@ -2227,6 +2287,7 @@
|
|
2227
2287
|
|
2228
2288
|
|
2229
2289
|
|
2290
|
+
|
2230
2291
|
<attribute name="margin-left">0mm</attribute>
|
2231
2292
|
<attribute name="margin-right">0mm</attribute>
|
2232
2293
|
|
@@ -2252,6 +2313,8 @@
|
|
2252
2313
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2253
2314
|
</xsl:if>
|
2254
2315
|
|
2316
|
+
|
2317
|
+
|
2255
2318
|
<xsl:choose>
|
2256
2319
|
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2257
2320
|
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
@@ -2536,9 +2599,9 @@
|
|
2536
2599
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
2537
2600
|
<xsl:with-param name="continued">true</xsl:with-param>
|
2538
2601
|
</xsl:apply-templates>
|
2539
|
-
|
2540
|
-
|
2541
|
-
|
2602
|
+
|
2603
|
+
|
2604
|
+
|
2542
2605
|
|
2543
2606
|
</fo:table-cell>
|
2544
2607
|
</fo:table-row>
|
@@ -2622,7 +2685,11 @@
|
|
2622
2685
|
|
2623
2686
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2624
2687
|
|
2625
|
-
<xsl:
|
2688
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
2689
|
+
|
2690
|
+
</xsl:variable>
|
2691
|
+
|
2692
|
+
<xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
|
2626
2693
|
|
2627
2694
|
<xsl:variable name="cols-count">
|
2628
2695
|
<xsl:choose>
|
@@ -2651,6 +2718,8 @@
|
|
2651
2718
|
</xsl:choose>
|
2652
2719
|
</xsl:for-each>
|
2653
2720
|
|
2721
|
+
|
2722
|
+
|
2654
2723
|
<xsl:choose>
|
2655
2724
|
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2656
2725
|
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
@@ -2689,6 +2758,7 @@
|
|
2689
2758
|
|
2690
2759
|
|
2691
2760
|
|
2761
|
+
|
2692
2762
|
<!-- for BSI (not PAS) display Notes before footnotes -->
|
2693
2763
|
|
2694
2764
|
|
@@ -2762,6 +2832,19 @@
|
|
2762
2832
|
|
2763
2833
|
</fo:table-body>
|
2764
2834
|
|
2835
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
|
2836
|
+
<xsl:choose>
|
2837
|
+
<xsl:when test="substring-after(., '—') != ''">
|
2838
|
+
<xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
|
2839
|
+
</xsl:when>
|
2840
|
+
<xsl:otherwise>
|
2841
|
+
<xsl:value-of select="."/>
|
2842
|
+
</xsl:otherwise>
|
2843
|
+
</xsl:choose>
|
2844
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
|
2845
|
+
<xsl:apply-templates mode="presentation_name"/>
|
2846
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
|
2847
|
+
<xsl:apply-templates select="."/>
|
2765
2848
|
</xsl:template><xsl:template match="*[local-name()='tr']">
|
2766
2849
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
2767
2850
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
@@ -2774,6 +2857,8 @@
|
|
2774
2857
|
|
2775
2858
|
|
2776
2859
|
|
2860
|
+
|
2861
|
+
|
2777
2862
|
</xsl:if>
|
2778
2863
|
<xsl:if test="$parent-name = 'tfoot'">
|
2779
2864
|
|
@@ -2800,6 +2885,8 @@
|
|
2800
2885
|
|
2801
2886
|
|
2802
2887
|
|
2888
|
+
|
2889
|
+
|
2803
2890
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
2804
2891
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
2805
2892
|
</xsl:if> -->
|
@@ -2884,6 +2971,8 @@
|
|
2884
2971
|
|
2885
2972
|
|
2886
2973
|
<xsl:attribute name="border">solid 0pt white</xsl:attribute>
|
2974
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
2975
|
+
<xsl:attribute name="padding-bottom">1mm</xsl:attribute>
|
2887
2976
|
|
2888
2977
|
|
2889
2978
|
|
@@ -2946,20 +3035,12 @@
|
|
2946
3035
|
<xsl:apply-templates/>
|
2947
3036
|
</xsl:template><xsl:template name="fn_display">
|
2948
3037
|
<xsl:variable name="references">
|
3038
|
+
|
2949
3039
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
2950
|
-
<
|
2951
|
-
|
2952
|
-
|
2953
|
-
<xsl:attribute name="id">
|
2954
|
-
<xsl:value-of select="@reference"/>
|
2955
|
-
<xsl:text>_</xsl:text>
|
2956
|
-
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
2957
|
-
</xsl:attribute>
|
2958
|
-
|
2959
|
-
<xsl:apply-templates/>
|
2960
|
-
</fn>
|
3040
|
+
<xsl:call-template name="create_fn"/>
|
2961
3041
|
</xsl:for-each>
|
2962
3042
|
</xsl:variable>
|
3043
|
+
|
2963
3044
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
2964
3045
|
<xsl:variable name="reference" select="@reference"/>
|
2965
3046
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
@@ -2995,6 +3076,18 @@
|
|
2995
3076
|
</fo:block>
|
2996
3077
|
</xsl:if>
|
2997
3078
|
</xsl:for-each>
|
3079
|
+
</xsl:template><xsl:template name="create_fn">
|
3080
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
3081
|
+
|
3082
|
+
|
3083
|
+
<xsl:attribute name="id">
|
3084
|
+
<xsl:value-of select="@reference"/>
|
3085
|
+
<xsl:text>_</xsl:text>
|
3086
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
3087
|
+
</xsl:attribute>
|
3088
|
+
|
3089
|
+
<xsl:apply-templates/>
|
3090
|
+
</fn>
|
2998
3091
|
</xsl:template><xsl:template name="fn_name_display">
|
2999
3092
|
<!-- <xsl:variable name="references">
|
3000
3093
|
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
@@ -3986,16 +4079,68 @@
|
|
3986
4079
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3987
4080
|
</xsl:call-template>
|
3988
4081
|
|
4082
|
+
|
4083
|
+
|
3989
4084
|
<xsl:variable name="mathml">
|
3990
4085
|
<xsl:apply-templates select="." mode="mathml"/>
|
3991
4086
|
</xsl:variable>
|
3992
4087
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3993
4088
|
|
3994
4089
|
|
4090
|
+
<xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
|
4091
|
+
<xsl:variable name="comment_text_">
|
4092
|
+
<xsl:choose>
|
4093
|
+
<xsl:when test="normalize-space($comment_text_following) != ''">
|
4094
|
+
<xsl:value-of select="$comment_text_following"/>
|
4095
|
+
</xsl:when>
|
4096
|
+
<xsl:otherwise>
|
4097
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
4098
|
+
</xsl:otherwise>
|
4099
|
+
</xsl:choose>
|
4100
|
+
</xsl:variable>
|
4101
|
+
<xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
|
4102
|
+
|
4103
|
+
<xsl:if test="normalize-space($comment_text) != ''">
|
4104
|
+
<!-- put Mathin Alternate Text -->
|
4105
|
+
<xsl:attribute name="fox:alt-text">
|
4106
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
|
4107
|
+
</xsl:attribute>
|
4108
|
+
</xsl:if>
|
4109
|
+
|
4110
|
+
<xsl:variable name="mathml_content">
|
4111
|
+
<xsl:apply-templates select="." mode="mathml_actual_text"/>
|
4112
|
+
</xsl:variable>
|
4113
|
+
<!-- put MathML in Actual Text -->
|
4114
|
+
<xsl:attribute name="fox:actual-text">
|
4115
|
+
<xsl:value-of select="$mathml_content"/>
|
4116
|
+
</xsl:attribute>
|
4117
|
+
|
4118
|
+
|
3995
4119
|
<!-- <xsl:copy-of select="."/> -->
|
3996
4120
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3997
4121
|
</fo:instream-foreign-object>
|
3998
4122
|
</fo:inline>
|
4123
|
+
</xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
|
4124
|
+
<!-- <xsl:text>a+b</xsl:text> -->
|
4125
|
+
<xsl:text><</xsl:text>
|
4126
|
+
<xsl:value-of select="local-name()"/>
|
4127
|
+
<xsl:if test="local-name() = 'math'">
|
4128
|
+
<xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
|
4129
|
+
</xsl:if>
|
4130
|
+
<xsl:for-each select="@*">
|
4131
|
+
<xsl:text> </xsl:text>
|
4132
|
+
<xsl:value-of select="local-name()"/>
|
4133
|
+
<xsl:text>="</xsl:text>
|
4134
|
+
<xsl:value-of select="."/>
|
4135
|
+
<xsl:text>"</xsl:text>
|
4136
|
+
</xsl:for-each>
|
4137
|
+
<xsl:text>></xsl:text>
|
4138
|
+
<xsl:apply-templates mode="mathml_actual_text"/>
|
4139
|
+
<xsl:text></</xsl:text>
|
4140
|
+
<xsl:value-of select="local-name()"/>
|
4141
|
+
<xsl:text>></xsl:text>
|
4142
|
+
</xsl:template><xsl:template match="text()" mode="mathml_actual_text">
|
4143
|
+
<xsl:value-of select="normalize-space()"/>
|
3999
4144
|
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
4000
4145
|
<xsl:copy>
|
4001
4146
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
@@ -4005,19 +4150,6 @@
|
|
4005
4150
|
<!-- replace start and end spaces to non-break space -->
|
4006
4151
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
4007
4152
|
</xsl:copy>
|
4008
|
-
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
4009
|
-
<xsl:copy>
|
4010
|
-
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
4011
|
-
</xsl:copy>
|
4012
|
-
<xsl:choose>
|
4013
|
-
<!-- if in msub, then don't add space -->
|
4014
|
-
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
4015
|
-
<!-- if next char in digit, don't add space -->
|
4016
|
-
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
4017
|
-
<xsl:otherwise>
|
4018
|
-
<mathml:mspace width="0.5ex"/>
|
4019
|
-
</xsl:otherwise>
|
4020
|
-
</xsl:choose>
|
4021
4153
|
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
4022
4154
|
<xsl:variable name="target">
|
4023
4155
|
<xsl:choose>
|
@@ -4070,7 +4202,10 @@
|
|
4070
4202
|
</fo:block>
|
4071
4203
|
<xsl:apply-templates/>
|
4072
4204
|
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
4073
|
-
<
|
4205
|
+
<xsl:variable name="level">
|
4206
|
+
<xsl:call-template name="getLevel"/>
|
4207
|
+
</xsl:variable>
|
4208
|
+
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
4074
4209
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
4075
4210
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
4076
4211
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -4105,9 +4240,10 @@
|
|
4105
4240
|
|
4106
4241
|
</xsl:variable>
|
4107
4242
|
|
4243
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
4108
4244
|
<xsl:choose>
|
4109
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
4110
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
4245
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
4246
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
4111
4247
|
</xsl:choose>
|
4112
4248
|
<xsl:apply-templates/>
|
4113
4249
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
@@ -4259,7 +4395,10 @@
|
|
4259
4395
|
</fo:block>
|
4260
4396
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
4261
4397
|
<xsl:if test="normalize-space() != ''">
|
4262
|
-
<
|
4398
|
+
<xsl:variable name="level">
|
4399
|
+
<xsl:call-template name="getLevelTermName"/>
|
4400
|
+
</xsl:variable>
|
4401
|
+
<fo:inline role="H{$level}">
|
4263
4402
|
<xsl:apply-templates/>
|
4264
4403
|
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
4265
4404
|
<xsl:text>.</xsl:text>
|
@@ -4332,7 +4471,24 @@
|
|
4332
4471
|
</fo:instream-foreign-object>
|
4333
4472
|
</xsl:when>
|
4334
4473
|
<xsl:otherwise>
|
4335
|
-
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"
|
4474
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
4475
|
+
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
4476
|
+
|
4477
|
+
<xsl:variable name="img_src">
|
4478
|
+
<xsl:choose>
|
4479
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
4480
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
4481
|
+
</xsl:choose>
|
4482
|
+
</xsl:variable>
|
4483
|
+
|
4484
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
|
4485
|
+
<xsl:if test="number($scale) < 100">
|
4486
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
4487
|
+
</xsl:if>
|
4488
|
+
|
4489
|
+
</xsl:if>
|
4490
|
+
|
4491
|
+
</fo:external-graphic>
|
4336
4492
|
</xsl:otherwise>
|
4337
4493
|
</xsl:choose>
|
4338
4494
|
|
@@ -4503,11 +4659,13 @@
|
|
4503
4659
|
<xsl:attribute name="width">100%</xsl:attribute>
|
4504
4660
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
4505
4661
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4662
|
+
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
4663
|
+
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
4506
4664
|
<!-- effective height 297 - 27.4 - 13 = 256.6 -->
|
4507
4665
|
<!-- effective width 210 - 12.5 - 25 = 172.5 -->
|
4508
4666
|
<!-- effective height / width = 1.48, 1.4 - with title -->
|
4509
|
-
<xsl:if test="
|
4510
|
-
<xsl:variable name="width" select="((
|
4667
|
+
<xsl:if test="$svg_height > ($svg_width * 1.4)"> <!-- for images with big height -->
|
4668
|
+
<xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
|
4511
4669
|
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
4512
4670
|
</xsl:if>
|
4513
4671
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -4524,6 +4682,23 @@
|
|
4524
4682
|
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
4525
4683
|
<xsl:value-of select="."/>
|
4526
4684
|
</xsl:attribute>
|
4685
|
+
</xsl:template><xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
4686
|
+
<xsl:copy>
|
4687
|
+
<xsl:apply-templates select="@*" mode="svg_update"/>
|
4688
|
+
<xsl:variable name="viewbox">
|
4689
|
+
<xsl:call-template name="split">
|
4690
|
+
<xsl:with-param name="pText" select="@viewBox"/>
|
4691
|
+
<xsl:with-param name="sep" select="' '"/>
|
4692
|
+
</xsl:call-template>
|
4693
|
+
</xsl:variable>
|
4694
|
+
<xsl:attribute name="width">
|
4695
|
+
<xsl:value-of select="round(xalan:nodeset($viewbox)//item[3])"/>
|
4696
|
+
</xsl:attribute>
|
4697
|
+
<xsl:attribute name="height">
|
4698
|
+
<xsl:value-of select="round(xalan:nodeset($viewbox)//item[4])"/>
|
4699
|
+
</xsl:attribute>
|
4700
|
+
<xsl:apply-templates mode="svg_update"/>
|
4701
|
+
</xsl:copy>
|
4527
4702
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
4528
4703
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
4529
4704
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4897,6 +5072,7 @@
|
|
4897
5072
|
</xsl:when>
|
4898
5073
|
<xsl:otherwise>
|
4899
5074
|
<xsl:apply-templates/>
|
5075
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
4900
5076
|
</xsl:otherwise>
|
4901
5077
|
</xsl:choose>
|
4902
5078
|
</fo:block>
|
@@ -5045,14 +5221,6 @@
|
|
5045
5221
|
<fo:block>
|
5046
5222
|
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
5047
5223
|
</fo:block>
|
5048
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
5049
|
-
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
5050
|
-
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
5051
|
-
</fo:block>
|
5052
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
5053
|
-
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
5054
|
-
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
5055
|
-
</fo:block>
|
5056
5224
|
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
5057
5225
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
5058
5226
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -5069,6 +5237,38 @@
|
|
5069
5237
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
5070
5238
|
<xsl:apply-templates/>
|
5071
5239
|
</fo:block>
|
5240
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
5241
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
5242
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
5243
|
+
</fo:block>
|
5244
|
+
</xsl:template><xsl:template match="*[local-name() = 'subject']">
|
5245
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
5246
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
5247
|
+
</fo:block>
|
5248
|
+
</xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
5249
|
+
<fo:block xsl:use-attribute-sets="inherit-style">
|
5250
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
5251
|
+
</fo:block>
|
5252
|
+
</xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
5253
|
+
<fo:block xsl:use-attribute-sets="description-style">
|
5254
|
+
<xsl:apply-templates/>
|
5255
|
+
</fo:block>
|
5256
|
+
</xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
5257
|
+
<fo:block xsl:use-attribute-sets="specification-style">
|
5258
|
+
<xsl:apply-templates/>
|
5259
|
+
</fo:block>
|
5260
|
+
</xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
5261
|
+
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
5262
|
+
<xsl:apply-templates/>
|
5263
|
+
</fo:block>
|
5264
|
+
</xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
5265
|
+
<fo:block xsl:use-attribute-sets="verification-style">
|
5266
|
+
<xsl:apply-templates/>
|
5267
|
+
</fo:block>
|
5268
|
+
</xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
5269
|
+
<fo:block xsl:use-attribute-sets="import-style">
|
5270
|
+
<xsl:apply-templates/>
|
5271
|
+
</fo:block>
|
5072
5272
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
5073
5273
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
5074
5274
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -5220,7 +5420,19 @@
|
|
5220
5420
|
</fo:inline>
|
5221
5421
|
</xsl:if>
|
5222
5422
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
5223
|
-
<
|
5423
|
+
<xsl:variable name="element">inline
|
5424
|
+
|
5425
|
+
</xsl:variable>
|
5426
|
+
<xsl:choose>
|
5427
|
+
<xsl:when test="contains($element, 'block')">
|
5428
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
5429
|
+
<xsl:apply-templates/>
|
5430
|
+
</fo:block>
|
5431
|
+
</xsl:when>
|
5432
|
+
<xsl:otherwise>
|
5433
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5434
|
+
</xsl:otherwise>
|
5435
|
+
</xsl:choose>
|
5224
5436
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
5225
5437
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
5226
5438
|
|
@@ -5764,6 +5976,7 @@
|
|
5764
5976
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
5765
5977
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
5766
5978
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
5979
|
+
|
5767
5980
|
<xsl:apply-templates/>
|
5768
5981
|
</fo:block>
|
5769
5982
|
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
@@ -5803,7 +6016,6 @@
|
|
5803
6016
|
</xsl:template><xsl:template name="processBibitem">
|
5804
6017
|
|
5805
6018
|
|
5806
|
-
<!-- end BIPM bibitem processing-->
|
5807
6019
|
|
5808
6020
|
|
5809
6021
|
<!-- start OGC bibtem processing -->
|
@@ -6075,6 +6287,9 @@
|
|
6075
6287
|
<fo:block-container border="1pt solid black" width="50%">
|
6076
6288
|
<fo:block> </fo:block>
|
6077
6289
|
</fo:block-container>
|
6290
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
6291
|
+
<fo:inline padding-right="5mm"> </fo:inline>
|
6292
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
6078
6293
|
</xsl:template><xsl:template name="convertDate">
|
6079
6294
|
<xsl:param name="date"/>
|
6080
6295
|
<xsl:param name="format" select="'short'"/>
|
@@ -6313,6 +6528,26 @@
|
|
6313
6528
|
<xsl:value-of select="$level"/>
|
6314
6529
|
</xsl:otherwise>
|
6315
6530
|
</xsl:choose>
|
6531
|
+
</xsl:template><xsl:template name="getLevelTermName">
|
6532
|
+
<xsl:choose>
|
6533
|
+
<xsl:when test="normalize-space(../@depth) != ''">
|
6534
|
+
<xsl:value-of select="../@depth"/>
|
6535
|
+
</xsl:when>
|
6536
|
+
<xsl:otherwise>
|
6537
|
+
<xsl:variable name="title_level_">
|
6538
|
+
<xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
|
6539
|
+
<xsl:call-template name="getLevel"/>
|
6540
|
+
</xsl:for-each>
|
6541
|
+
</xsl:variable>
|
6542
|
+
<xsl:variable name="title_level" select="normalize-space($title_level_)"/>
|
6543
|
+
<xsl:choose>
|
6544
|
+
<xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
|
6545
|
+
<xsl:otherwise>
|
6546
|
+
<xsl:call-template name="getLevel"/>
|
6547
|
+
</xsl:otherwise>
|
6548
|
+
</xsl:choose>
|
6549
|
+
</xsl:otherwise>
|
6550
|
+
</xsl:choose>
|
6316
6551
|
</xsl:template><xsl:template name="split">
|
6317
6552
|
<xsl:param name="pText" select="."/>
|
6318
6553
|
<xsl:param name="sep" select="','"/>
|
@@ -6410,20 +6645,40 @@
|
|
6410
6645
|
</xsl:call-template>
|
6411
6646
|
</xsl:if>
|
6412
6647
|
</xsl:template><xsl:template name="getLocalizedString">
|
6413
|
-
<xsl:param name="key"/>
|
6648
|
+
<xsl:param name="key"/>
|
6649
|
+
<xsl:param name="formatted">false</xsl:param>
|
6414
6650
|
|
6415
6651
|
<xsl:variable name="curr_lang">
|
6416
6652
|
<xsl:call-template name="getLang"/>
|
6417
6653
|
</xsl:variable>
|
6418
6654
|
|
6419
|
-
<xsl:variable name="data_value"
|
6655
|
+
<xsl:variable name="data_value">
|
6656
|
+
<xsl:choose>
|
6657
|
+
<xsl:when test="$formatted = 'true'">
|
6658
|
+
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
6659
|
+
</xsl:when>
|
6660
|
+
<xsl:otherwise>
|
6661
|
+
<xsl:value-of select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
6662
|
+
</xsl:otherwise>
|
6663
|
+
</xsl:choose>
|
6664
|
+
</xsl:variable>
|
6420
6665
|
|
6421
6666
|
<xsl:choose>
|
6422
|
-
<xsl:when test="$data_value != ''">
|
6423
|
-
<xsl:
|
6667
|
+
<xsl:when test="normalize-space($data_value) != ''">
|
6668
|
+
<xsl:choose>
|
6669
|
+
<xsl:when test="$formatted = 'true'"><xsl:copy-of select="$data_value"/></xsl:when>
|
6670
|
+
<xsl:otherwise><xsl:value-of select="$data_value"/></xsl:otherwise>
|
6671
|
+
</xsl:choose>
|
6424
6672
|
</xsl:when>
|
6425
6673
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
6426
|
-
<xsl:
|
6674
|
+
<xsl:choose>
|
6675
|
+
<xsl:when test="$formatted = 'true'">
|
6676
|
+
<xsl:apply-templates select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
6677
|
+
</xsl:when>
|
6678
|
+
<xsl:otherwise>
|
6679
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
6680
|
+
</xsl:otherwise>
|
6681
|
+
</xsl:choose>
|
6427
6682
|
</xsl:when>
|
6428
6683
|
<xsl:otherwise>
|
6429
6684
|
<xsl:variable name="key_">
|
@@ -6434,7 +6689,7 @@
|
|
6434
6689
|
<xsl:value-of select="$key_"/>
|
6435
6690
|
</xsl:otherwise>
|
6436
6691
|
</xsl:choose>
|
6437
|
-
|
6692
|
+
|
6438
6693
|
</xsl:template><xsl:template name="setTrackChangesStyles">
|
6439
6694
|
<xsl:param name="isAdded"/>
|
6440
6695
|
<xsl:param name="isDeleted"/>
|