metanorma-iec 1.2.0 → 1.2.1

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: e72099c93ed3258ff5f342d7e2904b9e5a4d34e00a0546a0f77e0993f2bf824f
4
- data.tar.gz: d12c6b7259b187bf5718140ad47addf83b19281bcd34e1f1bcb80b8f695e39ef
3
+ metadata.gz: c6954eeb16e4eacebb2da8b23af6e8e539d94e057dcb307a3bed74e605f12511
4
+ data.tar.gz: 59bbd02eea1ee16223631ce0a21feabfbb5ce37381cafb84ff079bdb223cb6f4
5
5
  SHA512:
6
- metadata.gz: 86a009528de61d607c417a99ca4090a829c26e86e2f91c9ab513b3800456d68a544c7fc18eaaeaac0fe0b85474c0fdd1f34d9aaf653ddc54a263ad98dae1e10d
7
- data.tar.gz: 19fb4b433da961438c84da0cc0fbc697a7a7d684f37725a6b4f6ad2c193b5e38cefc524405c9071fcfa376e10f85f30101bb3060f2a742db9ecea3ea29c6e518
6
+ metadata.gz: 376cbd9860701e0e7d191ea4af5918b341633c072ea78dac21f94fcc06beb1ce33c980715ef03d5d2f7a3776593fffb4e41a41b0a889275bbc0d48ff24db5da9
7
+ data.tar.gz: 74603e98c28bed3c4e7c97f28ab94eccbfbd54895207c8cd83f192c751f3194d280e426714f5fd1fe6d412c38c4118c3af063de6cc319819707244c1e979ad77
@@ -2,6 +2,9 @@
2
2
 
3
3
  <xsl:output method="xml" encoding="UTF-8" indent="no"/>
4
4
 
5
+ <xsl:param name="svg_images"/>
6
+ <xsl:variable name="images" select="document($svg_images)"/>
7
+
5
8
 
6
9
 
7
10
  <xsl:param name="additionalXMLs" select="''"/> <!-- iec-rice.fr.xml -->
@@ -115,25 +118,20 @@
115
118
  <contents>
116
119
 
117
120
  <xsl:apply-templates select="/iec:iec-standard/iec:preface/node()" mode="contents"/>
118
- <!-- <xsl:with-param name="sectionNum" select="'0'"/>
119
- </xsl:apply-templates> -->
120
- <xsl:apply-templates select="/iec:iec-standard/iec:sections/iec:clause[starts-with(@id, '_scope')]" mode="contents"> <!-- [@id = '_scope'] -->
121
- <xsl:with-param name="sectionNum" select="'1'"/>
122
- </xsl:apply-templates>
123
- <xsl:apply-templates select="/iec:iec-standard/iec:bibliography/iec:references[starts-with(@id, '_normative_references') or starts-with(@id, '_references')]" mode="contents"> <!-- [@id = '_normative_references'] -->
124
- <xsl:with-param name="sectionNum" select="count(/iec:iec-standard/iec:sections/iec:clause[starts-with(@id, '_scope')]) + 1"/>
125
- </xsl:apply-templates>
121
+
122
+ <xsl:apply-templates select="/iec:iec-standard/iec:sections/iec:clause[starts-with(@id, '_scope')]" mode="contents"/> <!-- [@id = '_scope'] -->
123
+
124
+ <!-- Normative references -->
125
+ <xsl:apply-templates select="/iec:iec-standard/iec:bibliography/iec:references[starts-with(@id, '_normative_references') or starts-with(@id, '_references')]" mode="contents"/> <!-- [@id = '_normative_references'] -->
126
126
 
127
127
  <!-- Terms and definitions -->
128
- <xsl:apply-templates select="/iec:iec-standard/iec:sections/iec:terms" mode="contents">
129
- <xsl:with-param name="sectionNum" select="count(/iec:iec-standard/iec:sections/iec:clause[starts-with(@id, '_scope')]) + count(/iec:iec-standard/iec:bibliography/iec:references[starts-with(@id, '_normative_references') or starts-with(@id, '_references')]) + 1"/>
130
- </xsl:apply-templates>
128
+ <xsl:apply-templates select="/iec:iec-standard/iec:sections/iec:terms" mode="contents"/>
131
129
 
132
- <xsl:apply-templates select="/iec:iec-standard/iec:sections/*[local-name() != 'terms' and not(starts-with(@id, '_scope'))]" mode="contents">
133
- <xsl:with-param name="sectionNumSkew" select="count(/iec:iec-standard/iec:sections/iec:clause[starts-with(@id, '_scope')]) + count(/iec:iec-standard/iec:bibliography/iec:references[starts-with(@id, '_normative_references') or starts-with(@id, '_references')]) + count(/iec:iec-standard/iec:sections/iec:terms)"/>
134
- </xsl:apply-templates>
130
+ <xsl:apply-templates select="/iec:iec-standard/iec:sections/*[local-name() != 'terms' and not(starts-with(@id, '_scope'))]" mode="contents"/>
135
131
 
136
132
  <xsl:apply-templates select="/iec:iec-standard/iec:annex" mode="contents"/>
133
+
134
+ <!-- Bibliography -->
137
135
  <xsl:apply-templates select="/iec:iec-standard/iec:bibliography/iec:references[not(starts-with(@id, '_normative_references') or starts-with(@id, '_references'))]" mode="contents"/> <!-- @id = '_bibliography' -->
138
136
 
139
137
  </contents>
@@ -147,6 +145,7 @@
147
145
  </xsl:variable>
148
146
 
149
147
  <xsl:template match="/">
148
+ <xsl:call-template name="namespaceCheck"/>
150
149
  <!-- https://stackoverflow.com/questions/25261949/xsl-fo-letter-spacing-with-text-align -->
151
150
  <!-- https://xmlgraphics.apache.org/fop/knownissues.html -->
152
151
  <fo:root font-family="Arial, Times New Roman, STIX2Math, HanSans" font-size="10pt" xml:lang="{$lang}">
@@ -1184,7 +1183,9 @@
1184
1183
  </xsl:call-template>
1185
1184
  </fo:block>
1186
1185
 
1187
- <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true'] [@level &lt;= 3] [not(@level = 2 and starts-with(@section, '0'))]"><!-- skip clause from preface -->
1186
+ <xsl:for-each select="xalan:nodeset($contents)//item"><!-- [@display = 'true']
1187
+ [@level &lt;= 3]
1188
+ [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
1188
1189
  <fo:block text-align-last="justify">
1189
1190
  <xsl:if test="@level = 1">
1190
1191
  <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
@@ -1211,7 +1212,7 @@
1211
1212
  </xsl:attribute>
1212
1213
  <xsl:attribute name="provisional-distance-between-starts">
1213
1214
  <xsl:choose>
1214
- <xsl:when test="@display-section = 'false' or @section = ''">0mm</xsl:when>
1215
+ <xsl:when test="@section = ''">0mm</xsl:when>
1215
1216
  <xsl:when test="@level = 1">8mm</xsl:when>
1216
1217
  <xsl:when test="@level = 2">15mm</xsl:when>
1217
1218
  <xsl:when test="@level = 3">19mm</xsl:when>
@@ -1221,22 +1222,17 @@
1221
1222
  <fo:list-item>
1222
1223
  <fo:list-item-label end-indent="label-end()">
1223
1224
  <fo:block>
1224
- <xsl:if test="not(@display-section = 'false')">
1225
- <xsl:value-of select="@section"/>
1226
- </xsl:if>
1225
+ <xsl:value-of select="@section"/>
1227
1226
  </fo:block>
1228
1227
  </fo:list-item-label>
1229
1228
  <fo:list-item-body start-indent="body-start()">
1230
1229
  <fo:block text-align-last="justify">
1231
1230
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
1232
- <xsl:if test="@type = 'annex'">
1233
- <fo:inline><xsl:value-of select="@section"/></fo:inline>
1234
- <xsl:if test="@addon != ''">
1235
- <fo:inline> (<xsl:value-of select="@addon"/>) </fo:inline>
1236
- </xsl:if>
1237
- </xsl:if>
1231
+ <xsl:variable name="title">
1232
+ <xsl:apply-templates/>
1233
+ </xsl:variable>
1238
1234
  <xsl:call-template name="addLetterSpacing">
1239
- <xsl:with-param name="text" select="text()"/>
1235
+ <xsl:with-param name="text" select="$title"/>
1240
1236
  </xsl:call-template>
1241
1237
  <xsl:text> </xsl:text>
1242
1238
  <fo:inline keep-together.within-line="always">
@@ -1251,17 +1247,12 @@
1251
1247
  </fo:block>
1252
1248
  </xsl:for-each>
1253
1249
 
1254
- <xsl:if test="xalan:nodeset($contents)//item[@type = 'figure']">
1255
- <fo:block margin-bottom="5pt"> </fo:block>
1256
- <!-- <fo:block margin-top="5pt" margin-bottom="10pt">&#xA0;</fo:block> -->
1257
- <xsl:for-each select="xalan:nodeset($contents)//item[@type = 'figure']">
1250
+ <xsl:if test="//iec:figure[@id and iec:name]">
1251
+ <fo:block margin-bottom="5pt"> </fo:block>
1252
+ <xsl:for-each select="//iec:figure[@id and iec:name]">
1258
1253
  <fo:block text-align-last="justify" margin-bottom="5pt" margin-left="8mm" text-indent="-8mm">
1259
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{@section}">
1260
- <xsl:value-of select="@section"/>
1261
- <xsl:if test="text() != ''">
1262
- <xsl:text> – </xsl:text>
1263
- <xsl:value-of select="text()"/><xsl:text> </xsl:text>
1264
- </xsl:if>
1254
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="Figure {@id}">
1255
+ <xsl:apply-templates select="iec:name" mode="contents"/>
1265
1256
  <fo:inline keep-together.within-line="always">
1266
1257
  <fo:leader leader-pattern="dots"/>
1267
1258
  <fo:page-number-citation ref-id="{@id}"/>
@@ -1271,17 +1262,12 @@
1271
1262
  </xsl:for-each>
1272
1263
  </xsl:if>
1273
1264
 
1274
- <xsl:if test="xalan:nodeset($contents)//item[@type = 'table']">
1275
- <fo:block margin-bottom="5pt"> </fo:block>
1276
- <!-- <fo:block margin-top="5pt" margin-bottom="10pt">&#xA0;</fo:block> -->
1277
- <xsl:for-each select="xalan:nodeset($contents)//item[@type = 'table' and @display = 'true']">
1265
+ <xsl:if test="//iec:table[@id and iec:name]">
1266
+ <fo:block margin-bottom="5pt"> </fo:block>
1267
+ <xsl:for-each select="//iec:table[@id and iec:name]">
1278
1268
  <fo:block text-align-last="justify" margin-bottom="5pt" margin-left="8mm" text-indent="-8mm">
1279
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{@section}">
1280
- <xsl:value-of select="@section"/>
1281
- <xsl:if test="text() != ''">
1282
- <xsl:text> – </xsl:text>
1283
- <xsl:value-of select="text()"/><xsl:text> </xsl:text>
1284
- </xsl:if>
1269
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="Table {@id}">
1270
+ <xsl:apply-templates select="iec:name" mode="contents"/>
1285
1271
  <fo:inline keep-together.within-line="always">
1286
1272
  <fo:leader leader-pattern="dots"/>
1287
1273
  <fo:page-number-citation ref-id="{@id}"/>
@@ -1290,7 +1276,7 @@
1290
1276
  </fo:block>
1291
1277
  </xsl:for-each>
1292
1278
  </xsl:if>
1293
-
1279
+
1294
1280
  </fo:block-container>
1295
1281
  </xsl:template>
1296
1282
 
@@ -1367,26 +1353,17 @@
1367
1353
 
1368
1354
 
1369
1355
  <!-- Scope -->
1370
- <xsl:apply-templates select="/iec:iec-standard/iec:sections/iec:clause[starts-with(@id, '_scope')]">
1371
- <xsl:with-param name="sectionNum" select="'1'"/>
1372
- </xsl:apply-templates>
1373
-
1356
+ <xsl:apply-templates select="/iec:iec-standard/iec:sections/iec:clause[starts-with(@id, '_scope')]"/>
1357
+
1374
1358
  <!-- Normative references -->
1375
- <xsl:apply-templates select="/iec:iec-standard/iec:bibliography/iec:references[starts-with(@id, '_normative_references') or starts-with(@id, '_references')]">
1376
- <xsl:with-param name="sectionNum" select="count(/iec:iec-standard/iec:sections/iec:clause[starts-with(@id, '_scope')]) + 1"/>
1377
- </xsl:apply-templates>
1359
+ <xsl:apply-templates select="/iec:iec-standard/iec:bibliography/iec:references[starts-with(@id, '_normative_references') or starts-with(@id, '_references')]"/>
1378
1360
 
1379
1361
  <!-- Terms and definitions -->
1380
- <xsl:apply-templates select="/iec:iec-standard/iec:sections/iec:terms">
1381
- <xsl:with-param name="sectionNum" select="count(/iec:iec-standard/iec:sections/iec:clause[starts-with(@id, '_scope')]) + count(/iec:iec-standard/iec:bibliography/iec:references[starts-with(@id, '_normative_references') or starts-with(@id, '_references')]) + 1"/>
1382
- </xsl:apply-templates>
1383
-
1384
- <!-- main sections -->
1385
- <!-- *[position() &gt; 1] -->
1386
- <xsl:apply-templates select="/iec:iec-standard/iec:sections/*[local-name() != 'terms' and not(starts-with(@id, '_scope'))]">
1387
- <xsl:with-param name="sectionNumSkew" select="count(/iec:iec-standard/iec:sections/iec:clause[starts-with(@id, '_scope')]) + count(/iec:iec-standard/iec:bibliography/iec:references[starts-with(@id, '_normative_references') or starts-with(@id, '_references')]) + count(/iec:iec-standard/iec:sections/iec:terms)"/>
1388
- </xsl:apply-templates>
1362
+ <xsl:apply-templates select="/iec:iec-standard/iec:sections/iec:terms"/>
1389
1363
 
1364
+ <!-- main sections -->
1365
+ <xsl:apply-templates select="/iec:iec-standard/iec:sections/*[local-name() != 'terms' and not(starts-with(@id, '_scope'))]"/>
1366
+
1390
1367
  <!-- Annex(s) -->
1391
1368
  <xsl:apply-templates select="/iec:iec-standard/iec:annex"/>
1392
1369
 
@@ -1399,216 +1376,74 @@
1399
1376
  </fo:page-sequence>
1400
1377
  </xsl:template>
1401
1378
 
1402
- <!-- for pass the paremeter 'sectionNum' over templates, like 'tunnel' parameter in XSLT 2.0 -->
1403
- <xsl:template match="node()">
1404
- <xsl:param name="sectionNum"/>
1405
- <xsl:param name="sectionNumSkew"/>
1406
- <xsl:apply-templates>
1407
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1408
- <xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
1409
- </xsl:apply-templates>
1379
+
1380
+ <xsl:template match="node()">
1381
+ <xsl:apply-templates/>
1410
1382
  </xsl:template>
1411
1383
 
1412
1384
  <!-- ============================= -->
1413
1385
  <!-- CONTENTS -->
1414
1386
  <!-- ============================= -->
1415
- <xsl:template match="node()" mode="contents">
1416
- <xsl:param name="sectionNum"/>
1417
- <xsl:param name="sectionNumSkew"/>
1418
- <xsl:apply-templates mode="contents">
1419
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1420
- <xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
1421
- </xsl:apply-templates>
1422
- </xsl:template>
1423
-
1424
-
1425
- <!-- calculate main section number (1,2,3) and pass it deep into templates -->
1426
- <!-- it's necessary, because there is itu:bibliography/itu:references from other section, but numbering should be sequental -->
1427
- <xsl:template match="iec:iec-standard/iec:sections/*" mode="contents">
1428
- <xsl:param name="sectionNum"/>
1429
- <xsl:param name="sectionNumSkew" select="0"/>
1430
- <xsl:variable name="sectionNum_">
1431
- <xsl:choose>
1432
- <xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
1433
- <xsl:when test="$sectionNumSkew != 0">
1434
- <xsl:variable name="number"><xsl:number count="iec:sections/*[local-name() != 'terms' and not(starts-with(@id, '_scope'))]"/></xsl:variable><!-- <xsl:number count="*"/> -->
1435
- <xsl:value-of select="$number + $sectionNumSkew"/>
1436
- </xsl:when>
1437
- <xsl:otherwise>
1438
- <xsl:number count="*"/>
1439
- </xsl:otherwise>
1440
- </xsl:choose>
1441
- </xsl:variable>
1442
- <xsl:apply-templates mode="contents">
1443
- <xsl:with-param name="sectionNum" select="$sectionNum_"/>
1444
- </xsl:apply-templates>
1387
+ <xsl:template match="node()" mode="contents">
1388
+ <xsl:apply-templates mode="contents"/>
1445
1389
  </xsl:template>
1446
1390
 
1447
- <!-- Any node with title element - clause, definition, annex,... -->
1448
- <xsl:template match="iec:title | iec:preferred" mode="contents">
1449
- <xsl:param name="sectionNum"/>
1450
- <!-- sectionNum=<xsl:value-of select="$sectionNum"/> -->
1451
- <xsl:variable name="id">
1452
- <xsl:call-template name="getId"/>
1453
- </xsl:variable>
1454
-
1391
+ <!-- element with title -->
1392
+ <xsl:template match="*[iec:title]" mode="contents">
1455
1393
  <xsl:variable name="level">
1456
- <xsl:call-template name="getLevel"/>
1457
- </xsl:variable>
1458
-
1459
- <xsl:variable name="section">
1460
- <xsl:call-template name="getSection">
1461
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1394
+ <xsl:call-template name="getLevel">
1395
+ <xsl:with-param name="depth" select="iec:title/@depth"/>
1462
1396
  </xsl:call-template>
1463
1397
  </xsl:variable>
1464
1398
 
1465
- <xsl:variable name="display">
1466
- <xsl:choose>
1467
- <xsl:when test="ancestor::iec:bibitem">false</xsl:when>
1468
- <xsl:when test="ancestor::iec:term">false</xsl:when>
1469
- <!-- <xsl:when test="ancestor::iec:annex and $level &gt;= 2">false</xsl:when> -->
1470
- <xsl:when test="$level &lt;= 3">true</xsl:when>
1471
- <xsl:otherwise>false</xsl:otherwise>
1472
- </xsl:choose>
1473
- </xsl:variable>
1474
-
1475
- <xsl:variable name="display-section">
1476
- <xsl:choose>
1477
- <xsl:when test="ancestor::iec:appendix">false</xsl:when>
1478
- <xsl:when test="ancestor::iec:annex and $level = 1">false</xsl:when>
1479
- <xsl:otherwise>true</xsl:otherwise>
1480
- </xsl:choose>
1399
+ <xsl:variable name="section">
1400
+ <xsl:call-template name="getSection"/>
1481
1401
  </xsl:variable>
1482
1402
 
1483
1403
  <xsl:variable name="type">
1484
- <xsl:value-of select="local-name(..)"/>
1404
+ <xsl:value-of select="local-name()"/>
1485
1405
  </xsl:variable>
1486
-
1487
- <xsl:variable name="root">
1406
+
1407
+ <xsl:variable name="display">
1488
1408
  <xsl:choose>
1489
- <xsl:when test="ancestor::iec:annex">annex</xsl:when>
1409
+ <xsl:when test="ancestor-or-self::iec:bibitem">false</xsl:when>
1410
+ <xsl:when test="ancestor-or-self::iec:term">false</xsl:when>
1411
+ <xsl:when test="$level &gt; 3">false</xsl:when>
1412
+ <xsl:when test="$section = '' and $type = 'clause'">false</xsl:when><!-- don't show clause with number only in title -->
1413
+ <xsl:otherwise>true</xsl:otherwise>
1490
1414
  </xsl:choose>
1491
1415
  </xsl:variable>
1492
1416
 
1493
- <item id="{$id}" level="{$level}" section="{$section}" display-section="{$display-section}" display="{$display}" type="{$type}" root="{$root}">
1494
- <xsl:attribute name="addon">
1495
- <xsl:if test="local-name(..) = 'annex'"><xsl:value-of select="../@obligation"/></xsl:if>
1496
- </xsl:attribute>
1497
- <xsl:choose>
1498
- <xsl:when test="ancestor::iec:preface">
1499
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
1500
- </xsl:when>
1501
- <xsl:otherwise>
1502
- <xsl:value-of select="."/>
1503
- </xsl:otherwise>
1504
- </xsl:choose>
1505
- </item>
1506
-
1507
- <xsl:apply-templates mode="contents">
1508
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1509
- </xsl:apply-templates>
1417
+ <xsl:if test="$display = 'true'">
1510
1418
 
1511
- </xsl:template>
1512
-
1513
-
1514
- <xsl:template match="iec:figure" mode="contents">
1515
- <xsl:param name="sectionNum"/>
1516
- <xsl:apply-templates mode="contents">
1517
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1518
- </xsl:apply-templates>
1519
- <item level="" id="{@id}" display="false" type="figure">
1520
- <xsl:attribute name="section">
1521
- <xsl:variable name="title-figure">
1522
- <xsl:call-template name="getTitle">
1523
- <xsl:with-param name="name" select="'title-figure'"/>
1524
- </xsl:call-template>
1525
- </xsl:variable>
1526
- <xsl:value-of select="$title-figure"/>
1419
+ <xsl:variable name="title">
1420
+ <xsl:call-template name="getName"/>
1421
+ </xsl:variable>
1422
+
1423
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
1424
+ <xsl:if test="$type ='appendix'">
1425
+ <xsl:attribute name="section"/>
1426
+ </xsl:if>
1527
1427
  <xsl:choose>
1528
- <xsl:when test="ancestor::iec:annex">
1529
- <xsl:choose>
1530
- <xsl:when test="count(//iec:annex) = 1">
1531
- <xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:ext/iec:structuredidentifier/iec:annexid"/><xsl:number format="-1" level="any" count="iec:annex//iec:figure"/>
1532
- </xsl:when>
1533
- <xsl:otherwise>
1534
- <xsl:number format="A.1-1" level="multiple" count="iec:annex | iec:figure"/>
1535
- </xsl:otherwise>
1536
- </xsl:choose>
1537
- </xsl:when>
1538
- <xsl:when test="ancestor::iec:figure">
1539
- <xsl:for-each select="parent::*[1]">
1540
- <xsl:number format="1" level="any" count="iec:figure[not(parent::iec:figure)]"/>
1541
- </xsl:for-each>
1542
- <xsl:number format="-a" count="iec:figure"/>
1428
+ <xsl:when test="$type = 'foreword' or $type = 'introduction'">
1429
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($title))"/>
1543
1430
  </xsl:when>
1544
- <xsl:otherwise>
1545
- <xsl:number format="1" level="any" count="iec:figure[not(parent::iec:figure)]"/>
1546
- </xsl:otherwise>
1547
- </xsl:choose>
1548
- </xsl:attribute>
1549
- <xsl:value-of select="iec:name"/>
1550
- </item>
1551
- </xsl:template>
1552
-
1553
-
1554
- <xsl:template match="iec:table" mode="contents">
1555
- <xsl:param name="sectionNum"/>
1556
- <xsl:variable name="annex-id" select="ancestor::iec:annex/@id"/>
1557
- <item level="" id="{@id}" display="true" type="table">
1558
- <xsl:if test="ancestor::iec:preface">
1559
- <xsl:attribute name="display">false</xsl:attribute>
1560
- </xsl:if>
1561
- <xsl:attribute name="section">
1562
- <xsl:variable name="title-table">
1563
- <xsl:call-template name="getTitle">
1564
- <xsl:with-param name="name" select="'title-table'"/>
1565
- </xsl:call-template>
1566
- </xsl:variable>
1567
- <xsl:value-of select="$title-table"/>
1568
- <xsl:choose>
1569
- <xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
1570
- <xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table']"/>
1571
- </xsl:when>
1572
- <xsl:when test="ancestor::*[local-name()='annex']">
1573
- <xsl:number format="A." count="iec:annex"/>
1574
- <xsl:number format="1" level="any" count="iec:table[ancestor::iec:annex[@id = $annex-id]]"/>
1431
+ <xsl:when test="$type = 'appendix'">
1432
+ <xsl:apply-templates select="iec:title" mode="contents_item"/>
1575
1433
  </xsl:when>
1576
1434
  <xsl:otherwise>
1577
- <!-- <xsl:number format="1"/> -->
1578
- <!-- <xsl:number format="1" level="any" count="*[local-name()='sections']//*[local-name()='table']"/> -->
1579
- <!-- <xsl:number format="1" level="any" count="*[local-name()='table'][not(ancestor::*[local-name()='annex'])]"/> -->
1580
- <!-- <xsl:number format="1" level="any" count="*[not(local-name()='annex') and not(local-name()='executivesummary')]//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/> -->
1581
- <xsl:number format="1" level="any" count="//*[local-name()='table'] [not(ancestor::*[local-name()='annex']) and not(ancestor::*[local-name()='executivesummary']) and not(ancestor::*[local-name()='bibdata']) and not(ancestor::*[local-name()='preface'])] [not(@unnumbered) or @unnumbered != 'true']"/>
1435
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
1582
1436
  </xsl:otherwise>
1583
1437
  </xsl:choose>
1584
- </xsl:attribute>
1585
- <xsl:value-of select="iec:name/text()"/>
1586
- </item>
1438
+
1439
+ </item>
1440
+ <xsl:apply-templates mode="contents"/>
1441
+ </xsl:if>
1442
+
1587
1443
  </xsl:template>
1588
1444
 
1589
1445
 
1590
-
1591
- <xsl:template match="iec:formula" mode="contents">
1592
- <xsl:param name="sectionNum"/>
1593
- <item level="" id="{@id}" display="false" type="formula">
1594
- <xsl:attribute name="section">
1595
- <!-- Formula -->
1596
- <xsl:variable name="title-equation">
1597
- <xsl:call-template name="getTitle">
1598
- <xsl:with-param name="name" select="'title-equation'"/>
1599
- </xsl:call-template>
1600
- </xsl:variable>
1601
- <xsl:value-of select="$title-equation"/><xsl:number format="(A.1)" level="multiple" count="iec:annex | iec:formula"/>
1602
- </xsl:attribute>
1603
- <xsl:attribute name="parentsection">
1604
- <xsl:for-each select="parent::*[1]/iec:title">
1605
- <xsl:call-template name="getSection">
1606
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1607
- </xsl:call-template>
1608
- </xsl:for-each>
1609
- </xsl:attribute>
1610
- </item>
1611
- </xsl:template>
1446
+
1612
1447
  <!-- ============================= -->
1613
1448
  <!-- ============================= -->
1614
1449
 
@@ -1665,7 +1500,7 @@
1665
1500
  </xsl:template>
1666
1501
 
1667
1502
 
1668
- <xsl:template match="iec:iec-standard/iec:preface/iec:foreword" priority="2">
1503
+ <xsl:template match="iec:iec-standard/iec:preface/iec:foreword" priority="3">
1669
1504
  <fo:block id="{@id}" margin-bottom="12pt" font-size="12pt" text-align="center">
1670
1505
  <xsl:call-template name="addLetterSpacing">
1671
1506
  <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new(iec:title))"/>
@@ -1679,68 +1514,26 @@
1679
1514
  </fo:block>
1680
1515
  </xsl:template>
1681
1516
 
1682
- <xsl:template match="iec:iec-standard/iec:preface/iec:introduction" priority="2">
1517
+ <!-- <xsl:template match="iec:iec-standard/iec:preface/iec:introduction" priority="3">
1683
1518
  <fo:block break-after="page"/>
1684
- <fo:block id="{@id}" margin-bottom="12pt" font-size="12pt" text-align="center">
1685
- <xsl:call-template name="addLetterSpacing">
1686
- <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new(iec:title))"/>
1687
- </xsl:call-template>
1688
- </fo:block>
1689
- <fo:block>
1690
- <xsl:apply-templates select="*[not(local-name() = 'title')]"/>
1691
- </fo:block>
1692
- </xsl:template>
1693
-
1694
- <!-- Foreword, Introduction -->
1695
- <xsl:template match="iec:iec-standard/iec:preface/*">
1696
- <fo:block break-after="page"/>
1697
- <fo:block>
1698
- <xsl:apply-templates/>
1519
+ <fo:block id="{@id}">
1520
+ <xsl:apply-templates />
1699
1521
  </fo:block>
1700
- </xsl:template>
1522
+ </xsl:template> -->
1701
1523
 
1702
1524
 
1703
- <!-- clause, terms, clause, ...-->
1704
- <xsl:template match="iec:iec-standard/iec:sections/*">
1705
- <xsl:param name="sectionNum"/>
1706
- <xsl:param name="sectionNumSkew" select="0"/>
1707
- <fo:block>
1708
- <xsl:variable name="pos"><xsl:number count="iec:sections/iec:clause | iec:sections/iec:terms"/></xsl:variable>
1709
- <!-- <xsl:if test="$pos &gt;= 2">
1710
- <xsl:attribute name="space-before">18pt</xsl:attribute>
1711
- </xsl:if> -->
1712
- <!-- pos=<xsl:value-of select="$pos" /> -->
1713
- <xsl:variable name="sectionNum_">
1714
- <xsl:choose>
1715
- <xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
1716
- <xsl:when test="$sectionNumSkew != 0">
1717
- <!-- <xsl:variable name="number"><xsl:number count="iec:sections/iec:clause | iec:sections/iec:terms"/></xsl:variable> -->
1718
- <xsl:variable name="number"><xsl:number count="iec:sections/*[local-name() != 'terms' and not(starts-with(@id, '_scope'))]"/></xsl:variable>
1719
- <xsl:value-of select="$number + $sectionNumSkew"/>
1720
- </xsl:when>
1721
- </xsl:choose>
1722
- </xsl:variable>
1723
- <xsl:if test="not(iec:title)">
1724
- <fo:block margin-top="3pt" margin-bottom="12pt">
1725
- <xsl:value-of select="$sectionNum_"/><xsl:number format=".1 " level="multiple" count="iec:clause"/>
1726
- </fo:block>
1727
- </xsl:if>
1728
- <xsl:apply-templates>
1729
- <xsl:with-param name="sectionNum" select="$sectionNum_"/>
1730
- </xsl:apply-templates>
1525
+ <xsl:template match="iec:annex//iec:clause" priority="2">
1526
+ <fo:block id="{@id}" margin-top="5pt" margin-bottom="10pt" text-align="justify">
1527
+ <xsl:apply-templates/>
1731
1528
  </fo:block>
1732
1529
  </xsl:template>
1733
1530
 
1734
- <xsl:template match="iec:annex//iec:clause">
1735
- <xsl:param name="sectionNum"/>
1736
- <fo:block margin-top="5pt" margin-bottom="10pt" text-align="justify">
1737
- <xsl:apply-templates>
1738
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1739
- </xsl:apply-templates>
1531
+ <xsl:template match="iec:clause//iec:clause" priority="2">
1532
+ <fo:block id="{@id}" space-after="10pt">
1533
+ <xsl:apply-templates/>
1740
1534
  </fo:block>
1741
1535
  </xsl:template>
1742
-
1743
- <xsl:template match="iec:clause//iec:clause[not(iec:title)]">
1536
+ <!-- <xsl:template match="iec:clause//iec:clause[not(iec:title)]">
1744
1537
  <xsl:param name="sectionNum"/>
1745
1538
  <xsl:variable name="section">
1746
1539
  <xsl:call-template name="getSection">
@@ -1753,44 +1546,51 @@
1753
1546
  </fo:block>
1754
1547
  <fo:block margin-bottom="10pt">
1755
1548
  <xsl:apply-templates>
1756
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1757
- <!-- <xsl:with-param name="inline" select="'true'"/> -->
1549
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
1758
1550
  </xsl:apply-templates>
1759
1551
  </fo:block>
1760
- <!-- <fo:block margin-top="3pt" >
1761
- <fo:inline font-weight="bold" padding-right="3mm">
1762
- <xsl:value-of select="$section"/>
1763
- </fo:inline>
1764
- <xsl:apply-templates>
1765
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1766
- <xsl:with-param name="inline" select="'true'"/>
1767
- </xsl:apply-templates>
1768
- </fo:block> -->
1552
+
1553
+ </xsl:template> -->
1554
+
1555
+ <!-- ====== -->
1556
+ <!-- title -->
1557
+ <!-- ====== -->
1558
+ <xsl:template match="iec:introduction/iec:title">
1559
+ <fo:block font-size="12pt" text-align="center" margin-bottom="12pt">
1560
+ <xsl:apply-templates/>
1561
+ </fo:block>
1562
+ </xsl:template>
1563
+ <xsl:template match="iec:introduction/iec:title/text()">
1564
+ <xsl:call-template name="addLetterSpacing">
1565
+ <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new(.))"/>
1566
+ </xsl:call-template>
1567
+ </xsl:template>
1568
+
1569
+ <xsl:template match="iec:annex/iec:title">
1570
+ <fo:block font-size="12pt" text-align="center" margin-bottom="32pt" keep-with-next="always">
1571
+ <xsl:apply-templates/>
1572
+ </fo:block>
1573
+ </xsl:template>
1574
+
1575
+ <!-- Bibliography -->
1576
+ <xsl:template match="iec:references[not(starts-with(@id, '_normative_references') or starts-with(@id, '_references'))]/iec:title">
1577
+ <fo:block font-size="12pt" text-align="center" margin-bottom="12pt" keep-with-next="always">
1578
+ <xsl:apply-templates/>
1579
+ </fo:block>
1580
+ </xsl:template>
1581
+ <xsl:template match="iec:references[not(starts-with(@id, '_normative_references') or starts-with(@id, '_references'))]/iec:title/text()">
1582
+ <xsl:call-template name="addLetterSpacing">
1583
+ <xsl:with-param name="text" select="."/>
1584
+ </xsl:call-template>
1769
1585
  </xsl:template>
1770
1586
 
1771
1587
 
1772
1588
  <xsl:template match="iec:title">
1773
- <xsl:param name="sectionNum"/>
1774
-
1775
- <xsl:variable name="parent-name" select="local-name(..)"/>
1776
- <!-- <xsl:variable name="references_num_current">
1777
- <xsl:number level="any" count="iec:references"/>
1778
- </xsl:variable> -->
1779
-
1780
- <xsl:variable name="id">
1781
- <xsl:call-template name="getId"/>
1782
- </xsl:variable>
1783
1589
 
1784
1590
  <xsl:variable name="level">
1785
1591
  <xsl:call-template name="getLevel"/>
1786
1592
  </xsl:variable>
1787
-
1788
- <xsl:variable name="section">
1789
- <xsl:call-template name="getSection">
1790
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1791
- </xsl:call-template>
1792
- </xsl:variable>
1793
-
1593
+
1794
1594
  <xsl:variable name="font-size">
1795
1595
  <xsl:choose>
1796
1596
  <xsl:when test="ancestor::iec:sections and $level = 1">11pt</xsl:when>
@@ -1799,123 +1599,38 @@
1799
1599
  <xsl:otherwise>10pt</xsl:otherwise>
1800
1600
  </xsl:choose>
1801
1601
  </xsl:variable>
1802
- <!-- <xsl:choose>
1803
- <xsl:when test="ancestor::iec:annex and $level = 1">12pt</xsl:when>
1804
- <xsl:when test="ancestor::iec:annex and $level &gt;= 2">10pt</xsl:when>
1805
- <xsl:when test="ancestor::iec:preface">16pt</xsl:when>
1806
- <xsl:when test="$level = 2">12pt</xsl:when>
1807
- <xsl:when test="$level &gt;= 3">11pt</xsl:when>
1808
- <xsl:otherwise>13pt</xsl:otherwise>
1809
- </xsl:choose>
1810
- </xsl:variable> -->
1811
-
1812
- <xsl:variable name="element-name">
1813
- <xsl:choose>
1814
- <xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
1815
- <xsl:otherwise>fo:block</xsl:otherwise>
1816
- </xsl:choose>
1817
- </xsl:variable>
1818
-
1602
+
1819
1603
  <xsl:choose>
1820
- <xsl:when test="$parent-name = 'annex'">
1821
- <fo:block id="{$id}" font-size="12pt" font-weight="bold" text-align="center" margin-bottom="32pt" keep-with-next="always">
1822
- <xsl:value-of select="$section"/>
1823
- <xsl:if test=" ../@obligation">
1824
- <xsl:value-of select="$linebreak"/>
1825
- <fo:inline font-weight="normal">(<xsl:value-of select="../@obligation"/>)</fo:inline>
1826
- </xsl:if>
1827
- <xsl:value-of select="$linebreak"/>
1828
- <xsl:value-of select="$linebreak"/>
1604
+ <xsl:when test="../@inline-header = 'true'">
1605
+ <fo:inline font-size="{$font-size}" font-weight="bold">
1829
1606
  <xsl:apply-templates/>
1830
- </fo:block>
1831
- </xsl:when>
1832
- <xsl:when test="$parent-name = 'references' and not(starts-with(../@id, '_normative_references') or starts-with(../@id, '_references'))"> <!-- Bibliography -->
1833
- <fo:block id="{$id}" font-size="12pt" text-align="center" margin-bottom="12pt" keep-with-next="always">
1834
- <xsl:call-template name="addLetterSpacing">
1835
- <xsl:with-param name="text" select="."/>
1836
- </xsl:call-template>
1837
- <!-- <xsl:apply-templates /> -->
1838
- </fo:block>
1839
- </xsl:when>
1840
- <xsl:when test="$parent-name = 'introduction'">
1841
- <fo:block id="{$id}" font-size="12pt" text-align="center" margin-bottom="10pt">
1842
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(text()))"/>
1843
- </fo:block>
1607
+ </fo:inline>
1844
1608
  </xsl:when>
1845
1609
  <xsl:otherwise>
1846
-
1847
- <xsl:variable name="padding-right">
1848
- <xsl:choose>
1849
- <xsl:when test="$level = 2 and ancestor::iec:annex">6mm</xsl:when>
1850
- <xsl:when test="$level = 2">7mm</xsl:when>
1851
- <xsl:otherwise>5mm</xsl:otherwise>
1852
- </xsl:choose>
1853
- </xsl:variable>
1854
-
1855
- <xsl:element name="{$element-name}">
1856
- <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
1857
- <xsl:attribute name="font-size">
1858
- <xsl:value-of select="$font-size"/>
1610
+ <fo:block font-size="{$font-size}" font-weight="bold" keep-with-next="always">
1611
+ <xsl:attribute name="space-before"> <!-- margin-top -->
1612
+ <xsl:choose>
1613
+ <xsl:when test="$level = 2 and ancestor::iec:annex">22pt</xsl:when>
1614
+ <xsl:when test="$level &gt;= 2 and ancestor::iec:annex">5pt</xsl:when>
1615
+ <!-- <xsl:when test="$level &gt;= 4">5pt</xsl:when> -->
1616
+ <xsl:when test="$level = '' or $level = 1">18pt</xsl:when><!-- 13.5pt -->
1617
+ <xsl:otherwise>10pt</xsl:otherwise>
1618
+ </xsl:choose>
1859
1619
  </xsl:attribute>
1860
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1861
-
1862
- <xsl:if test="$element-name = 'fo:block'">
1863
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1864
- <xsl:attribute name="space-before"> <!-- margin-top -->
1865
- <xsl:choose>
1866
- <xsl:when test="$level = 2 and ancestor::iec:annex">22pt</xsl:when>
1867
- <xsl:when test="$level &gt;= 2 and ancestor::iec:annex">5pt</xsl:when>
1868
- <xsl:when test="$level = '' or $level = 1">18pt</xsl:when><!-- 13.5pt -->
1869
- <xsl:otherwise>10pt</xsl:otherwise>
1870
- </xsl:choose>
1871
- </xsl:attribute>
1872
- <xsl:attribute name="margin-bottom">
1873
- <xsl:choose>
1874
- <xsl:when test="$level = '' or $level = 1">14pt</xsl:when>
1875
- <xsl:when test="$level = 2 and ancestor::iec:annex">14pt</xsl:when>
1876
- <xsl:otherwise>5pt</xsl:otherwise>
1877
- </xsl:choose>
1878
- </xsl:attribute>
1879
-
1880
- <fo:inline>
1881
- <xsl:if test="$section != ''">
1882
- <xsl:attribute name="padding-right">
1883
- <xsl:value-of select="$padding-right"/>
1884
- </xsl:attribute>
1885
- </xsl:if>
1886
- <xsl:value-of select="$section"/>
1887
- </fo:inline>
1888
- <xsl:apply-templates/>
1889
- </xsl:if>
1890
-
1891
- <xsl:if test="$element-name = 'fo:inline'">
1892
- <xsl:if test="$section != ''">
1893
- <xsl:attribute name="padding-right">
1894
- <xsl:value-of select="$padding-right"/>
1895
- </xsl:attribute>
1896
- </xsl:if>
1897
- <xsl:value-of select="$section"/>
1898
- </xsl:if>
1899
- </xsl:element>
1900
-
1901
-
1902
- <xsl:if test="$element-name = 'fo:inline'">
1903
- <fo:inline font-size="{$font-size}" font-weight="bold">
1904
- <xsl:apply-templates/>
1905
- </fo:inline>
1906
-
1907
- </xsl:if>
1908
-
1909
- <!-- <xsl:if test="$element-name = 'fo:inline' and not(following-sibling::iec:p)">
1910
- <fo:block>
1911
- <xsl:value-of select="$linebreak"/>
1912
- </fo:block>
1913
- </xsl:if> -->
1620
+ <xsl:attribute name="margin-bottom">
1621
+ <xsl:choose>
1622
+ <xsl:when test="$level = '' or $level = 1">14pt</xsl:when>
1623
+ <xsl:when test="$level = 2 and ancestor::iec:annex">14pt</xsl:when>
1624
+ <xsl:otherwise>5pt</xsl:otherwise>
1625
+ </xsl:choose>
1626
+ </xsl:attribute>
1627
+ <xsl:apply-templates/>
1628
+ </fo:block>
1914
1629
  </xsl:otherwise>
1915
1630
  </xsl:choose>
1916
-
1917
1631
  </xsl:template>
1918
-
1632
+ <!-- ====== -->
1633
+ <!-- ====== -->
1919
1634
 
1920
1635
 
1921
1636
  <xsl:template match="iec:p">
@@ -2031,90 +1746,8 @@
2031
1746
  <fo:block margin-bottom="10pt"><xsl:apply-templates/></fo:block>
2032
1747
  </xsl:template>
2033
1748
 
2034
- <xsl:template match="iec:review">
2035
- <!-- comment 2019-11-29 -->
2036
- <!-- <fo:block font-weight="bold">Review:</fo:block>
2037
- <xsl:apply-templates /> -->
2038
- </xsl:template>
2039
-
2040
- <xsl:template match="text()">
2041
- <xsl:value-of select="."/>
2042
- </xsl:template>
2043
-
2044
1749
 
2045
1750
 
2046
- <xsl:template match="iec:image">
2047
- <fo:block-container text-align="center">
2048
- <fo:block>
2049
- <fo:external-graphic src="{@src}" fox:alt-text="Image"/>
2050
- </fo:block>
2051
- <xsl:variable name="title-figure">
2052
- <xsl:call-template name="getTitle">
2053
- <xsl:with-param name="name" select="'title-figure'"/>
2054
- </xsl:call-template>
2055
- </xsl:variable>
2056
- <fo:block font-weight="bold" margin-top="12pt" margin-bottom="12pt"><xsl:value-of select="$title-figure"/><xsl:number format="1" level="any"/></fo:block>
2057
- </fo:block-container>
2058
-
2059
- </xsl:template>
2060
-
2061
- <xsl:template match="iec:figure">
2062
- <fo:block-container id="{@id}">
2063
- <fo:block>
2064
- <xsl:apply-templates/>
2065
- </fo:block>
2066
- <xsl:call-template name="fn_display_figure"/>
2067
- <xsl:for-each select="iec:note//iec:p">
2068
- <xsl:call-template name="note"/>
2069
- </xsl:for-each>
2070
- <fo:block font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="12pt" keep-with-previous="always">
2071
- <xsl:variable name="title-figure">
2072
- <xsl:call-template name="getTitle">
2073
- <xsl:with-param name="name" select="'title-figure'"/>
2074
- </xsl:call-template>
2075
- </xsl:variable>
2076
- <xsl:choose>
2077
- <xsl:when test="ancestor::iec:annex">
2078
-
2079
- <!-- <xsl:choose>
2080
-
2081
- <xsl:when test="local-name(..) = 'figure'">
2082
- <xsl:number format="a) "/>
2083
- </xsl:when>
2084
- <xsl:otherwise> -->
2085
-
2086
- <xsl:value-of select="$title-figure"/><xsl:number format="A.1-1" level="multiple" count="iec:annex | iec:figure"/>
2087
- <!-- </xsl:otherwise>
2088
- </xsl:choose> -->
2089
-
2090
- </xsl:when>
2091
- <xsl:otherwise>
2092
- <xsl:value-of select="$title-figure"/><xsl:number format="1" level="any"/>
2093
- </xsl:otherwise>
2094
- </xsl:choose>
2095
- <xsl:if test="iec:name">
2096
- <!-- <xsl:if test="not(local-name(..) = 'figure')"> -->
2097
- <xsl:text> — </xsl:text>
2098
- <!-- </xsl:if> -->
2099
- <xsl:value-of select="iec:name"/>
2100
- </xsl:if>
2101
- </fo:block>
2102
- </fo:block-container>
2103
- </xsl:template>
2104
-
2105
- <xsl:template match="iec:figure/iec:name"/>
2106
- <xsl:template match="iec:figure/iec:fn" priority="2"/>
2107
- <xsl:template match="iec:figure/iec:note"/>
2108
-
2109
-
2110
- <xsl:template match="iec:figure/iec:image">
2111
- <fo:block text-align="center">
2112
- <fo:external-graphic src="{@src}" width="75%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image"/> <!-- content-width="100%" -->
2113
- </fo:block>
2114
- </xsl:template>
2115
-
2116
-
2117
-
2118
1751
 
2119
1752
  <xsl:template match="iec:bibitem">
2120
1753
  <fo:block id="{@id}" margin-top="5pt" margin-bottom="10pt"> <!-- letter-spacing="0.4pt" -->
@@ -2141,7 +1774,7 @@
2141
1774
  </xsl:template>
2142
1775
 
2143
1776
 
2144
- <xsl:template match="iec:bibitem/iec:note">
1777
+ <xsl:template match="iec:bibitem/iec:note" priority="2">
2145
1778
  <fo:footnote>
2146
1779
  <xsl:variable name="number">
2147
1780
  <xsl:number level="any" count="iec:bibitem/iec:note"/>
@@ -2205,7 +1838,9 @@
2205
1838
  </fo:block>
2206
1839
  </fo:list-item-label>
2207
1840
  <fo:list-item-body start-indent="body-start()">
2208
- <xsl:apply-templates/>
1841
+ <fo:block>
1842
+ <xsl:apply-templates/>
1843
+ </fo:block>
2209
1844
  </fo:list-item-body>
2210
1845
  </fo:list-item>
2211
1846
  </xsl:template>
@@ -2222,22 +1857,12 @@
2222
1857
  </fo:block>
2223
1858
  </xsl:template>
2224
1859
 
2225
- <xsl:template match="iec:term">
2226
- <xsl:param name="sectionNum"/>
2227
- <fo:block id="{@id}">
2228
- <xsl:apply-templates>
2229
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
2230
- </xsl:apply-templates>
2231
- </fo:block>
2232
- </xsl:template>
2233
1860
 
2234
1861
  <xsl:template match="iec:preferred">
2235
- <xsl:param name="sectionNum"/>
1862
+
2236
1863
  <fo:block line-height="1.1" space-before="14pt">
2237
1864
  <fo:block font-weight="bold" keep-with-next="always">
2238
- <fo:inline>
2239
- <xsl:value-of select="$sectionNum"/>.<xsl:number count="iec:term"/>
2240
- </fo:inline>
1865
+ <xsl:apply-templates select="ancestor::iec:term/iec:name" mode="presentation"/>
2241
1866
  </fo:block>
2242
1867
  <fo:block font-weight="bold" keep-with-next="always">
2243
1868
  <xsl:apply-templates/>
@@ -2245,109 +1870,17 @@
2245
1870
  </fo:block>
2246
1871
  </xsl:template>
2247
1872
 
2248
- <xsl:template match="iec:admitted">
2249
- <fo:block>
2250
- <xsl:apply-templates/>
2251
- </fo:block>
2252
- </xsl:template>
2253
-
2254
- <xsl:template match="iec:deprecates">
2255
- <xsl:variable name="title-deprecated">
2256
- <xsl:call-template name="getTitle">
2257
- <xsl:with-param name="name" select="'title-deprecated'"/>
2258
- </xsl:call-template>
2259
- </xsl:variable>
2260
- <fo:block font-size="8pt" margin-top="5pt" margin-bottom="5pt"><xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/></fo:block>
2261
- </xsl:template>
2262
-
2263
- <xsl:template match="iec:definition[preceding-sibling::iec:domain]">
2264
- <xsl:apply-templates/>
2265
- </xsl:template>
2266
- <xsl:template match="iec:definition[preceding-sibling::iec:domain]/iec:p">
2267
- <fo:inline> <xsl:apply-templates/></fo:inline>
2268
- <fo:block> </fo:block>
2269
- </xsl:template>
2270
-
2271
- <xsl:template match="iec:definition">
2272
- <fo:block margin-bottom="6pt">
2273
- <xsl:apply-templates/>
2274
- </fo:block>
2275
- </xsl:template>
2276
-
2277
- <xsl:template match="iec:termsource">
2278
- <fo:block margin-bottom="8pt" keep-with-previous="always">
2279
- <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
2280
- <fo:basic-link internal-destination="{iec:origin/@bibitemid}" fox:alt-text="{iec:origin/@citeas}">
2281
- <xsl:text>[</xsl:text>
2282
- <xsl:variable name="title-source">
2283
- <xsl:call-template name="getTitle">
2284
- <xsl:with-param name="name" select="'title-source'"/>
2285
- </xsl:call-template>
2286
- </xsl:variable>
2287
- <xsl:value-of select="$title-source"/>
2288
- <xsl:text>: </xsl:text>
2289
- <xsl:value-of select="iec:origin/@citeas"/>
2290
- <xsl:apply-templates select="iec:origin/iec:localityStack"/>
2291
- </fo:basic-link>
2292
- <xsl:apply-templates select="iec:modification"/>
2293
- <xsl:text>]</xsl:text>
2294
- </fo:block>
2295
- </xsl:template>
2296
-
2297
1873
 
2298
- <xsl:template match="iec:modification/iec:p">
2299
- <fo:inline><xsl:apply-templates/></fo:inline>
2300
- </xsl:template>
2301
-
2302
- <xsl:template match="iec:termnote">
2303
- <fo:block font-size="8pt" margin-top="5pt" margin-bottom="5pt">
2304
- <xsl:variable name="num"><xsl:number/></xsl:variable>
2305
- <xsl:variable name="title-note-to-entry">
2306
- <xsl:call-template name="getTitle">
2307
- <xsl:with-param name="name" select="'title-note-to-entry'"/>
2308
- </xsl:call-template>
2309
- </xsl:variable>
2310
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($title-note-to-entry),'#',$num)"/>
2311
- <xsl:apply-templates/>
2312
- </fo:block>
2313
- </xsl:template>
2314
-
2315
- <xsl:template match="iec:termnote/iec:p">
2316
- <fo:inline><xsl:apply-templates/></fo:inline>
2317
- </xsl:template>
2318
1874
 
2319
- <xsl:template match="iec:domain">
2320
- <fo:inline>&lt;<xsl:apply-templates/>&gt;</fo:inline>
2321
- </xsl:template>
2322
-
2323
-
2324
- <xsl:template match="iec:termexample">
2325
- <fo:block margin-top="14pt" margin-bottom="10pt">
2326
- <xsl:variable name="title-example">
2327
- <xsl:call-template name="getTitle">
2328
- <xsl:with-param name="name" select="'title-example'"/>
2329
- </xsl:call-template>
2330
- </xsl:variable>
2331
- <fo:inline padding-right="10mm"><xsl:value-of select="normalize-space($title-example)"/></fo:inline>
2332
- <xsl:apply-templates/>
2333
- </fo:block>
2334
- </xsl:template>
2335
1875
 
2336
- <xsl:template match="iec:termexample/iec:p">
2337
- <fo:inline><xsl:apply-templates/></fo:inline>
2338
- </xsl:template>
2339
1876
 
2340
-
2341
- <xsl:template match="iec:annex">
2342
- <fo:block break-after="page"/>
2343
- <xsl:apply-templates/>
2344
- </xsl:template>
2345
1877
 
2346
-
2347
1878
  <!-- <xsl:template match="iec:references[@id = '_bibliography']"> -->
2348
1879
  <xsl:template match="iec:references[not(starts-with(@id, '_normative_references') or starts-with(@id, '_references'))]">
2349
1880
  <fo:block break-after="page"/>
2350
- <xsl:apply-templates/>
1881
+ <fo:block id="{@id}">
1882
+ <xsl:apply-templates/>
1883
+ </fo:block>
2351
1884
  <fo:block-container text-align="center" margin-top="10mm">
2352
1885
  <fo:block>_____________</fo:block>
2353
1886
  </fo:block-container>
@@ -2398,137 +1931,8 @@
2398
1931
  </fo:inline>
2399
1932
  </xsl:template>
2400
1933
 
2401
- <xsl:template match="iec:quote">
2402
- <fo:block margin-top="5pt" margin-bottom="10pt" margin-left="12mm" margin-right="12mm">
2403
- <xsl:apply-templates select=".//iec:p"/>
2404
- <fo:block text-align="right" margin-top="15pt">
2405
- <!-- — ISO, ISO 7301:2011, Clause 1 -->
2406
- <xsl:text>— </xsl:text><xsl:value-of select="iec:author"/>
2407
- <xsl:if test="iec:source">
2408
- <xsl:text>, </xsl:text>
2409
- <xsl:apply-templates select="iec:source"/>
2410
- </xsl:if>
2411
- </fo:block>
2412
- </fo:block>
2413
- </xsl:template>
2414
-
2415
- <xsl:template match="iec:source">
2416
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
2417
- <xsl:value-of select="@citeas"/> <!-- disable-output-escaping="yes" -->
2418
- <xsl:apply-templates select="iec:localityStack"/>
2419
- </fo:basic-link>
2420
- </xsl:template>
2421
-
2422
-
2423
- <xsl:template match="iec:xref">
2424
-
2425
- <xsl:variable name="docid">
2426
- <xsl:call-template name="getDocumentId"/>
2427
- </xsl:variable>
2428
- <xsl:variable name="contents" select="xalan:nodeset($contents)/doc[@id = $docid]"/>
2429
- <!-- <xsl:call-template name="generateContents"/>
2430
- </xsl:variable>
2431
- -->
2432
-
2433
- <xsl:variable name="section" select="xalan:nodeset($contents)//item[@id = current()/@target]/@section"/>
2434
- <fo:basic-link internal-destination="{@target}" fox:alt-text="{$section}">
2435
- <xsl:variable name="type" select="xalan:nodeset($contents)//item[@id = current()/@target]/@type"/>
2436
- <xsl:variable name="root" select="xalan:nodeset($contents)//item[@id = current()/@target]/@root"/>
2437
- <xsl:variable name="parentsection" select="xalan:nodeset($contents)//item[@id = current()/@target]/@parentsection"/>
2438
- <xsl:variable name="title-clause">
2439
- <xsl:call-template name="getTitle">
2440
- <xsl:with-param name="name" select="'title-clause'"/>
2441
- </xsl:call-template>
2442
- </xsl:variable>
2443
- <xsl:choose>
2444
- <xsl:when test="$type = 'clause' and $root != 'annex'"><xsl:value-of select="$title-clause"/></xsl:when><!-- and not (ancestor::annex) -->
2445
- <xsl:otherwise/> <!-- <xsl:value-of select="$type"/> -->
2446
- </xsl:choose>
2447
- <xsl:variable name="currentsection">
2448
- <xsl:for-each select="ancestor::iec:clause[1]/iec:title">
2449
- <xsl:call-template name="getSection"/>
2450
- </xsl:for-each>
2451
- </xsl:variable>
2452
- <xsl:if test="$type = 'formula' and $parentsection != '' and not(contains($parentsection, $currentsection))">
2453
- <xsl:value-of select="$parentsection"/><xsl:text>, </xsl:text>
2454
- </xsl:if>
2455
- <xsl:value-of select="$section"/>
2456
- </fo:basic-link>
2457
- </xsl:template>
2458
1934
 
2459
- <xsl:template match="iec:example/iec:p">
2460
- <fo:block>
2461
- <xsl:variable name="title-example">
2462
- <xsl:call-template name="getTitle">
2463
- <xsl:with-param name="name" select="'title-example'"/>
2464
- </xsl:call-template>
2465
- </xsl:variable>
2466
- <fo:inline padding-right="9mm"><xsl:value-of select="normalize-space($title-example)"/></fo:inline>
2467
- <xsl:apply-templates/>
2468
- </fo:block>
2469
- </xsl:template>
2470
-
2471
- <xsl:template match="iec:note/iec:p" name="note">
2472
- <fo:block margin-top="5pt" margin-bottom="5pt" font-size="8pt">
2473
- <xsl:if test="../following-sibling::iec:note">
2474
- <xsl:attribute name="margin-bottom">9pt</xsl:attribute>
2475
- </xsl:if>
2476
- <fo:inline padding-right="6mm">
2477
- <xsl:variable name="title-note">
2478
- <xsl:call-template name="getTitle">
2479
- <xsl:with-param name="name" select="'title-note'"/>
2480
- </xsl:call-template>
2481
- </xsl:variable>
2482
- <xsl:value-of select="$title-note"/>
2483
- <xsl:if test="ancestor::iec:figure">
2484
- <xsl:variable name="id" select="ancestor::iec:figure[1]/@id"/>
2485
- <xsl:if test="count(//iec:note[ancestor::*[@id = $id]]) &gt; 1">
2486
- <xsl:number count="iec:note[ancestor::*[@id = $id]]" level="any"/>
2487
- </xsl:if>
2488
- </xsl:if>
2489
- </fo:inline>
2490
- <xsl:apply-templates/>
2491
- </fo:block>
2492
- </xsl:template>
2493
1935
 
2494
- <!-- <eref type="inline" bibitemid="ISO20483" citeas="ISO 20483:2013"><locality type="annex"><referenceFrom>C</referenceFrom></locality></eref> -->
2495
- <xsl:template match="iec:eref">
2496
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
2497
- <xsl:if test="@type = 'footnote'">
2498
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
2499
- <xsl:attribute name="font-size">80%</xsl:attribute>
2500
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2501
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2502
- </xsl:if>
2503
- <xsl:value-of select="@citeas"/> <!-- disable-output-escaping="yes" -->
2504
- <xsl:apply-templates select="iec:localityStack"/>
2505
- </fo:basic-link>
2506
- </xsl:template>
2507
-
2508
- <xsl:template match="iec:locality">
2509
- <xsl:variable name="title-clause">
2510
- <xsl:call-template name="getTitle">
2511
- <xsl:with-param name="name" select="'title-clause'"/>
2512
- </xsl:call-template>
2513
- </xsl:variable>
2514
- <xsl:variable name="title-annex">
2515
- <xsl:call-template name="getTitle">
2516
- <xsl:with-param name="name" select="'title-annex'"/>
2517
- </xsl:call-template>
2518
- </xsl:variable>
2519
- <xsl:variable name="title-table">
2520
- <xsl:call-template name="getTitle">
2521
- <xsl:with-param name="name" select="'title-table'"/>
2522
- </xsl:call-template>
2523
- </xsl:variable>
2524
- <xsl:choose>
2525
- <xsl:when test="@type ='clause'"><xsl:value-of select="$title-clause"/></xsl:when>
2526
- <xsl:when test="@type ='annex'"><xsl:value-of select="$title-annex"/></xsl:when>
2527
- <xsl:when test="@type ='table'"><xsl:value-of select="$title-table"/></xsl:when>
2528
- <xsl:otherwise><xsl:value-of select="@type"/></xsl:otherwise>
2529
- </xsl:choose>
2530
- <xsl:text> </xsl:text><xsl:value-of select="iec:referenceFrom"/>
2531
- </xsl:template>
2532
1936
 
2533
1937
  <xsl:template match="iec:admonition">
2534
1938
  <fo:block-container border="0.5pt solid black" margin-left="-2mm" margin-right="-2mm" space-before="18pt" space-after="12pt">
@@ -2553,23 +1957,8 @@
2553
1957
  </xsl:call-template>
2554
1958
  </xsl:template>
2555
1959
 
2556
- <xsl:template match="iec:formula">
2557
- <fo:block id="{@id}">
2558
- <xsl:apply-templates/>
2559
- </fo:block>
2560
- </xsl:template>
2561
1960
 
2562
- <xsl:template match="iec:formula/iec:dt/iec:stem">
2563
- <fo:inline>
2564
- <xsl:apply-templates/>
2565
- </fo:inline>
2566
- </xsl:template>
2567
1961
 
2568
- <xsl:template match="iec:admitted/iec:stem">
2569
- <fo:inline> <!-- padding-left="6mm" -->
2570
- <xsl:apply-templates/>
2571
- </fo:inline>
2572
- </xsl:template>
2573
1962
 
2574
1963
  <xsl:template match="iec:formula/iec:stem">
2575
1964
  <fo:block margin-top="6pt" margin-bottom="12pt">
@@ -2579,35 +1968,22 @@
2579
1968
  <fo:table-body>
2580
1969
  <fo:table-row>
2581
1970
  <fo:table-cell display-align="center">
2582
- <fo:block text-align="center"> <!-- left margin-left="5mm" -->
1971
+ <fo:block text-align="center">
2583
1972
  <xsl:apply-templates/>
2584
1973
  </fo:block>
2585
1974
  </fo:table-cell>
2586
1975
  <fo:table-cell display-align="center">
2587
1976
  <fo:block text-align="right" margin-right="-10mm">
2588
- <xsl:choose>
2589
- <xsl:when test="ancestor::iec:annex">
2590
- <xsl:number format="(A.1)" level="multiple" count="iec:annex | iec:formula"/>
2591
- </xsl:when>
2592
- <xsl:otherwise> <!-- not(ancestor::iec:annex) -->
2593
- <xsl:text>(</xsl:text><xsl:number level="any" count="iec:formula"/><xsl:text>)</xsl:text>
2594
- </xsl:otherwise>
2595
- </xsl:choose>
1977
+ <xsl:apply-templates select="../iec:name" mode="presentation"/>
2596
1978
  </fo:block>
2597
1979
  </fo:table-cell>
2598
1980
  </fo:table-row>
2599
1981
  </fo:table-body>
2600
- </fo:table>
2601
- <fo:inline keep-together.within-line="always">
2602
- </fo:inline>
1982
+ </fo:table>
2603
1983
  </fo:block>
2604
1984
  </xsl:template>
2605
1985
 
2606
-
2607
- <xsl:template match="iec:br" priority="2">
2608
- <!-- <fo:block>&#xA0;</fo:block> -->
2609
- <xsl:value-of select="$linebreak"/>
2610
- </xsl:template>
1986
+
2611
1987
 
2612
1988
  <xsl:template name="insertHeaderFooter">
2613
1989
  <fo:static-content flow-name="header-even">
@@ -2662,95 +2038,6 @@
2662
2038
  </xsl:template>
2663
2039
 
2664
2040
 
2665
- <xsl:template name="getSection">
2666
- <xsl:param name="sectionNum"/>
2667
- <xsl:variable name="level">
2668
- <xsl:call-template name="getLevel"/>
2669
- </xsl:variable>
2670
- <xsl:variable name="section">
2671
- <xsl:choose>
2672
- <xsl:when test="ancestor::iec:bibliography">
2673
- <xsl:value-of select="$sectionNum"/>
2674
- </xsl:when>
2675
- <xsl:when test="ancestor::iec:sections">
2676
- <!-- 1, 2, 3, 4, ... from main section (not annex, bibliography, ...) -->
2677
- <xsl:choose>
2678
- <xsl:when test="$level = 1">
2679
- <xsl:value-of select="$sectionNum"/>
2680
- </xsl:when>
2681
- <xsl:when test="$level &gt;= 2">
2682
- <xsl:variable name="num">
2683
- <xsl:call-template name="getSubSection"/>
2684
- </xsl:variable>
2685
- <xsl:value-of select="concat($sectionNum, $num)"/>
2686
- </xsl:when>
2687
- <xsl:otherwise>
2688
- <!-- z<xsl:value-of select="$sectionNum"/>z -->
2689
- </xsl:otherwise>
2690
- </xsl:choose>
2691
- </xsl:when>
2692
- <!-- <xsl:when test="ancestor::iec:annex[@obligation = 'informative']">
2693
- <xsl:choose>
2694
- <xsl:when test="$level = 1">
2695
- <xsl:text>Annex </xsl:text>
2696
- <xsl:number format="I" level="any" count="iec:annex[@obligation = 'informative']"/>
2697
- </xsl:when>
2698
- <xsl:otherwise>
2699
- <xsl:number format="I.1" level="multiple" count="iec:annex[@obligation = 'informative'] | iec:clause"/>
2700
- </xsl:otherwise>
2701
- </xsl:choose>
2702
- </xsl:when> -->
2703
- <xsl:when test="ancestor::iec:annex">
2704
- <xsl:choose>
2705
- <xsl:when test="$level = 1">
2706
- <xsl:variable name="title-annex">
2707
- <xsl:call-template name="getTitle">
2708
- <xsl:with-param name="name" select="'title-annex'"/>
2709
- </xsl:call-template>
2710
- </xsl:variable>
2711
- <xsl:value-of select="$title-annex"/>
2712
- <xsl:choose>
2713
- <xsl:when test="count(//iec:annex) = 1">
2714
- <xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:ext/iec:structuredidentifier/iec:annexid"/>
2715
- </xsl:when>
2716
- <xsl:otherwise>
2717
- <xsl:number format="A" level="any" count="iec:annex"/>
2718
- </xsl:otherwise>
2719
- </xsl:choose>
2720
- </xsl:when>
2721
- <xsl:otherwise>
2722
- <xsl:choose>
2723
- <xsl:when test="count(//iec:annex) = 1">
2724
- <xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:ext/iec:structuredidentifier/iec:annexid"/><xsl:number format=".1" level="multiple" count="iec:clause"/>
2725
- </xsl:when>
2726
- <xsl:otherwise>
2727
- <xsl:number format="A.1" level="multiple" count="iec:annex | iec:clause"/>
2728
- </xsl:otherwise>
2729
- </xsl:choose>
2730
- </xsl:otherwise>
2731
- </xsl:choose>
2732
- </xsl:when>
2733
- <xsl:when test="ancestor::iec:preface"> <!-- if preface and there is clause(s) -->
2734
- <xsl:choose>
2735
- <xsl:when test="$level = 1 and ..//iec:clause">0</xsl:when>
2736
- <xsl:when test="$level &gt;= 2">
2737
- <xsl:variable name="num">
2738
- <xsl:number format=".1" level="multiple" count="iec:clause"/>
2739
- </xsl:variable>
2740
- <xsl:value-of select="concat('0', $num)"/>
2741
- </xsl:when>
2742
- <xsl:otherwise>
2743
- <!-- z<xsl:value-of select="$sectionNum"/>z -->
2744
- </xsl:otherwise>
2745
- </xsl:choose>
2746
- </xsl:when>
2747
- <xsl:otherwise>
2748
- </xsl:otherwise>
2749
- </xsl:choose>
2750
- </xsl:variable>
2751
- <xsl:value-of select="$section"/>
2752
- </xsl:template>
2753
-
2754
2041
  <xsl:variable name="Image-Logo-IEC">
2755
2042
  <xsl:text>iVBORw0KGgoAAAAN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X9GLmUIh1yUSkUgG73/hkkj+kXCRzVclBaI6KpgMXGp1nheuE0waI4MbT3oC9wTuCdwTuCdwT+D+H8L9rwADACN6luUjPP0FAAAAAElFTkSuQmCC</xsl:text>
2756
2043
  </xsl:variable>
@@ -2861,64 +2148,14 @@
2861
2148
  </xsl:template> -->
2862
2149
 
2863
2150
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
2151
+
2152
+ <title-annex lang="en">Annex </title-annex>
2153
+ <title-annex lang="fr">Annexe </title-annex>
2864
2154
 
2865
- <title-table lang="en">Table </title-table>
2866
- <title-table lang="fr">Tableau </title-table>
2867
-
2868
- <title-table lang="zh">Table </title-table>
2869
-
2870
-
2871
-
2872
- <title-note lang="en">NOTE </title-note>
2873
- <title-note lang="fr">NOTE </title-note>
2155
+ <title-annex lang="zh">Annex </title-annex>
2874
2156
 
2875
- <title-note lang="zh">NOTE </title-note>
2876
2157
 
2877
-
2878
-
2879
- <title-figure lang="en">Figure </title-figure>
2880
- <title-figure lang="fr">Figure </title-figure>
2881
-
2882
- <title-figure lang="zh">Figure </title-figure>
2883
-
2884
-
2885
-
2886
- <title-example lang="en">EXAMPLE </title-example>
2887
- <title-example lang="fr">EXEMPLE </title-example>
2888
-
2889
- <title-example lang="zh">EXAMPLE </title-example>
2890
-
2891
-
2892
-
2893
- <title-example-xref lang="en">Example </title-example-xref>
2894
- <title-example-xref lang="fr">Exemple </title-example-xref>
2895
-
2896
- <title-section lang="en">Section </title-section>
2897
- <title-section lang="fr">Section </title-section>
2898
-
2899
- <title-inequality lang="en">Inequality </title-inequality>
2900
- <title-inequality lang="fr">Inequality </title-inequality>
2901
-
2902
- <title-equation lang="en">Equation </title-equation>
2903
- <title-equation lang="fr">Equation </title-equation>
2904
2158
 
2905
- <title-annex lang="en">Annex </title-annex>
2906
- <title-annex lang="fr">Annexe </title-annex>
2907
-
2908
- <title-annex lang="zh">Annex </title-annex>
2909
-
2910
-
2911
-
2912
- <title-appendix lang="en">Appendix </title-appendix>
2913
- <title-appendix lang="fr">Appendix </title-appendix>
2914
-
2915
- <title-clause lang="en">Clause </title-clause>
2916
- <title-clause lang="fr">Article </title-clause>
2917
-
2918
- <title-clause lang="zh">Clause </title-clause>
2919
-
2920
-
2921
-
2922
2159
  <title-edition lang="en">
2923
2160
 
2924
2161
  <xsl:text>Edition </xsl:text>
@@ -2926,9 +2163,7 @@
2926
2163
 
2927
2164
  </title-edition>
2928
2165
 
2929
- <title-formula lang="en">Formula </title-formula>
2930
- <title-formula lang="fr">Formula </title-formula>
2931
-
2166
+
2932
2167
  <title-toc lang="en">
2933
2168
 
2934
2169
  <xsl:text>Contents</xsl:text>
@@ -2967,13 +2202,6 @@
2967
2202
  </title-part>
2968
2203
  <title-part lang="zh">第 # 部分:</title-part>
2969
2204
 
2970
- <title-note-to-entry lang="en">Note # to entry: </title-note-to-entry>
2971
- <title-note-to-entry lang="fr">Note # à l'article: </title-note-to-entry>
2972
-
2973
- <title-note-to-entry lang="zh">Note # to entry: </title-note-to-entry>
2974
-
2975
-
2976
-
2977
2205
  <title-modified lang="en">modified</title-modified>
2978
2206
  <title-modified lang="fr">modifiée</title-modified>
2979
2207
 
@@ -2987,14 +2215,12 @@
2987
2215
 
2988
2216
  <title-deprecated lang="en">DEPRECATED</title-deprecated>
2989
2217
  <title-deprecated lang="fr">DEPRECATED</title-deprecated>
2990
-
2991
- <title-submitting-organizations lang="en">Submitting Organizations</title-submitting-organizations>
2992
-
2218
+
2993
2219
  <title-list-tables lang="en">List of Tables</title-list-tables>
2994
2220
 
2995
2221
  <title-list-figures lang="en">List of Figures</title-list-figures>
2996
2222
 
2997
- <title-recommendation lang="en">Recommendation </title-recommendation>
2223
+ <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
2998
2224
 
2999
2225
  <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
3000
2226
 
@@ -3004,8 +2230,6 @@
3004
2230
 
3005
2231
  <title-in lang="en">in </title-in>
3006
2232
 
3007
- <title-box lang="en">Box </title-box>
3008
-
3009
2233
  <title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
3010
2234
  <title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
3011
2235
 
@@ -3028,7 +2252,7 @@
3028
2252
  <title-warning lang="zh">警告</title-warning>
3029
2253
 
3030
2254
  <title-amendment lang="en">AMENDMENT</title-amendment>
3031
- </xsl:variable><xsl:template name="getTitle">
2255
+ </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
3032
2256
  <xsl:param name="name"/>
3033
2257
  <xsl:variable name="lang">
3034
2258
  <xsl:call-template name="getLang"/>
@@ -3046,6 +2270,8 @@
3046
2270
 
3047
2271
 
3048
2272
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
2273
+ <xsl:attribute name="white-space">pre</xsl:attribute>
2274
+ <xsl:attribute name="wrap-option">wrap</xsl:attribute>
3049
2275
 
3050
2276
 
3051
2277
 
@@ -3059,9 +2285,110 @@
3059
2285
 
3060
2286
 
3061
2287
 
2288
+ </xsl:attribute-set><xsl:attribute-set name="permission-style">
2289
+
2290
+ </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
2291
+
2292
+ </xsl:attribute-set><xsl:attribute-set name="permission-label-style">
2293
+
2294
+ </xsl:attribute-set><xsl:attribute-set name="requirement-style">
2295
+
2296
+ </xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
2297
+
2298
+ </xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
2299
+
2300
+ </xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
2301
+ </xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
2302
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-style">
2303
+
2304
+
2305
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-name-style">
2306
+
2307
+
2308
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-label-style">
2309
+
2310
+ </xsl:attribute-set><xsl:attribute-set name="termexample-style">
2311
+
2312
+ <xsl:attribute name="margin-top">14pt</xsl:attribute>
2313
+ <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
2314
+
2315
+
2316
+
2317
+
2318
+
2319
+
2320
+
2321
+ </xsl:attribute-set><xsl:attribute-set name="example-style">
2322
+
2323
+
2324
+
2325
+
2326
+
2327
+
2328
+
2329
+
2330
+
2331
+
2332
+ </xsl:attribute-set><xsl:attribute-set name="example-body-style">
2333
+
2334
+
2335
+ </xsl:attribute-set><xsl:attribute-set name="example-name-style">
2336
+
2337
+
2338
+
2339
+
2340
+ <xsl:attribute name="padding-right">9mm</xsl:attribute>
2341
+
2342
+
2343
+
2344
+
2345
+
2346
+
2347
+
2348
+
2349
+
2350
+
2351
+
2352
+
2353
+ </xsl:attribute-set><xsl:attribute-set name="example-p-style">
2354
+
2355
+
2356
+
2357
+
2358
+
2359
+
2360
+
2361
+
2362
+
2363
+
2364
+
2365
+ </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
2366
+
2367
+ <xsl:attribute name="padding-right">10mm</xsl:attribute>
2368
+
2369
+
2370
+
2371
+
2372
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
2373
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2374
+
2375
+
2376
+
2377
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2378
+ <xsl:attribute name="text-align">center</xsl:attribute>
2379
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2380
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
2381
+
2382
+
2383
+
2384
+
2385
+
2386
+
2387
+
2388
+
3062
2389
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
3063
2390
 
3064
-
2391
+
3065
2392
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3066
2393
  <xsl:attribute name="margin-top">5pt</xsl:attribute>
3067
2394
  <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
@@ -3074,6 +2401,179 @@
3074
2401
  <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
3075
2402
 
3076
2403
 
2404
+ </xsl:attribute-set><xsl:attribute-set name="xref-style">
2405
+
2406
+
2407
+ </xsl:attribute-set><xsl:attribute-set name="eref-style">
2408
+
2409
+
2410
+
2411
+ </xsl:attribute-set><xsl:attribute-set name="note-style">
2412
+
2413
+
2414
+
2415
+
2416
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
2417
+ <xsl:attribute name="margin-top">5pt</xsl:attribute>
2418
+ <xsl:attribute name="margin-bottom">9pt</xsl:attribute>
2419
+
2420
+
2421
+
2422
+
2423
+
2424
+
2425
+
2426
+
2427
+
2428
+
2429
+
2430
+
2431
+ </xsl:attribute-set><xsl:attribute-set name="note-name-style">
2432
+
2433
+
2434
+
2435
+
2436
+ <xsl:attribute name="padding-right">6mm</xsl:attribute>
2437
+
2438
+
2439
+
2440
+
2441
+
2442
+
2443
+
2444
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
2445
+
2446
+
2447
+
2448
+
2449
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
2450
+ <xsl:attribute name="margin-top">5pt</xsl:attribute>
2451
+
2452
+
2453
+
2454
+
2455
+
2456
+
2457
+
2458
+
2459
+
2460
+
2461
+ </xsl:attribute-set><xsl:attribute-set name="termnote-style">
2462
+
2463
+
2464
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
2465
+ <xsl:attribute name="margin-top">5pt</xsl:attribute>
2466
+ <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
2467
+
2468
+
2469
+
2470
+
2471
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
2472
+
2473
+
2474
+
2475
+ <xsl:attribute name="margin-top">5pt</xsl:attribute>
2476
+ <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
2477
+ <xsl:attribute name="margin-left">12mm</xsl:attribute>
2478
+ <xsl:attribute name="margin-right">12mm</xsl:attribute>
2479
+
2480
+
2481
+
2482
+
2483
+ </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
2484
+
2485
+
2486
+
2487
+ <xsl:attribute name="text-align">right</xsl:attribute>
2488
+ <xsl:attribute name="margin-top">15pt</xsl:attribute>
2489
+ <xsl:attribute name="margin-left">12mm</xsl:attribute>
2490
+ <xsl:attribute name="margin-right">12mm</xsl:attribute>
2491
+
2492
+ </xsl:attribute-set><xsl:attribute-set name="termsource-style">
2493
+
2494
+
2495
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2496
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2497
+
2498
+
2499
+
2500
+
2501
+ </xsl:attribute-set><xsl:attribute-set name="origin-style">
2502
+
2503
+
2504
+ </xsl:attribute-set><xsl:attribute-set name="term-style">
2505
+
2506
+ </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
2507
+
2508
+
2509
+
2510
+
2511
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2512
+ <xsl:attribute name="text-align">center</xsl:attribute>
2513
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2514
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2515
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2516
+
2517
+
2518
+
2519
+
2520
+
2521
+
2522
+
2523
+
2524
+
2525
+
2526
+
2527
+
2528
+
2529
+ </xsl:attribute-set><xsl:attribute-set name="formula-style">
2530
+
2531
+ </xsl:attribute-set><xsl:attribute-set name="image-style">
2532
+ <xsl:attribute name="text-align">center</xsl:attribute>
2533
+
2534
+
2535
+
2536
+
2537
+
2538
+ </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
2539
+
2540
+ </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
2541
+
2542
+
2543
+
2544
+ <xsl:attribute name="width">75%</xsl:attribute>
2545
+ <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
2546
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
2547
+
2548
+
2549
+
2550
+ </xsl:attribute-set><xsl:attribute-set name="tt-style">
2551
+
2552
+
2553
+ <xsl:attribute name="font-family">Courier</xsl:attribute>
2554
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2555
+
2556
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
2557
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
2558
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2559
+ <xsl:attribute name="text-align">center</xsl:attribute>
2560
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2561
+ </xsl:attribute-set><xsl:attribute-set name="domain-style">
2562
+
2563
+ </xsl:attribute-set><xsl:attribute-set name="admitted-style">
2564
+
2565
+
2566
+ </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
2567
+
2568
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
2569
+ <xsl:attribute name="margin-top">5pt</xsl:attribute>
2570
+ <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
2571
+
2572
+ </xsl:attribute-set><xsl:attribute-set name="definition-style">
2573
+
2574
+
2575
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2576
+
3077
2577
  </xsl:attribute-set><xsl:template match="text()">
3078
2578
  <xsl:value-of select="."/>
3079
2579
  </xsl:template><xsl:template match="*[local-name()='br']">
@@ -3083,75 +2583,21 @@
3083
2583
  <xsl:call-template name="add-zero-spaces-java"/>
3084
2584
  </xsl:template><xsl:template match="*[local-name()='table']">
3085
2585
 
3086
- <xsl:variable name="simple-table">
3087
- <!-- <xsl:copy> -->
3088
- <xsl:call-template name="getSimpleTable"/>
3089
- <!-- </xsl:copy> -->
2586
+ <xsl:variable name="simple-table">
2587
+ <xsl:call-template name="getSimpleTable"/>
3090
2588
  </xsl:variable>
3091
2589
 
3092
- <!-- DEBUG -->
3093
- <!-- SourceTable=<xsl:copy-of select="current()"/>EndSourceTable -->
3094
- <!-- Simpletable=<xsl:copy-of select="$simple-table"/>EndSimpltable -->
3095
-
3096
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
3097
2590
 
3098
- <!-- <xsl:if test="$namespace = 'iso'">
3099
- <fo:block space-before="6pt">&#xA0;</fo:block>
3100
- </xsl:if> -->
3101
2591
 
3102
- <xsl:if test="not(ancestor::*[local-name() = 'preface'])">
3103
- <!-- <fo:block space-before="2pt">&#xA0;</fo:block> -->
3104
- </xsl:if>
3105
2592
 
3106
- <xsl:choose>
3107
- <xsl:when test="@unnumbered = 'true'"/>
3108
- <xsl:otherwise>
3109
-
3110
-
3111
-
3112
- <fo:block font-weight="bold" text-align="center" margin-bottom="6pt" keep-with-next="always">
3113
-
3114
-
3115
- <xsl:if test="ancestor::*[local-name() = 'preface']">
3116
- <xsl:attribute name="visibility">hidden</xsl:attribute>
3117
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3118
- <xsl:attribute name="font-size">1pt</xsl:attribute>
3119
- </xsl:if>
3120
- <xsl:if test="not(ancestor::*[local-name() = 'preface'])">
3121
- <xsl:attribute name="space-before">12pt</xsl:attribute>
3122
- </xsl:if>
3123
-
3124
-
3125
-
3126
-
3127
-
3128
-
3129
-
3130
- <xsl:variable name="title-table">
3131
- <xsl:call-template name="getTitle">
3132
- <xsl:with-param name="name" select="'title-table'"/>
3133
- </xsl:call-template>
3134
- </xsl:variable>
3135
- <xsl:value-of select="$title-table"/>
3136
-
3137
- <xsl:call-template name="getTableNumber"/>
3138
-
3139
-
3140
- <xsl:if test="*[local-name()='name']">
3141
-
3142
-
3143
-
3144
- <xsl:text> — </xsl:text>
3145
-
3146
- <xsl:apply-templates select="*[local-name()='name']" mode="process"/>
3147
- </xsl:if>
3148
- </fo:block>
3149
-
3150
-
3151
- <xsl:call-template name="fn_name_display"/>
2593
+
2594
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2595
+
3152
2596
 
3153
- </xsl:otherwise>
3154
- </xsl:choose>
2597
+
2598
+ <xsl:call-template name="fn_name_display"/>
2599
+
2600
+
3155
2601
 
3156
2602
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
3157
2603
 
@@ -3253,33 +2699,15 @@
3253
2699
 
3254
2700
 
3255
2701
 
2702
+
2703
+
3256
2704
  </fo:block-container>
3257
- </xsl:template><xsl:template name="getTableNumber">
3258
- <xsl:choose>
3259
- <xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
3260
- <xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/>
3261
- </xsl:when>
3262
- <xsl:when test="ancestor::*[local-name()='annex']">
3263
-
3264
-
3265
-
3266
- <xsl:number format="A." count="*[local-name()='annex']"/><xsl:number format="1"/>
3267
-
3268
-
3269
-
3270
-
3271
-
3272
-
3273
- </xsl:when>
3274
- <xsl:otherwise>
3275
-
3276
- <xsl:number format="1" level="any" count="//*[local-name()='table'] [not(ancestor::*[local-name()='annex']) and not(ancestor::*[local-name()='executivesummary']) and not(ancestor::*[local-name()='bibdata']) and not(ancestor::*[local-name()='preface'])] [not(@unnumbered) or @unnumbered != 'true']"/>
3277
-
3278
-
3279
- </xsl:otherwise>
3280
- </xsl:choose>
3281
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']"/><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="process">
3282
- <xsl:apply-templates/>
2705
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
2706
+ <xsl:if test="normalize-space() != ''">
2707
+ <fo:block xsl:use-attribute-sets="table-name-style">
2708
+ <xsl:apply-templates/>
2709
+ </fo:block>
2710
+ </xsl:if>
3283
2711
  </xsl:template><xsl:template name="calculate-columns-numbers">
3284
2712
  <xsl:param name="table-row"/>
3285
2713
  <xsl:variable name="columns-count" select="count($table-row/*)"/>
@@ -3530,6 +2958,7 @@
3530
2958
 
3531
2959
 
3532
2960
 
2961
+
3533
2962
  <xsl:if test="@colspan">
3534
2963
  <xsl:attribute name="number-columns-spanned">
3535
2964
  <xsl:value-of select="@colspan"/>
@@ -3555,8 +2984,7 @@
3555
2984
  <xsl:attribute name="border">solid black 0</xsl:attribute>
3556
2985
  </xsl:if>
3557
2986
 
3558
-
3559
-
2987
+
3560
2988
 
3561
2989
  <xsl:attribute name="border">solid black 0.5pt</xsl:attribute>
3562
2990
  <xsl:if test="ancestor::*[local-name()='preface']">
@@ -3566,6 +2994,7 @@
3566
2994
 
3567
2995
 
3568
2996
 
2997
+
3569
2998
  <xsl:if test="@colspan">
3570
2999
  <xsl:attribute name="number-columns-spanned">
3571
3000
  <xsl:value-of select="@colspan"/>
@@ -3579,21 +3008,9 @@
3579
3008
  <fo:block>
3580
3009
 
3581
3010
  <xsl:apply-templates/>
3582
- </fo:block>
3583
- <!-- <xsl:choose>
3584
- <xsl:when test="count(*) = 1 and *[local-name() = 'p']">
3585
- <xsl:apply-templates />
3586
- </xsl:when>
3587
- <xsl:otherwise>
3588
- <fo:block>
3589
- <xsl:apply-templates />
3590
- </fo:block>
3591
- </xsl:otherwise>
3592
- </xsl:choose> -->
3593
-
3594
-
3011
+ </fo:block>
3595
3012
  </fo:table-cell>
3596
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
3013
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
3597
3014
 
3598
3015
 
3599
3016
  <fo:block font-size="10pt" margin-bottom="12pt">
@@ -3608,26 +3025,14 @@
3608
3025
 
3609
3026
 
3610
3027
 
3611
- <xsl:variable name="title-note">
3612
- <xsl:call-template name="getTitle">
3613
- <xsl:with-param name="name" select="'title-note'"/>
3614
- </xsl:call-template>
3615
- </xsl:variable>
3616
- <xsl:value-of select="$title-note"/>
3617
-
3618
- <xsl:variable name="id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
3619
- <xsl:if test="count(//*[local-name()='note'][ancestor::*[@id = $id]]) &gt; 1">
3620
- <xsl:number count="*[local-name()='note'][ancestor::*[@id = $id]]" level="any"/>
3621
- </xsl:if>
3028
+
3029
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3622
3030
 
3623
-
3624
-
3625
-
3626
3031
  </fo:inline>
3627
3032
  <xsl:apply-templates mode="process"/>
3628
3033
  </fo:block>
3629
3034
 
3630
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
3035
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
3631
3036
  <xsl:apply-templates/>
3632
3037
  </xsl:template><xsl:template name="fn_display">
3633
3038
  <xsl:variable name="references">
@@ -3693,7 +3098,7 @@
3693
3098
  true <!-- and (not(@class) or @class !='pseudocode') -->
3694
3099
  </xsl:variable>
3695
3100
  <xsl:variable name="references">
3696
- <xsl:for-each select=".//*[local-name()='fn']">
3101
+ <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
3697
3102
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
3698
3103
  <xsl:apply-templates/>
3699
3104
  </fn>
@@ -3991,7 +3396,7 @@
3991
3396
  <xsl:value-of select="string-length(normalize-space(.))"/>
3992
3397
  </xsl:if>
3993
3398
  </xsl:for-each>
3994
- </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']">
3399
+ </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
3995
3400
  <xsl:param name="key_iso"/>
3996
3401
 
3997
3402
  <!-- <tr>
@@ -4005,14 +3410,9 @@
4005
3410
  <fo:table-cell>
4006
3411
  <fo:block margin-top="6pt">
4007
3412
  <xsl:if test="normalize-space($key_iso) = 'true'">
4008
- <xsl:attribute name="margin-top">0</xsl:attribute>
4009
- </xsl:if>
4010
- <xsl:variable name="title-note">
4011
- <xsl:call-template name="getTitle">
4012
- <xsl:with-param name="name" select="'title-note'"/>
4013
- </xsl:call-template>
4014
- </xsl:variable>
4015
- <xsl:value-of select="$title-note"/>
3413
+ <xsl:attribute name="margin-top">0</xsl:attribute>
3414
+ </xsl:if>
3415
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4016
3416
  </fo:block>
4017
3417
  </fo:table-cell>
4018
3418
  <fo:table-cell>
@@ -4085,7 +3485,7 @@
4085
3485
  <fo:inline font-style="italic">
4086
3486
  <xsl:apply-templates/>
4087
3487
  </fo:inline>
4088
- </xsl:template><xsl:template match="*[local-name()='strong']">
3488
+ </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
4089
3489
  <fo:inline font-weight="bold">
4090
3490
  <xsl:apply-templates/>
4091
3491
  </fo:inline>
@@ -4098,7 +3498,7 @@
4098
3498
  <xsl:apply-templates/>
4099
3499
  </fo:inline>
4100
3500
  </xsl:template><xsl:template match="*[local-name()='tt']">
4101
- <fo:inline font-family="Courier" font-size="10pt">
3501
+ <fo:inline xsl:use-attribute-sets="tt-style">
4102
3502
  <xsl:apply-templates/>
4103
3503
  </fo:inline>
4104
3504
  </xsl:template><xsl:template match="*[local-name()='del']">
@@ -4429,117 +3829,727 @@
4429
3829
  <xsl:copy-of select="."/>
4430
3830
  </fo:instream-foreign-object>
4431
3831
  </fo:inline>
4432
- </xsl:template><xsl:template match="*[local-name()='localityStack']">
4433
- <xsl:for-each select="*[local-name()='locality']">
4434
- <xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
4435
- <xsl:apply-templates select="."/>
4436
- <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
4437
- </xsl:for-each>
4438
- </xsl:template><xsl:template match="*[local-name()='link']" name="link">
3832
+ </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
4439
3833
  <xsl:variable name="target">
4440
3834
  <xsl:choose>
4441
- <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
4442
- <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
3835
+ <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3836
+ <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
3837
+ </xsl:when>
3838
+ <xsl:otherwise>
3839
+ <xsl:value-of select="normalize-space(@target)"/>
3840
+ </xsl:otherwise>
3841
+ </xsl:choose>
3842
+ </xsl:variable>
3843
+ <fo:inline xsl:use-attribute-sets="link-style">
3844
+ <xsl:choose>
3845
+ <xsl:when test="$target = ''">
3846
+ <xsl:apply-templates/>
3847
+ </xsl:when>
3848
+ <xsl:otherwise>
3849
+ <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3850
+ <xsl:choose>
3851
+ <xsl:when test="normalize-space(.) = ''">
3852
+ <xsl:value-of select="$target"/>
3853
+ </xsl:when>
3854
+ <xsl:otherwise>
3855
+ <xsl:apply-templates/>
3856
+ </xsl:otherwise>
3857
+ </xsl:choose>
3858
+ </fo:basic-link>
3859
+ </xsl:otherwise>
3860
+ </xsl:choose>
3861
+ </fo:inline>
3862
+ </xsl:template><xsl:template match="*[local-name()='bookmark']">
3863
+ <fo:inline id="{@id}"/>
3864
+ </xsl:template><xsl:template match="*[local-name()='appendix']">
3865
+ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
3866
+ <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
3867
+ </fo:block>
3868
+ <xsl:apply-templates/>
3869
+ </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
3870
+ <fo:inline><xsl:apply-templates/></fo:inline>
3871
+ </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
3872
+ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
3873
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3874
+ </fo:block>
3875
+ <xsl:apply-templates/>
3876
+ </xsl:template><xsl:template match="*[local-name() = 'callout']">
3877
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
3878
+ </xsl:template><xsl:template match="*[local-name() = 'annotation']">
3879
+ <xsl:variable name="annotation-id" select="@id"/>
3880
+ <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
3881
+ <fo:block id="{$annotation-id}" white-space="nowrap">
3882
+ <fo:inline>
3883
+ <xsl:apply-templates>
3884
+ <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
3885
+ </xsl:apply-templates>
3886
+ </fo:inline>
3887
+ </fo:block>
3888
+ </xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
3889
+ <xsl:param name="callout"/>
3890
+ <fo:inline id="{@id}">
3891
+ <!-- for first p in annotation, put <x> -->
3892
+ <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
3893
+ <xsl:apply-templates/>
3894
+ </fo:inline>
3895
+ </xsl:template><xsl:template match="*[local-name() = 'modification']">
3896
+ <xsl:variable name="title-modified">
3897
+ <xsl:call-template name="getTitle">
3898
+ <xsl:with-param name="name" select="'title-modified'"/>
3899
+ </xsl:call-template>
3900
+ </xsl:variable>
3901
+ <xsl:choose>
3902
+ <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
3903
+ <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
3904
+ </xsl:choose>
3905
+ <xsl:apply-templates/>
3906
+ </xsl:template><xsl:template match="*[local-name() = 'xref']">
3907
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
3908
+
3909
+ <xsl:apply-templates/>
3910
+ </fo:basic-link>
3911
+ </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
3912
+ <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
3913
+ <xsl:apply-templates/>
3914
+ </fo:block>
3915
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
3916
+ <fo:inline>
3917
+ <xsl:apply-templates/>
3918
+ </fo:inline>
3919
+ </xsl:template><xsl:template match="*[local-name() = 'admitted']/*[local-name() = 'stem']">
3920
+ <fo:inline>
3921
+ <xsl:apply-templates/>
3922
+ </fo:inline>
3923
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
3924
+ <xsl:if test="normalize-space() != ''">
3925
+ <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
3926
+ </xsl:if>
3927
+ </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
3928
+
3929
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
3930
+
3931
+
3932
+
3933
+
3934
+ <fo:block-container margin-left="0mm">
3935
+
3936
+
3937
+
3938
+
3939
+
3940
+
3941
+
3942
+
3943
+ <fo:block>
3944
+
3945
+
3946
+
3947
+
3948
+ <fo:inline xsl:use-attribute-sets="note-name-style">
3949
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3950
+ </fo:inline>
3951
+ <xsl:apply-templates/>
3952
+ </fo:block>
3953
+
3954
+
3955
+ </fo:block-container>
3956
+ </fo:block-container>
3957
+
3958
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
3959
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
3960
+ <xsl:choose>
3961
+ <xsl:when test="$num = 1">
3962
+ <fo:inline xsl:use-attribute-sets="note-p-style">
3963
+ <xsl:apply-templates/>
3964
+ </fo:inline>
3965
+ </xsl:when>
3966
+ <xsl:otherwise>
3967
+ <fo:block xsl:use-attribute-sets="note-p-style">
3968
+ <xsl:apply-templates/>
3969
+ </fo:block>
3970
+ </xsl:otherwise>
3971
+ </xsl:choose>
3972
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']">
3973
+ <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3974
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3975
+ <xsl:apply-templates/>
3976
+ </fo:block>
3977
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
3978
+ <xsl:param name="sfx"/>
3979
+ <xsl:variable name="suffix">
3980
+ <xsl:choose>
3981
+ <xsl:when test="$sfx != ''">
3982
+ <xsl:value-of select="$sfx"/>
3983
+ </xsl:when>
3984
+ <xsl:otherwise>
3985
+
3986
+
3987
+ </xsl:otherwise>
3988
+ </xsl:choose>
3989
+ </xsl:variable>
3990
+ <xsl:if test="normalize-space() != ''">
3991
+ <xsl:apply-templates/>
3992
+ <xsl:value-of select="$suffix"/>
3993
+ </xsl:if>
3994
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
3995
+ <xsl:param name="sfx"/>
3996
+ <xsl:variable name="suffix">
3997
+ <xsl:choose>
3998
+ <xsl:when test="$sfx != ''">
3999
+ <xsl:value-of select="$sfx"/>
4000
+ </xsl:when>
4001
+ <xsl:otherwise>
4002
+
4003
+ <xsl:text>:</xsl:text>
4004
+
4005
+
4006
+ </xsl:otherwise>
4007
+ </xsl:choose>
4008
+ </xsl:variable>
4009
+ <xsl:if test="normalize-space() != ''">
4010
+ <xsl:apply-templates/>
4011
+ <xsl:value-of select="$suffix"/>
4012
+ </xsl:if>
4013
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
4014
+ <fo:inline><xsl:apply-templates/></fo:inline>
4015
+ </xsl:template><xsl:template match="*[local-name() = 'terms']">
4016
+ <fo:block id="{@id}">
4017
+ <xsl:apply-templates/>
4018
+ </fo:block>
4019
+ </xsl:template><xsl:template match="*[local-name() = 'term']">
4020
+ <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
4021
+
4022
+
4023
+
4024
+ <xsl:apply-templates/>
4025
+ </fo:block>
4026
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
4027
+ <xsl:if test="normalize-space() != ''">
4028
+ <fo:inline>
4029
+ <xsl:apply-templates/>
4030
+ <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
4031
+ <xsl:text>.</xsl:text>
4032
+ </xsl:if> -->
4033
+ </fo:inline>
4034
+ </xsl:if>
4035
+ </xsl:template><xsl:template match="*[local-name() = 'figure']">
4036
+ <fo:block-container id="{@id}">
4037
+ <fo:block>
4038
+ <xsl:apply-templates/>
4039
+ </fo:block>
4040
+ <xsl:call-template name="fn_display_figure"/>
4041
+ <xsl:for-each select="*[local-name() = 'note']">
4042
+ <xsl:call-template name="note"/>
4043
+ </xsl:for-each>
4044
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4045
+ </fo:block-container>
4046
+ </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
4047
+ <fo:block id="{@id}">
4048
+ <xsl:apply-templates/>
4049
+ </fo:block>
4050
+ </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
4051
+ <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
4052
+ <xsl:apply-templates/>
4053
+ </fo:block>
4054
+ </xsl:template><xsl:template match="*[local-name() = 'image']">
4055
+ <fo:block xsl:use-attribute-sets="image-style">
4056
+
4057
+
4058
+ <xsl:variable name="src">
4059
+ <xsl:choose>
4060
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
4061
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
4062
+ </xsl:when>
4063
+ <xsl:otherwise>
4064
+ <xsl:value-of select="@src"/>
4065
+ </xsl:otherwise>
4066
+ </xsl:choose>
4067
+ </xsl:variable>
4068
+
4069
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
4070
+ </fo:block>
4071
+ </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">
4072
+ <xsl:apply-templates mode="contents"/>
4073
+ <xsl:text> </xsl:text>
4074
+ </xsl:template><xsl:template match="text()" mode="contents">
4075
+ <xsl:value-of select="."/>
4076
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
4077
+ <xsl:if test="normalize-space() != ''">
4078
+ <fo:block xsl:use-attribute-sets="figure-name-style">
4079
+
4080
+ <xsl:apply-templates/>
4081
+ </fo:block>
4082
+ </xsl:if>
4083
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item">
4084
+ <xsl:apply-templates mode="contents_item"/>
4085
+ <!-- <xsl:text> </xsl:text> -->
4086
+ </xsl:template><xsl:template name="getSection">
4087
+ <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4088
+ </xsl:template><xsl:template name="getName">
4089
+ <xsl:choose>
4090
+ <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
4091
+ <xsl:copy-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/following-sibling::node()"/>
4092
+ </xsl:when>
4093
+ <xsl:otherwise>
4094
+ <xsl:copy-of select="*[local-name() = 'title']/node()"/>
4095
+ </xsl:otherwise>
4096
+ </xsl:choose>
4097
+ </xsl:template><xsl:template name="insertTitleAsListItem">
4098
+ <xsl:param name="provisional-distance-between-starts" select="'9.5mm'"/>
4099
+ <xsl:variable name="section">
4100
+ <xsl:for-each select="..">
4101
+ <xsl:call-template name="getSection"/>
4102
+ </xsl:for-each>
4103
+ </xsl:variable>
4104
+ <fo:list-block provisional-distance-between-starts="{$provisional-distance-between-starts}">
4105
+ <fo:list-item>
4106
+ <fo:list-item-label end-indent="label-end()">
4107
+ <fo:block>
4108
+ <xsl:value-of select="$section"/>
4109
+ </fo:block>
4110
+ </fo:list-item-label>
4111
+ <fo:list-item-body start-indent="body-start()">
4112
+ <fo:block>
4113
+ <xsl:choose>
4114
+ <xsl:when test="*[local-name() = 'tab']">
4115
+ <xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
4116
+ </xsl:when>
4117
+ <xsl:otherwise>
4118
+ <xsl:apply-templates/>
4119
+ </xsl:otherwise>
4120
+ </xsl:choose>
4121
+ </fo:block>
4122
+ </fo:list-item-body>
4123
+ </fo:list-item>
4124
+ </fo:list-block>
4125
+ </xsl:template><xsl:template name="extractTitle">
4126
+ <xsl:choose>
4127
+ <xsl:when test="*[local-name() = 'tab']">
4128
+ <xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
4129
+ </xsl:when>
4130
+ <xsl:otherwise>
4131
+ <xsl:apply-templates/>
4132
+ </xsl:otherwise>
4133
+ </xsl:choose>
4134
+ </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
4135
+ <xsl:text> </xsl:text>
4136
+ </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
4137
+ <xsl:copy>
4138
+ <xsl:apply-templates mode="contents_item"/>
4139
+ </xsl:copy>
4140
+ </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
4141
+ <xsl:text> </xsl:text>
4142
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
4143
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
4144
+ <xsl:apply-templates/>
4145
+ </fo:block>
4146
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4147
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()">
4148
+ <xsl:variable name="text">
4149
+ <xsl:call-template name="add-zero-spaces-equal"/>
4150
+ </xsl:variable>
4151
+ <xsl:call-template name="add-zero-spaces">
4152
+ <xsl:with-param name="text" select="$text"/>
4153
+ </xsl:call-template>
4154
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
4155
+ <xsl:if test="normalize-space() != ''">
4156
+ <fo:block xsl:use-attribute-sets="sourcecode-name-style">
4157
+
4158
+ <xsl:apply-templates/>
4159
+ </fo:block>
4160
+ </xsl:if>
4161
+ </xsl:template><xsl:template match="*[local-name() = 'permission']">
4162
+ <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
4163
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4164
+ <xsl:apply-templates/>
4165
+ </fo:block>
4166
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
4167
+ <xsl:if test="normalize-space() != ''">
4168
+ <fo:block xsl:use-attribute-sets="permission-name-style">
4169
+ <xsl:apply-templates/>
4170
+
4171
+ </fo:block>
4172
+ </xsl:if>
4173
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'label']">
4174
+ <fo:block xsl:use-attribute-sets="permission-label-style">
4175
+ <xsl:apply-templates/>
4176
+ </fo:block>
4177
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']">
4178
+ <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
4179
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4180
+ <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
4181
+ <xsl:apply-templates select="@obligation" mode="presentation"/>
4182
+ <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
4183
+ <xsl:apply-templates/>
4184
+ </fo:block>
4185
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
4186
+ <xsl:if test="normalize-space() != ''">
4187
+ <fo:block xsl:use-attribute-sets="requirement-name-style">
4188
+
4189
+ <xsl:apply-templates/>
4190
+
4191
+ </fo:block>
4192
+ </xsl:if>
4193
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
4194
+ <fo:block xsl:use-attribute-sets="requirement-label-style">
4195
+ <xsl:apply-templates/>
4196
+ </fo:block>
4197
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
4198
+ <fo:block>
4199
+ <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
4200
+ </fo:block>
4201
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
4202
+ <fo:block xsl:use-attribute-sets="requirement-subject-style">
4203
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4204
+ </fo:block>
4205
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
4206
+ <fo:block xsl:use-attribute-sets="requirement-inherit-style">
4207
+ <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
4208
+ </fo:block>
4209
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
4210
+ <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
4211
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4212
+ <xsl:apply-templates/>
4213
+ </fo:block>
4214
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
4215
+ <xsl:if test="normalize-space() != ''">
4216
+ <fo:block xsl:use-attribute-sets="recommendation-name-style">
4217
+ <xsl:apply-templates/>
4218
+
4219
+ </fo:block>
4220
+ </xsl:if>
4221
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']">
4222
+ <fo:block xsl:use-attribute-sets="recommendation-label-style">
4223
+ <xsl:apply-templates/>
4224
+ </fo:block>
4225
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']">
4226
+ <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
4227
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4228
+ <xsl:apply-templates/>
4229
+ </fo:block>
4230
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
4231
+ <xsl:if test="normalize-space() != ''">
4232
+ <fo:inline xsl:use-attribute-sets="termexample-name-style">
4233
+ <xsl:apply-templates/>
4234
+ </fo:inline>
4235
+ </xsl:if>
4236
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
4237
+ <fo:inline><xsl:apply-templates/></fo:inline>
4238
+ </xsl:template><xsl:template match="*[local-name() = 'example']">
4239
+ <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4240
+
4241
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4242
+
4243
+ <xsl:variable name="element">
4244
+
4245
+ inline
4246
+ </xsl:variable>
4247
+
4248
+ <xsl:choose>
4249
+ <xsl:when test="normalize-space($element) = 'block'">
4250
+ <fo:block xsl:use-attribute-sets="example-body-style">
4251
+ <xsl:apply-templates/>
4252
+ </fo:block>
4443
4253
  </xsl:when>
4444
4254
  <xsl:otherwise>
4445
- <xsl:value-of select="normalize-space(@target)"/>
4255
+ <fo:inline>
4256
+ <xsl:apply-templates/>
4257
+ </fo:inline>
4446
4258
  </xsl:otherwise>
4447
4259
  </xsl:choose>
4448
- </xsl:variable>
4449
- <fo:inline xsl:use-attribute-sets="link-style">
4260
+
4261
+ </fo:block>
4262
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
4263
+
4264
+ <xsl:variable name="element">
4265
+
4266
+ inline
4267
+ </xsl:variable>
4268
+ <xsl:choose>
4269
+ <xsl:when test="ancestor::*[local-name() = 'appendix']">
4270
+ <fo:inline>
4271
+ <xsl:apply-templates/>
4272
+ </fo:inline>
4273
+ </xsl:when>
4274
+ <xsl:when test="normalize-space($element) = 'block'">
4275
+ <fo:block xsl:use-attribute-sets="example-name-style">
4276
+ <xsl:apply-templates/>
4277
+ </fo:block>
4278
+ </xsl:when>
4279
+ <xsl:otherwise>
4280
+ <fo:inline xsl:use-attribute-sets="example-name-style">
4281
+ <xsl:apply-templates/>
4282
+ </fo:inline>
4283
+ </xsl:otherwise>
4284
+ </xsl:choose>
4285
+
4286
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
4287
+ <fo:block xsl:use-attribute-sets="example-p-style">
4288
+
4289
+ <xsl:apply-templates/>
4290
+ </fo:block>
4291
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']">
4292
+ <fo:block xsl:use-attribute-sets="termsource-style">
4293
+ <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
4294
+ <xsl:variable name="termsource_text">
4295
+ <xsl:apply-templates/>
4296
+ </xsl:variable>
4450
4297
  <xsl:choose>
4451
- <xsl:when test="$target = ''">
4298
+ <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
4452
4299
  <xsl:apply-templates/>
4453
4300
  </xsl:when>
4454
4301
  <xsl:otherwise>
4455
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
4456
- <xsl:choose>
4457
- <xsl:when test="normalize-space(.) = ''">
4458
- <xsl:value-of select="$target"/>
4459
- </xsl:when>
4460
- <xsl:otherwise>
4461
- <xsl:apply-templates/>
4462
- </xsl:otherwise>
4463
- </xsl:choose>
4464
- </fo:basic-link>
4302
+ <xsl:text>[</xsl:text>
4303
+ <xsl:apply-templates/>
4304
+ <xsl:text>]</xsl:text>
4465
4305
  </xsl:otherwise>
4466
4306
  </xsl:choose>
4467
- </fo:inline>
4468
- </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
4469
- <fo:block xsl:use-attribute-sets="sourcecode-style">
4470
- <!-- <xsl:choose>
4471
- <xsl:when test="@lang = 'en'"></xsl:when>
4472
- <xsl:otherwise> -->
4473
- <xsl:attribute name="white-space">pre</xsl:attribute>
4474
- <xsl:attribute name="wrap-option">wrap</xsl:attribute>
4475
- <!-- </xsl:otherwise>
4476
- </xsl:choose> -->
4477
- <xsl:apply-templates/>
4478
4307
  </fo:block>
4479
- </xsl:template><xsl:template match="*[local-name()='bookmark']">
4480
- <fo:inline id="{@id}"/>
4481
- </xsl:template><xsl:template match="*[local-name()='appendix']">
4482
- <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
4483
- <xsl:variable name="title-appendix">
4308
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
4309
+ <xsl:if test="normalize-space() != ''">
4310
+ <xsl:value-of select="."/>
4311
+ </xsl:if>
4312
+ </xsl:template><xsl:template match="*[local-name() = 'origin']">
4313
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4314
+
4484
4315
  <xsl:call-template name="getTitle">
4485
- <xsl:with-param name="name" select="'title-appendix'"/>
4316
+ <xsl:with-param name="name" select="'title-source'"/>
4486
4317
  </xsl:call-template>
4487
- </xsl:variable>
4488
- <fo:inline padding-right="5mm"><xsl:value-of select="$title-appendix"/> <xsl:number/></fo:inline>
4489
- <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
4490
- </fo:block>
4491
- <xsl:apply-templates/>
4492
- </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
4318
+ <xsl:text>: </xsl:text>
4319
+
4320
+ <fo:inline xsl:use-attribute-sets="origin-style">
4321
+ <xsl:apply-templates/>
4322
+ </fo:inline>
4323
+ </fo:basic-link>
4324
+ </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
4493
4325
  <fo:inline><xsl:apply-templates/></fo:inline>
4494
- </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']">
4495
- <fo:block xsl:use-attribute-sets="appendix-example-style">
4496
- <xsl:variable name="claims_id" select="ancestor::*[local-name()='clause'][1]/@id"/>
4497
- <xsl:variable name="title-example">
4498
- <xsl:call-template name="getTitle">
4499
- <xsl:with-param name="name" select="'title-example'"/>
4500
- </xsl:call-template>
4501
- </xsl:variable>
4502
- <xsl:value-of select="$title-example"/>
4503
- <xsl:if test="count(ancestor::*[local-name()='clause'][1]//*[local-name()='example']) &gt; 1">
4504
- <xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
4505
- </xsl:if>
4506
- <xsl:if test="*[local-name()='name']">
4507
- <xsl:text>— </xsl:text><xsl:apply-templates select="*[local-name()='name']" mode="process"/>
4508
- </xsl:if>
4326
+ </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
4327
+ <xsl:if test="normalize-space() != ''">
4328
+ <xsl:value-of select="."/>
4329
+ </xsl:if>
4330
+ </xsl:template><xsl:template match="*[local-name() = 'quote']">
4331
+
4332
+ <fo:block xsl:use-attribute-sets="quote-style">
4333
+ <xsl:apply-templates select=".//*[local-name() = 'p']"/>
4509
4334
  </fo:block>
4510
- <xsl:apply-templates/>
4511
- </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']"/><xsl:template match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']" mode="process">
4512
- <fo:inline><xsl:apply-templates/></fo:inline>
4513
- </xsl:template><xsl:template match="*[local-name() = 'callout']">
4514
- <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
4515
- </xsl:template><xsl:template match="*[local-name() = 'annotation']">
4516
- <xsl:variable name="annotation-id" select="@id"/>
4517
- <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
4518
- <fo:block id="{$annotation-id}" white-space="nowrap">
4519
- <fo:inline>
4520
- <xsl:apply-templates>
4521
- <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
4522
- </xsl:apply-templates>
4523
- </fo:inline>
4524
- </fo:block>
4525
- </xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
4526
- <xsl:param name="callout"/>
4527
- <fo:inline id="{@id}">
4528
- <!-- for first p in annotation, put <x> -->
4529
- <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
4335
+ <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
4336
+ <fo:block xsl:use-attribute-sets="quote-source-style">
4337
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
4338
+ <xsl:apply-templates select="*[local-name() = 'author']"/>
4339
+ <xsl:apply-templates select="*[local-name() = 'source']"/>
4340
+ </fo:block>
4341
+ </xsl:if>
4342
+ </xsl:template><xsl:template match="*[local-name() = 'source']">
4343
+ <xsl:if test="../*[local-name() = 'author']">
4344
+ <xsl:text>, </xsl:text>
4345
+ </xsl:if>
4346
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4530
4347
  <xsl:apply-templates/>
4531
- </fo:inline>
4532
- </xsl:template><xsl:template match="*[local-name() = 'modification']">
4533
- <xsl:variable name="title-modified">
4534
- <xsl:call-template name="getTitle">
4535
- <xsl:with-param name="name" select="'title-modified'"/>
4348
+ </fo:basic-link>
4349
+ </xsl:template><xsl:template match="*[local-name() = 'author']">
4350
+ <xsl:text>— </xsl:text>
4351
+ <xsl:apply-templates/>
4352
+ </xsl:template><xsl:template match="*[local-name() = 'eref']">
4353
+ <fo:inline xsl:use-attribute-sets="eref-style">
4354
+ <xsl:if test="@type = 'footnote'">
4355
+
4356
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
4357
+ <xsl:attribute name="font-size">80%</xsl:attribute>
4358
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4359
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
4360
+
4361
+
4362
+ </xsl:if>
4363
+
4364
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4365
+
4366
+ <xsl:if test="@type = 'inline'">
4367
+
4368
+
4369
+ </xsl:if>
4370
+
4371
+
4372
+ <xsl:apply-templates/>
4373
+ </fo:basic-link>
4374
+ </fo:inline>
4375
+ </xsl:template><xsl:template match="*[local-name() = 'tab']">
4376
+ <!-- zero-space char -->
4377
+ <xsl:variable name="depth">
4378
+ <xsl:call-template name="getLevel">
4379
+ <xsl:with-param name="depth" select="../@depth"/>
4536
4380
  </xsl:call-template>
4537
4381
  </xsl:variable>
4382
+
4383
+ <xsl:variable name="padding">
4384
+
4385
+
4386
+
4387
+
4388
+ <xsl:choose>
4389
+ <xsl:when test="parent::iec:appendix">5</xsl:when>
4390
+ <xsl:when test="$depth = 2 and ancestor::iec:annex">6</xsl:when>
4391
+ <xsl:when test="$depth = 2">7</xsl:when>
4392
+ <xsl:otherwise>5</xsl:otherwise>
4393
+ </xsl:choose>
4394
+
4395
+
4396
+
4397
+
4398
+
4399
+
4400
+
4401
+
4402
+
4403
+
4404
+
4405
+
4406
+
4407
+
4408
+ </xsl:variable>
4409
+
4410
+ <xsl:variable name="padding-right">
4411
+ <xsl:choose>
4412
+ <xsl:when test="normalize-space($padding) = ''">0</xsl:when>
4413
+ <xsl:otherwise>
4414
+ <xsl:value-of select="normalize-space($padding)"/>
4415
+ </xsl:otherwise>
4416
+ </xsl:choose>
4417
+ </xsl:variable>
4418
+
4419
+ <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
4420
+
4538
4421
  <xsl:choose>
4539
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
4540
- <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
4422
+ <xsl:when test="$language = 'zh'">
4423
+ <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
4424
+ </xsl:when>
4425
+ <xsl:when test="../../@inline-header = 'true'">
4426
+ <fo:inline font-size="90%">
4427
+ <xsl:call-template name="insertNonBreakSpaces">
4428
+ <xsl:with-param name="count" select="$padding-right"/>
4429
+ </xsl:call-template>
4430
+ </fo:inline>
4431
+ </xsl:when>
4432
+ <xsl:otherwise>
4433
+ <fo:inline padding-right="{$padding-right}mm">​</fo:inline>
4434
+ </xsl:otherwise>
4541
4435
  </xsl:choose>
4436
+
4437
+ </xsl:template><xsl:template name="insertNonBreakSpaces">
4438
+ <xsl:param name="count"/>
4439
+ <xsl:if test="$count &gt; 0">
4440
+ <xsl:text> </xsl:text>
4441
+ <xsl:call-template name="insertNonBreakSpaces">
4442
+ <xsl:with-param name="count" select="$count - 1"/>
4443
+ </xsl:call-template>
4444
+ </xsl:if>
4445
+ </xsl:template><xsl:template match="*[local-name() = 'domain']">
4446
+ <fo:inline xsl:use-attribute-sets="domain-style">&lt;<xsl:apply-templates/>&gt;</fo:inline>
4447
+ <xsl:text> </xsl:text>
4448
+ </xsl:template><xsl:template match="*[local-name() = 'admitted']">
4449
+ <fo:block xsl:use-attribute-sets="admitted-style">
4450
+ <xsl:apply-templates/>
4451
+ </fo:block>
4452
+ </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
4453
+ <xsl:variable name="title-deprecated">
4454
+ <xsl:call-template name="getTitle">
4455
+ <xsl:with-param name="name" select="'title-deprecated'"/>
4456
+ </xsl:call-template>
4457
+ </xsl:variable>
4458
+ <fo:block xsl:use-attribute-sets="deprecates-style">
4459
+ <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
4460
+ </fo:block>
4461
+ </xsl:template><xsl:template match="*[local-name() = 'definition']">
4462
+ <fo:block xsl:use-attribute-sets="definition-style">
4463
+ <xsl:apply-templates/>
4464
+ </fo:block>
4465
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
4466
+ <xsl:apply-templates/>
4467
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
4468
+ <fo:inline> <xsl:apply-templates/></fo:inline>
4469
+ <fo:block> </fo:block>
4470
+ </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
4471
+
4472
+ <fo:block>
4473
+ <xsl:call-template name="setId"/>
4474
+
4475
+
4476
+
4477
+
4478
+
4479
+
4480
+
4481
+
4482
+
4483
+
4484
+ <xsl:apply-templates/>
4485
+ </fo:block>
4486
+
4487
+
4488
+
4489
+ </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
4490
+ <fo:block break-after="page"/>
4491
+ <fo:block>
4492
+ <xsl:call-template name="setId"/>
4493
+ <xsl:apply-templates/>
4494
+ </fo:block>
4495
+ </xsl:template><xsl:template match="*[local-name() = 'clause']">
4496
+ <fo:block>
4497
+ <xsl:call-template name="setId"/>
4498
+ <xsl:apply-templates/>
4499
+ </fo:block>
4500
+ </xsl:template><xsl:template match="*[local-name() = 'definitions']">
4501
+ <fo:block id="{@id}">
4502
+ <xsl:apply-templates/>
4503
+ </fo:block>
4504
+ </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@id = '_normative_references' or @id = '_references']">
4505
+
4506
+ <fo:block id="{@id}">
4507
+ <xsl:apply-templates/>
4508
+ </fo:block>
4509
+ </xsl:template><xsl:template match="*[local-name() = 'annex']">
4510
+ <fo:block break-after="page"/>
4511
+ <fo:block id="{@id}">
4512
+
4513
+ </fo:block>
4542
4514
  <xsl:apply-templates/>
4515
+ </xsl:template><xsl:template match="*[local-name() = 'review']">
4516
+ <!-- comment 2019-11-29 -->
4517
+ <!-- <fo:block font-weight="bold">Review:</fo:block>
4518
+ <xsl:apply-templates /> -->
4519
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
4520
+ <!-- 0xA0 to space replacement -->
4521
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
4522
+ </xsl:template><xsl:template match="*[local-name() = 'errata']">
4523
+ <!-- <row>
4524
+ <date>05-07-2013</date>
4525
+ <type>Editorial</type>
4526
+ <change>Changed CA-9 Priority Code from P1 to P2 in <xref target="tabled2"/>.</change>
4527
+ <pages>D-3</pages>
4528
+ </row>
4529
+ -->
4530
+ <fo:table table-layout="fixed" width="100%" font-size="10pt" border="1pt solid black">
4531
+ <fo:table-column column-width="20mm"/>
4532
+ <fo:table-column column-width="23mm"/>
4533
+ <fo:table-column column-width="107mm"/>
4534
+ <fo:table-column column-width="15mm"/>
4535
+ <fo:table-body>
4536
+ <fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
4537
+ <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
4538
+ <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
4539
+ <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
4540
+ <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
4541
+ </fo:table-row>
4542
+ <xsl:apply-templates/>
4543
+ </fo:table-body>
4544
+ </fo:table>
4545
+ </xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']">
4546
+ <fo:table-row>
4547
+ <xsl:apply-templates/>
4548
+ </fo:table-row>
4549
+ </xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
4550
+ <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
4551
+ <fo:block><xsl:apply-templates/></fo:block>
4552
+ </fo:table-cell>
4543
4553
  </xsl:template><xsl:template name="convertDate">
4544
4554
  <xsl:param name="date"/>
4545
4555
  <xsl:param name="format" select="'short'"/>
@@ -4670,27 +4680,49 @@
4670
4680
  </xsl:otherwise>
4671
4681
  </xsl:choose>
4672
4682
  </xsl:template><xsl:template name="getLevel">
4673
- <xsl:variable name="level_total" select="count(ancestor::*)"/>
4674
- <xsl:variable name="level">
4675
- <xsl:choose>
4676
- <xsl:when test="ancestor::*[local-name() = 'preface']">
4677
- <xsl:value-of select="$level_total - 2"/>
4678
- </xsl:when>
4679
- <xsl:when test="ancestor::*[local-name() = 'sections']">
4680
- <xsl:value-of select="$level_total - 2"/>
4681
- </xsl:when>
4682
- <xsl:when test="ancestor::*[local-name() = 'bibliography']">
4683
- <xsl:value-of select="$level_total - 2"/>
4684
- </xsl:when>
4685
- <xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
4686
- <xsl:otherwise>
4687
- <xsl:value-of select="$level_total - 1"/>
4688
- </xsl:otherwise>
4689
- </xsl:choose>
4690
- </xsl:variable>
4691
- <xsl:value-of select="$level"/>
4692
- </xsl:template><xsl:template name="getSubSection">
4693
- <xsl:number format=".1" level="multiple" count="*[local-name() = 'clause']/*[local-name() = 'clause'] | *[local-name() = 'clause']/*[local-name() = 'terms'] | *[local-name() = 'terms']/*[local-name() = 'term'] | *[local-name() = 'clause']/*[local-name() = 'term'] | *[local-name() = 'terms']/*[local-name() = 'clause'] | *[local-name() = 'terms']/*[local-name() = 'definitions'] | *[local-name() = 'definitions']/*[local-name() = 'clause'] | *[local-name() = 'clause']/*[local-name() = 'definitions'] | *[local-name() = 'definitions']/*[local-name() = 'definitions'] | *[local-name() = 'clause']/*[local-name() = 'references']"/>
4683
+ <xsl:param name="depth"/>
4684
+ <xsl:choose>
4685
+ <xsl:when test="normalize-space(@depth) != ''">
4686
+ <xsl:value-of select="@depth"/>
4687
+ </xsl:when>
4688
+ <xsl:when test="normalize-space($depth) != ''">
4689
+ <xsl:value-of select="$depth"/>
4690
+ </xsl:when>
4691
+ <xsl:otherwise>
4692
+ <xsl:variable name="level_total" select="count(ancestor::*)"/>
4693
+ <xsl:variable name="level">
4694
+ <xsl:choose>
4695
+ <xsl:when test="parent::*[local-name() = 'preface']">
4696
+ <xsl:value-of select="$level_total - 1"/>
4697
+ </xsl:when>
4698
+ <xsl:when test="ancestor::*[local-name() = 'preface']">
4699
+ <xsl:value-of select="$level_total - 2"/>
4700
+ </xsl:when>
4701
+ <!-- <xsl:when test="parent::*[local-name() = 'sections']">
4702
+ <xsl:value-of select="$level_total - 1"/>
4703
+ </xsl:when> -->
4704
+ <xsl:when test="ancestor::*[local-name() = 'sections']">
4705
+ <xsl:value-of select="$level_total - 1"/>
4706
+ </xsl:when>
4707
+ <xsl:when test="ancestor::*[local-name() = 'bibliography']">
4708
+ <xsl:value-of select="$level_total - 1"/>
4709
+ </xsl:when>
4710
+ <xsl:when test="parent::*[local-name() = 'annex']">
4711
+ <xsl:value-of select="$level_total - 1"/>
4712
+ </xsl:when>
4713
+ <xsl:when test="ancestor::*[local-name() = 'annex']">
4714
+ <xsl:value-of select="$level_total"/>
4715
+ </xsl:when>
4716
+ <xsl:when test="local-name() = 'annex'">1</xsl:when>
4717
+ <xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
4718
+ <xsl:otherwise>
4719
+ <xsl:value-of select="$level_total - 1"/>
4720
+ </xsl:otherwise>
4721
+ </xsl:choose>
4722
+ </xsl:variable>
4723
+ <xsl:value-of select="$level"/>
4724
+ </xsl:otherwise>
4725
+ </xsl:choose>
4694
4726
  </xsl:template><xsl:template name="split">
4695
4727
  <xsl:param name="pText" select="."/>
4696
4728
  <xsl:param name="sep" select="','"/>
@@ -4736,4 +4768,15 @@
4736
4768
  <xsl:when test="$language = 'cn'">Chinese</xsl:when>
4737
4769
  <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
4738
4770
  </xsl:choose>
4771
+ </xsl:template><xsl:template name="setId">
4772
+ <xsl:attribute name="id">
4773
+ <xsl:choose>
4774
+ <xsl:when test="@id">
4775
+ <xsl:value-of select="@id"/>
4776
+ </xsl:when>
4777
+ <xsl:otherwise>
4778
+ <xsl:value-of select="generate-id()"/>
4779
+ </xsl:otherwise>
4780
+ </xsl:choose>
4781
+ </xsl:attribute>
4739
4782
  </xsl:template></xsl:stylesheet>