metanorma-mpfa 0.6.9 → 0.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/asciidoctor/mpfa/basicdoc.rng +21 -4
- data/lib/asciidoctor/mpfa/isodoc.rng +241 -61
- data/lib/asciidoctor/mpfa/reqt.rng +23 -2
- data/lib/asciidoctor/mpfa/section.rb +4 -6
- data/lib/isodoc/mpfa/html/htmlstyle.css +6 -0
- data/lib/isodoc/mpfa/html/htmlstyle.scss +8 -0
- data/lib/isodoc/mpfa/html/wordstyle.css +12 -1
- data/lib/isodoc/mpfa/html/wordstyle.scss +12 -1
- data/lib/isodoc/mpfa/mpfa.circular.xsl +310 -36
- data/lib/isodoc/mpfa/mpfa.compliance-standards-for-mpf-trustees.xsl +310 -36
- data/lib/isodoc/mpfa/mpfa.guidelines.xsl +310 -36
- data/lib/isodoc/mpfa/mpfa.standards.xsl +310 -36
- data/lib/isodoc/mpfa/mpfa.supervision-of-mpf-intermediaries.xsl +310 -36
- data/lib/metanorma/mpfa/version.rb +1 -1
- metadata +2 -2
@@ -134,7 +134,7 @@
|
|
134
134
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-MPFD-Logo))}" width="13.2mm" content-height="13mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image MPFD Logo"/>
|
135
135
|
</fo:block>
|
136
136
|
<fo:block-container text-align="center">
|
137
|
-
<fo:block>
|
137
|
+
<fo:block role="H1">
|
138
138
|
<fo:inline font-size="24pt" font-weight="bold">
|
139
139
|
<xsl:call-template name="capitalizeWords">
|
140
140
|
<xsl:with-param name="str" select="java:replaceAll(java:java.lang.String.new(/mpfd:mpfd-standard/mpfd:bibdata/mpfd:ext/mpfd:doctype),'MPF','')"/>
|
@@ -181,10 +181,10 @@
|
|
181
181
|
<xsl:with-param name="name" select="'title-toc'"/>
|
182
182
|
</xsl:call-template>
|
183
183
|
</xsl:variable>
|
184
|
-
<fo:block font-size="14pt" margin-bottom="15.5pt"><xsl:value-of select="$title-toc"/></fo:block>
|
185
|
-
<fo:block line-height="115%">
|
184
|
+
<fo:block font-size="14pt" margin-bottom="15.5pt" role="H1"><xsl:value-of select="$title-toc"/></fo:block>
|
185
|
+
<fo:block line-height="115%" role="TOC">
|
186
186
|
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
187
|
-
<fo:block>
|
187
|
+
<fo:block role="TOCI">
|
188
188
|
<xsl:if test="@level = 1">
|
189
189
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
190
190
|
</xsl:if>
|
@@ -240,7 +240,7 @@
|
|
240
240
|
|
241
241
|
|
242
242
|
|
243
|
-
<fo:block font-size="16pt" font-weight="bold" margin-bottom="18pt">
|
243
|
+
<fo:block font-size="16pt" font-weight="bold" margin-bottom="18pt" role="H1">
|
244
244
|
<xsl:value-of select="$title-en"/>
|
245
245
|
</fo:block>
|
246
246
|
|
@@ -389,12 +389,13 @@
|
|
389
389
|
</xsl:choose>
|
390
390
|
</xsl:variable>
|
391
391
|
|
392
|
-
<fo:block font-size="{$font-size}" color="rgb(14, 26, 133)" font-weight="bold" space-before="{$space-before}" space-after="{$space-after}" keep-with-next="always">
|
392
|
+
<fo:block font-size="{$font-size}" color="rgb(14, 26, 133)" font-weight="bold" space-before="{$space-before}" space-after="{$space-after}" keep-with-next="always" role="H{$level}">
|
393
393
|
<xsl:if test="parent::mpfd:annex">
|
394
394
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
395
395
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
396
396
|
</xsl:if>
|
397
397
|
<xsl:apply-templates/>
|
398
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
398
399
|
</fo:block>
|
399
400
|
|
400
401
|
</xsl:template>
|
@@ -737,14 +738,14 @@
|
|
737
738
|
|
738
739
|
<xsl:template name="insertHeaderFooter">
|
739
740
|
<xsl:param name="font-weight">normal</xsl:param>
|
740
|
-
<fo:static-content flow-name="header-even">
|
741
|
+
<fo:static-content flow-name="header-even" role="artifact">
|
741
742
|
<fo:block-container height="100%" display-align="before">
|
742
743
|
<fo:block padding-top="12.5mm">
|
743
744
|
<xsl:value-of select="$copyrightShort"/>
|
744
745
|
</fo:block>
|
745
746
|
</fo:block-container>
|
746
747
|
</fo:static-content>
|
747
|
-
<fo:static-content flow-name="footer-even">
|
748
|
+
<fo:static-content flow-name="footer-even" role="artifact">
|
748
749
|
<fo:block-container font-size="10pt" height="100%" display-align="after">
|
749
750
|
<fo:table table-layout="fixed" width="100%">
|
750
751
|
<fo:table-column column-width="10%"/>
|
@@ -762,14 +763,14 @@
|
|
762
763
|
</fo:table>
|
763
764
|
</fo:block-container>
|
764
765
|
</fo:static-content>
|
765
|
-
<fo:static-content flow-name="header-odd">
|
766
|
+
<fo:static-content flow-name="header-odd" role="artifact">
|
766
767
|
<fo:block-container height="100%" display-align="before">
|
767
768
|
<fo:block text-align="right" padding-top="12.5mm">
|
768
769
|
<xsl:value-of select="$copyrightShort"/>
|
769
770
|
</fo:block>
|
770
771
|
</fo:block-container>
|
771
772
|
</fo:static-content>
|
772
|
-
<fo:static-content flow-name="footer-odd">
|
773
|
+
<fo:static-content flow-name="footer-odd" role="artifact">
|
773
774
|
<fo:block-container font-size="10pt" height="100%" display-align="after">
|
774
775
|
<fo:table table-layout="fixed" width="100%">
|
775
776
|
<fo:table-column column-width="90%"/>
|
@@ -957,6 +958,7 @@
|
|
957
958
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
958
959
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
959
960
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
961
|
+
<xsl:attribute name="role">Code</xsl:attribute>
|
960
962
|
|
961
963
|
|
962
964
|
|
@@ -978,8 +980,13 @@
|
|
978
980
|
|
979
981
|
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
980
982
|
|
981
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
982
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
983
|
+
</xsl:attribute-set><xsl:attribute-set name="subject-style">
|
984
|
+
</xsl:attribute-set><xsl:attribute-set name="inherit-style">
|
985
|
+
</xsl:attribute-set><xsl:attribute-set name="description-style">
|
986
|
+
</xsl:attribute-set><xsl:attribute-set name="specification-style">
|
987
|
+
</xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
|
988
|
+
</xsl:attribute-set><xsl:attribute-set name="verification-style">
|
989
|
+
</xsl:attribute-set><xsl:attribute-set name="import-style">
|
983
990
|
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
984
991
|
|
985
992
|
|
@@ -1145,6 +1152,11 @@
|
|
1145
1152
|
|
1146
1153
|
|
1147
1154
|
|
1155
|
+
</xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
|
1156
|
+
|
1157
|
+
|
1158
|
+
|
1159
|
+
|
1148
1160
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1149
1161
|
|
1150
1162
|
|
@@ -1172,7 +1184,8 @@
|
|
1172
1184
|
|
1173
1185
|
|
1174
1186
|
|
1175
|
-
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1187
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1188
|
+
<xsl:attribute name="role">BlockQuote</xsl:attribute>
|
1176
1189
|
|
1177
1190
|
|
1178
1191
|
|
@@ -1299,13 +1312,20 @@
|
|
1299
1312
|
|
1300
1313
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1301
1314
|
|
1302
|
-
</xsl:attribute-set><xsl:
|
1315
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1316
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1317
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
|
1303
1318
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1304
1319
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1305
1320
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1306
1321
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1307
1322
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1308
|
-
</xsl:template><xsl:template name="
|
1323
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1324
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1325
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1326
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1327
|
+
</xsl:for-each>
|
1328
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1309
1329
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1310
1330
|
|
1311
1331
|
<!-- Normative references -->
|
@@ -1318,13 +1338,33 @@
|
|
1318
1338
|
<!-- Bibliography -->
|
1319
1339
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
1320
1340
|
|
1321
|
-
</xsl:template><xsl:template name="
|
1341
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1342
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1343
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1344
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1345
|
+
</xsl:for-each>
|
1346
|
+
|
1347
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1348
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1349
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1350
|
+
</xsl:for-each>
|
1351
|
+
|
1352
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1353
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1354
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1355
|
+
</xsl:for-each>
|
1356
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1322
1357
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1323
1358
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1324
1359
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1325
1360
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1326
1361
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1327
|
-
</xsl:template><xsl:template name="
|
1362
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1363
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1364
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1365
|
+
<xsl:apply-templates select="."/>
|
1366
|
+
</xsl:for-each>
|
1367
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1328
1368
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1329
1369
|
|
1330
1370
|
<!-- Normative references -->
|
@@ -1336,6 +1376,22 @@
|
|
1336
1376
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1337
1377
|
<!-- Bibliography -->
|
1338
1378
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1379
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1380
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1381
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1382
|
+
<xsl:apply-templates select="."/>
|
1383
|
+
|
1384
|
+
</xsl:for-each>
|
1385
|
+
|
1386
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1387
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1388
|
+
<xsl:apply-templates select="."/>
|
1389
|
+
</xsl:for-each>
|
1390
|
+
|
1391
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1392
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1393
|
+
<xsl:apply-templates select="."/>
|
1394
|
+
</xsl:for-each>
|
1339
1395
|
</xsl:template><xsl:template match="text()">
|
1340
1396
|
<xsl:value-of select="."/>
|
1341
1397
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -1366,7 +1422,9 @@
|
|
1366
1422
|
|
1367
1423
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1368
1424
|
|
1369
|
-
|
1425
|
+
|
1426
|
+
|
1427
|
+
|
1370
1428
|
|
1371
1429
|
<xsl:call-template name="fn_name_display"/>
|
1372
1430
|
|
@@ -2178,9 +2236,8 @@
|
|
2178
2236
|
|
2179
2237
|
<!-- Table's note name (NOTE, for example) -->
|
2180
2238
|
|
2181
|
-
<fo:inline padding-right="2mm">
|
2239
|
+
<fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
|
2182
2240
|
|
2183
|
-
|
2184
2241
|
|
2185
2242
|
|
2186
2243
|
|
@@ -2788,6 +2845,8 @@
|
|
2788
2845
|
<xsl:if test="$font-size != ''">
|
2789
2846
|
<xsl:attribute name="font-size">
|
2790
2847
|
<xsl:choose>
|
2848
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
2849
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
2791
2850
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2792
2851
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2793
2852
|
</xsl:choose>
|
@@ -3222,16 +3281,68 @@
|
|
3222
3281
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3223
3282
|
</xsl:call-template>
|
3224
3283
|
|
3284
|
+
|
3285
|
+
|
3225
3286
|
<xsl:variable name="mathml">
|
3226
3287
|
<xsl:apply-templates select="." mode="mathml"/>
|
3227
3288
|
</xsl:variable>
|
3228
3289
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3229
3290
|
|
3230
3291
|
|
3292
|
+
<xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
|
3293
|
+
<xsl:variable name="comment_text_">
|
3294
|
+
<xsl:choose>
|
3295
|
+
<xsl:when test="normalize-space($comment_text_following) != ''">
|
3296
|
+
<xsl:value-of select="$comment_text_following"/>
|
3297
|
+
</xsl:when>
|
3298
|
+
<xsl:otherwise>
|
3299
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
3300
|
+
</xsl:otherwise>
|
3301
|
+
</xsl:choose>
|
3302
|
+
</xsl:variable>
|
3303
|
+
<xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
|
3304
|
+
|
3305
|
+
<xsl:if test="normalize-space($comment_text) != ''">
|
3306
|
+
<!-- put Mathin Alternate Text -->
|
3307
|
+
<xsl:attribute name="fox:alt-text">
|
3308
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
|
3309
|
+
</xsl:attribute>
|
3310
|
+
</xsl:if>
|
3311
|
+
|
3312
|
+
<xsl:variable name="mathml_content">
|
3313
|
+
<xsl:apply-templates select="." mode="mathml_actual_text"/>
|
3314
|
+
</xsl:variable>
|
3315
|
+
<!-- put MathML in Actual Text -->
|
3316
|
+
<xsl:attribute name="fox:actual-text">
|
3317
|
+
<xsl:value-of select="$mathml_content"/>
|
3318
|
+
</xsl:attribute>
|
3319
|
+
|
3320
|
+
|
3231
3321
|
<!-- <xsl:copy-of select="."/> -->
|
3232
3322
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3233
3323
|
</fo:instream-foreign-object>
|
3234
3324
|
</fo:inline>
|
3325
|
+
</xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
|
3326
|
+
<!-- <xsl:text>a+b</xsl:text> -->
|
3327
|
+
<xsl:text><</xsl:text>
|
3328
|
+
<xsl:value-of select="local-name()"/>
|
3329
|
+
<xsl:if test="local-name() = 'math'">
|
3330
|
+
<xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
|
3331
|
+
</xsl:if>
|
3332
|
+
<xsl:for-each select="@*">
|
3333
|
+
<xsl:text> </xsl:text>
|
3334
|
+
<xsl:value-of select="local-name()"/>
|
3335
|
+
<xsl:text>="</xsl:text>
|
3336
|
+
<xsl:value-of select="."/>
|
3337
|
+
<xsl:text>"</xsl:text>
|
3338
|
+
</xsl:for-each>
|
3339
|
+
<xsl:text>></xsl:text>
|
3340
|
+
<xsl:apply-templates mode="mathml_actual_text"/>
|
3341
|
+
<xsl:text></</xsl:text>
|
3342
|
+
<xsl:value-of select="local-name()"/>
|
3343
|
+
<xsl:text>></xsl:text>
|
3344
|
+
</xsl:template><xsl:template match="text()" mode="mathml_actual_text">
|
3345
|
+
<xsl:value-of select="normalize-space()"/>
|
3235
3346
|
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3236
3347
|
<xsl:copy>
|
3237
3348
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
@@ -3293,7 +3404,10 @@
|
|
3293
3404
|
</fo:block>
|
3294
3405
|
<xsl:apply-templates/>
|
3295
3406
|
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
3296
|
-
<
|
3407
|
+
<xsl:variable name="level">
|
3408
|
+
<xsl:call-template name="getLevel"/>
|
3409
|
+
</xsl:variable>
|
3410
|
+
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
3297
3411
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
3298
3412
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
3299
3413
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -3328,9 +3442,10 @@
|
|
3328
3442
|
|
3329
3443
|
</xsl:variable>
|
3330
3444
|
|
3445
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
3331
3446
|
<xsl:choose>
|
3332
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
3333
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
3447
|
+
<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>
|
3448
|
+
<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>
|
3334
3449
|
</xsl:choose>
|
3335
3450
|
<xsl:apply-templates/>
|
3336
3451
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
@@ -3474,7 +3589,10 @@
|
|
3474
3589
|
</fo:block>
|
3475
3590
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
3476
3591
|
<xsl:if test="normalize-space() != ''">
|
3477
|
-
<
|
3592
|
+
<xsl:variable name="level">
|
3593
|
+
<xsl:call-template name="getLevelTermName"/>
|
3594
|
+
</xsl:variable>
|
3595
|
+
<fo:inline role="H{$level}">
|
3478
3596
|
<xsl:apply-templates/>
|
3479
3597
|
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
3480
3598
|
<xsl:text>.</xsl:text>
|
@@ -3775,6 +3893,13 @@
|
|
3775
3893
|
</xsl:attribute>
|
3776
3894
|
<xsl:apply-templates mode="svg_update"/>
|
3777
3895
|
</xsl:copy>
|
3896
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
3897
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
3898
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
3899
|
+
<xsl:call-template name="image_svg">
|
3900
|
+
<xsl:with-param name="name" select="$name"/>
|
3901
|
+
</xsl:call-template>
|
3902
|
+
</xsl:for-each>
|
3778
3903
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
3779
3904
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
3780
3905
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -3879,7 +4004,7 @@
|
|
3879
4004
|
</fo:basic-link>
|
3880
4005
|
</fo:block>
|
3881
4006
|
</fo:block-container>
|
3882
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
4007
|
+
</xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
3883
4008
|
<xsl:apply-templates mode="contents"/>
|
3884
4009
|
<xsl:text> </xsl:text>
|
3885
4010
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
@@ -4105,6 +4230,7 @@
|
|
4105
4230
|
</xsl:when>
|
4106
4231
|
<xsl:otherwise>
|
4107
4232
|
<xsl:apply-templates/>
|
4233
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
4108
4234
|
</xsl:otherwise>
|
4109
4235
|
</xsl:choose>
|
4110
4236
|
</fo:block>
|
@@ -4177,12 +4303,16 @@
|
|
4177
4303
|
<xsl:if test="$font-size != ''">
|
4178
4304
|
<xsl:attribute name="font-size">
|
4179
4305
|
<xsl:choose>
|
4306
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4307
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4180
4308
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4181
4309
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4182
4310
|
</xsl:choose>
|
4183
4311
|
</xsl:attribute>
|
4184
4312
|
</xsl:if>
|
4185
4313
|
|
4314
|
+
|
4315
|
+
|
4186
4316
|
<xsl:apply-templates/>
|
4187
4317
|
</fo:block>
|
4188
4318
|
|
@@ -4245,14 +4375,6 @@
|
|
4245
4375
|
<fo:block>
|
4246
4376
|
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
4247
4377
|
</fo:block>
|
4248
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
4249
|
-
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
4250
|
-
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4251
|
-
</fo:block>
|
4252
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
4253
|
-
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
4254
|
-
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
4255
|
-
</fo:block>
|
4256
4378
|
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
4257
4379
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
4258
4380
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -4269,6 +4391,38 @@
|
|
4269
4391
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
4270
4392
|
<xsl:apply-templates/>
|
4271
4393
|
</fo:block>
|
4394
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
4395
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
4396
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4397
|
+
</fo:block>
|
4398
|
+
</xsl:template><xsl:template match="*[local-name() = 'subject']">
|
4399
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
4400
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4401
|
+
</fo:block>
|
4402
|
+
</xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
4403
|
+
<fo:block xsl:use-attribute-sets="inherit-style">
|
4404
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
4405
|
+
</fo:block>
|
4406
|
+
</xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
4407
|
+
<fo:block xsl:use-attribute-sets="description-style">
|
4408
|
+
<xsl:apply-templates/>
|
4409
|
+
</fo:block>
|
4410
|
+
</xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
4411
|
+
<fo:block xsl:use-attribute-sets="specification-style">
|
4412
|
+
<xsl:apply-templates/>
|
4413
|
+
</fo:block>
|
4414
|
+
</xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
4415
|
+
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
4416
|
+
<xsl:apply-templates/>
|
4417
|
+
</fo:block>
|
4418
|
+
</xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
4419
|
+
<fo:block xsl:use-attribute-sets="verification-style">
|
4420
|
+
<xsl:apply-templates/>
|
4421
|
+
</fo:block>
|
4422
|
+
</xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
4423
|
+
<fo:block xsl:use-attribute-sets="import-style">
|
4424
|
+
<xsl:apply-templates/>
|
4425
|
+
</fo:block>
|
4272
4426
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4273
4427
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
4274
4428
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -4530,14 +4684,15 @@
|
|
4530
4684
|
</xsl:if>
|
4531
4685
|
</xsl:template><xsl:variable name="localized.source">
|
4532
4686
|
<xsl:call-template name="getLocalizedString">
|
4533
|
-
|
4534
|
-
|
4687
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4688
|
+
</xsl:call-template>
|
4535
4689
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4536
4690
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4537
4691
|
<xsl:if test="normalize-space(@citeas) = ''">
|
4538
4692
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4539
4693
|
</xsl:if>
|
4540
4694
|
|
4695
|
+
|
4541
4696
|
<fo:inline>
|
4542
4697
|
|
4543
4698
|
|
@@ -4545,6 +4700,7 @@
|
|
4545
4700
|
|
4546
4701
|
|
4547
4702
|
|
4703
|
+
|
4548
4704
|
<xsl:call-template name="getTitle">
|
4549
4705
|
<xsl:with-param name="name" select="'title-source'"/>
|
4550
4706
|
</xsl:call-template>
|
@@ -4556,6 +4712,7 @@
|
|
4556
4712
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4557
4713
|
<xsl:apply-templates/>
|
4558
4714
|
</fo:inline>
|
4715
|
+
|
4559
4716
|
</fo:basic-link>
|
4560
4717
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4561
4718
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -4622,6 +4779,9 @@
|
|
4622
4779
|
|
4623
4780
|
</xsl:if>
|
4624
4781
|
|
4782
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
4783
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
4784
|
+
|
4625
4785
|
|
4626
4786
|
|
4627
4787
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -4637,7 +4797,9 @@
|
|
4637
4797
|
|
4638
4798
|
|
4639
4799
|
</xsl:if>
|
4640
|
-
|
4800
|
+
|
4801
|
+
|
4802
|
+
|
4641
4803
|
<xsl:apply-templates/>
|
4642
4804
|
</fo:basic-link>
|
4643
4805
|
|
@@ -4965,6 +5127,7 @@
|
|
4965
5127
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
4966
5128
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
4967
5129
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
5130
|
+
|
4968
5131
|
<xsl:apply-templates/>
|
4969
5132
|
</fo:block>
|
4970
5133
|
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
@@ -5133,6 +5296,97 @@
|
|
5133
5296
|
<fo:block-container border="1pt solid black" width="50%">
|
5134
5297
|
<fo:block> </fo:block>
|
5135
5298
|
</fo:block-container>
|
5299
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5300
|
+
<xsl:param name="colwidths"/>
|
5301
|
+
<xsl:variable name="colwidths_">
|
5302
|
+
<xsl:choose>
|
5303
|
+
<xsl:when test="not($colwidths)">
|
5304
|
+
<xsl:variable name="toc_table_simple">
|
5305
|
+
<tbody>
|
5306
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5307
|
+
</tbody>
|
5308
|
+
</xsl:variable>
|
5309
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5310
|
+
<xsl:call-template name="calculate-column-widths">
|
5311
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5312
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5313
|
+
</xsl:call-template>
|
5314
|
+
</xsl:when>
|
5315
|
+
<xsl:otherwise>
|
5316
|
+
<xsl:copy-of select="$colwidths"/>
|
5317
|
+
</xsl:otherwise>
|
5318
|
+
</xsl:choose>
|
5319
|
+
</xsl:variable>
|
5320
|
+
<fo:block role="TOCI" space-after="16pt">
|
5321
|
+
<fo:table width="100%" table-layout="fixed">
|
5322
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5323
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5324
|
+
</xsl:for-each>
|
5325
|
+
<fo:table-body>
|
5326
|
+
<xsl:apply-templates/>
|
5327
|
+
</fo:table-body>
|
5328
|
+
</fo:table>
|
5329
|
+
</fo:block>
|
5330
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5331
|
+
<fo:table-row min-height="5mm">
|
5332
|
+
<xsl:apply-templates/>
|
5333
|
+
</fo:table-row>
|
5334
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5335
|
+
<xsl:apply-templates/>
|
5336
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5337
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5338
|
+
<xsl:variable name="target" select="@target"/>
|
5339
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5340
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5341
|
+
<fo:table-cell>
|
5342
|
+
<fo:block>
|
5343
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5344
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5345
|
+
<xsl:choose>
|
5346
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5347
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5348
|
+
</xsl:choose>
|
5349
|
+
</xsl:for-each>
|
5350
|
+
</fo:basic-link>
|
5351
|
+
</fo:block>
|
5352
|
+
</fo:table-cell>
|
5353
|
+
</xsl:for-each>
|
5354
|
+
<!-- last column - for page numbers -->
|
5355
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5356
|
+
<fo:block>
|
5357
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5358
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5359
|
+
</fo:basic-link>
|
5360
|
+
</fo:block>
|
5361
|
+
</fo:table-cell>
|
5362
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5363
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5364
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause'][@type = 'toc']/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'clause'][not(@type = 'toc')]/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'li']" mode="toc_table_width">
|
5365
|
+
<tr>
|
5366
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5367
|
+
</tr>
|
5368
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5369
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5370
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5371
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5372
|
+
<td>
|
5373
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5374
|
+
<xsl:copy-of select="."/>
|
5375
|
+
</xsl:for-each>
|
5376
|
+
</td>
|
5377
|
+
</xsl:for-each>
|
5378
|
+
<td>333</td> <!-- page number, just for fill -->
|
5379
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5380
|
+
<fo:inline padding-right="5mm"> </fo:inline>
|
5381
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5382
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5383
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5384
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5385
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5386
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5387
|
+
</svg>
|
5388
|
+
</fo:instream-foreign-object>
|
5389
|
+
</fo:inline>
|
5136
5390
|
</xsl:template><xsl:template name="convertDate">
|
5137
5391
|
<xsl:param name="date"/>
|
5138
5392
|
<xsl:param name="format" select="'short'"/>
|
@@ -5364,6 +5618,26 @@
|
|
5364
5618
|
<xsl:value-of select="$level"/>
|
5365
5619
|
</xsl:otherwise>
|
5366
5620
|
</xsl:choose>
|
5621
|
+
</xsl:template><xsl:template name="getLevelTermName">
|
5622
|
+
<xsl:choose>
|
5623
|
+
<xsl:when test="normalize-space(../@depth) != ''">
|
5624
|
+
<xsl:value-of select="../@depth"/>
|
5625
|
+
</xsl:when>
|
5626
|
+
<xsl:otherwise>
|
5627
|
+
<xsl:variable name="title_level_">
|
5628
|
+
<xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
|
5629
|
+
<xsl:call-template name="getLevel"/>
|
5630
|
+
</xsl:for-each>
|
5631
|
+
</xsl:variable>
|
5632
|
+
<xsl:variable name="title_level" select="normalize-space($title_level_)"/>
|
5633
|
+
<xsl:choose>
|
5634
|
+
<xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
|
5635
|
+
<xsl:otherwise>
|
5636
|
+
<xsl:call-template name="getLevel"/>
|
5637
|
+
</xsl:otherwise>
|
5638
|
+
</xsl:choose>
|
5639
|
+
</xsl:otherwise>
|
5640
|
+
</xsl:choose>
|
5367
5641
|
</xsl:template><xsl:template name="split">
|
5368
5642
|
<xsl:param name="pText" select="."/>
|
5369
5643
|
<xsl:param name="sep" select="','"/>
|