metanorma-bipm 2.2.7 → 2.2.8

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: aa230620357f920249eabd398c0ff5ba7d466a84e0ab618f74d2ba9cb49d111f
4
- data.tar.gz: f76edf3fc5a2acc792664bf728e3ba66c929e72602c9589250cd4ea0ef89e48c
3
+ metadata.gz: 18aade47b63bc0551b4439a34d7d0cb0fd4f5f42bfdb926054c8ba64676d74c1
4
+ data.tar.gz: 8c08b33bfa3563c8e38f7476143de4e30522d69369a24e6155ead528cae370e1
5
5
  SHA512:
6
- metadata.gz: 24caba048d9114054309d7e93ac6e275c195e1821f4678539bab3585626fede38658d5ade32295334fd8f19f55b6c34f6ae0037cda350a344215fdb73a8f907c
7
- data.tar.gz: dbc666c0d77b8d29dda0a2f45806a925ee8dfe8a43ad3e042aca15ac070ec42c7ec12bfabbca6e8f065487d457b4dc73efd8ab2892a7095c8a1312f38795b623
6
+ metadata.gz: 485d5311a31adb2a4e1ea103e515693253c11c08fa8eb0164c01b59b1ab658d7c8140423f5ee2d7d1f652f9a2b488a3ebaa8abeaf0a475e82382daea11f25f51
7
+ data.tar.gz: 67cb70e9a0da69535856eab4f4b13323df59cb5fd716365124be8ae684ab3631ed6fee79265217f4e61f3b550604d29b5b059ac3a4768f1e7307b060f1a03d25
@@ -4508,11 +4508,17 @@
4508
4508
  <!-- ========================== -->
4509
4509
  <!-- Definition's list styles -->
4510
4510
  <!-- ========================== -->
4511
+
4512
+ <xsl:attribute-set name="dl-block-style">
4513
+
4514
+ </xsl:attribute-set>
4515
+
4511
4516
  <xsl:attribute-set name="dt-row-style">
4512
4517
 
4513
4518
  </xsl:attribute-set>
4514
4519
 
4515
4520
  <xsl:attribute-set name="dt-cell-style">
4521
+
4516
4522
  </xsl:attribute-set>
4517
4523
 
4518
4524
  <xsl:attribute-set name="dt-block-style">
@@ -4532,6 +4538,7 @@
4532
4538
 
4533
4539
  <xsl:attribute-set name="dd-cell-style">
4534
4540
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
4541
+
4535
4542
  </xsl:attribute-set>
4536
4543
 
4537
4544
  <!-- ========================== -->
@@ -4651,6 +4658,10 @@
4651
4658
 
4652
4659
  </xsl:attribute-set>
4653
4660
 
4661
+ <xsl:attribute-set name="figure-source-style">
4662
+
4663
+ </xsl:attribute-set>
4664
+
4654
4665
  <!-- Formula's styles -->
4655
4666
  <xsl:attribute-set name="formula-style">
4656
4667
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
@@ -5197,7 +5208,7 @@
5197
5208
 
5198
5209
  <xsl:template name="processTables_Contents">
5199
5210
  <tables>
5200
- <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
5211
+ <xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
5201
5212
  <table id="{@id}" alt-text="{*[local-name() = 'name']}">
5202
5213
  <xsl:copy-of select="*[local-name() = 'name']"/>
5203
5214
  </table>
@@ -5566,7 +5577,7 @@
5566
5577
  </xsl:attribute>
5567
5578
  </xsl:for-each>
5568
5579
 
5569
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
5580
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
5570
5581
  <xsl:if test="$isNoteOrFnExist = 'true'">
5571
5582
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
5572
5583
  </xsl:if>
@@ -5610,7 +5621,7 @@
5610
5621
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
5611
5622
  </xsl:when>
5612
5623
  <xsl:otherwise>
5613
- <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note and dl which render separaterely -->
5624
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
5614
5625
  </xsl:otherwise>
5615
5626
  </xsl:choose>
5616
5627
 
@@ -5731,6 +5742,11 @@
5731
5742
  </xsl:if>
5732
5743
  </xsl:template> <!-- table/name -->
5733
5744
 
5745
+ <!-- SOURCE: ... -->
5746
+ <xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
5747
+ <xsl:call-template name="termsource"/>
5748
+ </xsl:template>
5749
+
5734
5750
  <xsl:template name="calculate-columns-numbers">
5735
5751
  <xsl:param name="table-row"/>
5736
5752
  <xsl:variable name="columns-count" select="count($table-row/*)"/>
@@ -6087,7 +6103,7 @@
6087
6103
  </fo:table-header>
6088
6104
  </xsl:template> <!-- thead -->
6089
6105
 
6090
- <!-- template is using for iso, jcgm, bsi only -->
6106
+ <!-- template is using for iec, iso, jcgm, bsi only -->
6091
6107
  <xsl:template name="table-header-title">
6092
6108
  <xsl:param name="cols-count"/>
6093
6109
  <!-- row for title -->
@@ -6130,7 +6146,7 @@
6130
6146
  <xsl:param name="colwidths"/>
6131
6147
  <xsl:param name="colgroup"/>
6132
6148
 
6133
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
6149
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source']"/>
6134
6150
 
6135
6151
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
6136
6152
 
@@ -6210,6 +6226,7 @@
6210
6226
 
6211
6227
  <xsl:apply-templates select="../*[local-name()='dl']"/>
6212
6228
  <xsl:apply-templates select="../*[local-name()='note']"/>
6229
+ <xsl:apply-templates select="../*[local-name()='source']"/>
6213
6230
 
6214
6231
  <xsl:variable name="isDisplayRowSeparator">
6215
6232
 
@@ -6901,7 +6918,7 @@
6901
6918
  <xsl:variable name="isAdded" select="@added"/>
6902
6919
  <xsl:variable name="isDeleted" select="@deleted"/>
6903
6920
  <!-- <dl><xsl:copy-of select="."/></dl> -->
6904
- <fo:block-container>
6921
+ <fo:block-container xsl:use-attribute-sets="dl-block-style">
6905
6922
 
6906
6923
  <xsl:call-template name="setBlockSpanAll"/>
6907
6924
 
@@ -6912,6 +6929,18 @@
6912
6929
  <xsl:attribute name="margin-left">6.5mm</xsl:attribute><!-- 8 mm -->
6913
6930
  </xsl:if>
6914
6931
 
6932
+ <xsl:if test="ancestor::*[local-name() = 'sourcecode']">
6933
+ <!-- set font-size as sourcecode font-size -->
6934
+ <xsl:variable name="sourcecode_attributes">
6935
+ <xsl:call-template name="get_sourcecode_attributes"/>
6936
+ </xsl:variable>
6937
+ <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@font-size">
6938
+ <xsl:attribute name="{local-name()}">
6939
+ <xsl:value-of select="."/>
6940
+ </xsl:attribute>
6941
+ </xsl:for-each>
6942
+ </xsl:if>
6943
+
6915
6944
  <xsl:if test="parent::*[local-name() = 'note']">
6916
6945
  <xsl:attribute name="margin-left">
6917
6946
  <xsl:choose>
@@ -7343,6 +7372,7 @@
7343
7372
  <xsl:param name="split_keep-within-line"/>
7344
7373
 
7345
7374
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
7375
+
7346
7376
  <xsl:call-template name="insert_dt_cell">
7347
7377
  <xsl:with-param name="key_iso" select="$key_iso"/>
7348
7378
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -7364,6 +7394,7 @@
7364
7394
  <!-- border is mandatory, to calculate real width -->
7365
7395
  <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
7366
7396
  <xsl:attribute name="text-align">left</xsl:attribute>
7397
+
7367
7398
  </xsl:if>
7368
7399
 
7369
7400
  <fo:block xsl:use-attribute-sets="dt-block-style">
@@ -7806,6 +7837,7 @@
7806
7837
  <fo:inline>
7807
7838
  <xsl:for-each select="$styles/style">
7808
7839
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
7840
+
7809
7841
  </xsl:for-each>
7810
7842
  <xsl:apply-templates/>
7811
7843
  </fo:inline>
@@ -9373,6 +9405,13 @@
9373
9405
  </fo:block>
9374
9406
  </xsl:template>
9375
9407
 
9408
+ <!-- SOURCE: ... -->
9409
+ <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
9410
+
9411
+ <xsl:call-template name="termsource"/>
9412
+
9413
+ </xsl:template>
9414
+
9376
9415
  <xsl:template match="*[local-name() = 'image']">
9377
9416
  <xsl:variable name="isAdded" select="../@added"/>
9378
9417
  <xsl:variable name="isDeleted" select="../@deleted"/>
@@ -10516,9 +10555,11 @@
10516
10555
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
10517
10556
  </xsl:if>
10518
10557
 
10519
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
10558
+ <xsl:apply-templates select="node()[not(local-name() = 'name' or local-name() = 'dl')]"/>
10520
10559
  </fo:block>
10521
10560
 
10561
+ <xsl:apply-templates select="*[local-name() = 'dl']"/> <!-- Key table -->
10562
+
10522
10563
  <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
10523
10564
 
10524
10565
  </fo:block-container>
@@ -10550,11 +10591,22 @@
10550
10591
  <!-- add sourcecode highlighting -->
10551
10592
  <xsl:template match="*[local-name()='sourcecode']//*[local-name()='span'][@class]" priority="2">
10552
10593
  <xsl:variable name="class" select="@class"/>
10594
+
10595
+ <!-- Example: <1> -->
10596
+ <xsl:variable name="is_callout">
10597
+ <xsl:if test="parent::*[local-name() = 'dt']">
10598
+ <xsl:variable name="dt_id" select="../@id"/>
10599
+ <xsl:if test="ancestor::*[local-name() = 'sourcecode']//*[local-name() = 'callout'][@target = $dt_id]">true</xsl:if>
10600
+ </xsl:if>
10601
+ </xsl:variable>
10602
+
10553
10603
  <xsl:choose>
10554
10604
  <xsl:when test="$sourcecode_css//class[@name = $class]">
10555
10605
  <fo:inline>
10556
10606
  <xsl:apply-templates select="$sourcecode_css//class[@name = $class]" mode="css"/>
10607
+ <xsl:if test="$is_callout = 'true'">&lt;</xsl:if>
10557
10608
  <xsl:apply-templates/>
10609
+ <xsl:if test="$is_callout = 'true'">&gt;</xsl:if>
10558
10610
  </fo:inline>
10559
10611
  </xsl:when>
10560
10612
  <xsl:otherwise>
@@ -10978,6 +11030,10 @@
10978
11030
  </fo:block>
10979
11031
  </xsl:template>
10980
11032
 
11033
+ <xsl:template match="*[local-name() = 'div']">
11034
+ <fo:block><xsl:apply-templates/></fo:block>
11035
+ </xsl:template>
11036
+
10981
11037
  <xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit'] | *[local-name() = 'div'][@type = 'requirement-inherit'] | *[local-name() = 'div'][@type = 'recommendation-inherit'] | *[local-name() = 'div'][@type = 'permission-inherit']">
10982
11038
  <fo:block xsl:use-attribute-sets="inherit-style">
10983
11039
  <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
@@ -11678,13 +11734,8 @@
11678
11734
  </xsl:template>
11679
11735
 
11680
11736
  <xsl:template match="*[local-name() = 'deprecates']">
11681
- <xsl:variable name="title-deprecated">
11682
- <xsl:call-template name="getLocalizedString">
11683
- <xsl:with-param name="key">deprecated</xsl:with-param>
11684
- </xsl:call-template>
11685
- </xsl:variable>
11686
11737
  <fo:block xsl:use-attribute-sets="deprecates-style">
11687
- <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
11738
+ <xsl:apply-templates/>
11688
11739
  </fo:block>
11689
11740
  </xsl:template>
11690
11741
 
@@ -12906,6 +12957,23 @@
12906
12957
  <xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image']" mode="update_xml_step1">
12907
12958
  <xsl:copy-of select="."/>
12908
12959
  </xsl:template>
12960
+
12961
+ <!-- add @id, redundant for table auto-layout algorithm -->
12962
+ <xsl:template match="*[local-name() = 'dl' or local-name() = 'table'][not(@id)]" mode="update_xml_step1">
12963
+ <xsl:copy>
12964
+ <xsl:copy-of select="@*"/>
12965
+ <xsl:call-template name="add_id"/>
12966
+ <xsl:apply-templates mode="update_xml_step1"/>
12967
+ </xsl:copy>
12968
+ </xsl:template>
12969
+
12970
+ <xsl:template name="add_id">
12971
+ <xsl:if test="not(@id)">
12972
+ <!-- add @id - first element with @id plus '_element_name' -->
12973
+ <xsl:attribute name="id"><xsl:value-of select="(.//*[@id])[1]/@id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
12974
+ </xsl:if>
12975
+ </xsl:template>
12976
+
12909
12977
  <!-- =========================================================================== -->
12910
12978
  <!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
12911
12979
  <!-- =========================================================================== -->
@@ -4508,11 +4508,17 @@
4508
4508
  <!-- ========================== -->
4509
4509
  <!-- Definition's list styles -->
4510
4510
  <!-- ========================== -->
4511
+
4512
+ <xsl:attribute-set name="dl-block-style">
4513
+
4514
+ </xsl:attribute-set>
4515
+
4511
4516
  <xsl:attribute-set name="dt-row-style">
4512
4517
 
4513
4518
  </xsl:attribute-set>
4514
4519
 
4515
4520
  <xsl:attribute-set name="dt-cell-style">
4521
+
4516
4522
  </xsl:attribute-set>
4517
4523
 
4518
4524
  <xsl:attribute-set name="dt-block-style">
@@ -4532,6 +4538,7 @@
4532
4538
 
4533
4539
  <xsl:attribute-set name="dd-cell-style">
4534
4540
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
4541
+
4535
4542
  </xsl:attribute-set>
4536
4543
 
4537
4544
  <!-- ========================== -->
@@ -4651,6 +4658,10 @@
4651
4658
 
4652
4659
  </xsl:attribute-set>
4653
4660
 
4661
+ <xsl:attribute-set name="figure-source-style">
4662
+
4663
+ </xsl:attribute-set>
4664
+
4654
4665
  <!-- Formula's styles -->
4655
4666
  <xsl:attribute-set name="formula-style">
4656
4667
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
@@ -5197,7 +5208,7 @@
5197
5208
 
5198
5209
  <xsl:template name="processTables_Contents">
5199
5210
  <tables>
5200
- <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
5211
+ <xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
5201
5212
  <table id="{@id}" alt-text="{*[local-name() = 'name']}">
5202
5213
  <xsl:copy-of select="*[local-name() = 'name']"/>
5203
5214
  </table>
@@ -5566,7 +5577,7 @@
5566
5577
  </xsl:attribute>
5567
5578
  </xsl:for-each>
5568
5579
 
5569
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
5580
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
5570
5581
  <xsl:if test="$isNoteOrFnExist = 'true'">
5571
5582
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
5572
5583
  </xsl:if>
@@ -5610,7 +5621,7 @@
5610
5621
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
5611
5622
  </xsl:when>
5612
5623
  <xsl:otherwise>
5613
- <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note and dl which render separaterely -->
5624
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
5614
5625
  </xsl:otherwise>
5615
5626
  </xsl:choose>
5616
5627
 
@@ -5731,6 +5742,11 @@
5731
5742
  </xsl:if>
5732
5743
  </xsl:template> <!-- table/name -->
5733
5744
 
5745
+ <!-- SOURCE: ... -->
5746
+ <xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
5747
+ <xsl:call-template name="termsource"/>
5748
+ </xsl:template>
5749
+
5734
5750
  <xsl:template name="calculate-columns-numbers">
5735
5751
  <xsl:param name="table-row"/>
5736
5752
  <xsl:variable name="columns-count" select="count($table-row/*)"/>
@@ -6087,7 +6103,7 @@
6087
6103
  </fo:table-header>
6088
6104
  </xsl:template> <!-- thead -->
6089
6105
 
6090
- <!-- template is using for iso, jcgm, bsi only -->
6106
+ <!-- template is using for iec, iso, jcgm, bsi only -->
6091
6107
  <xsl:template name="table-header-title">
6092
6108
  <xsl:param name="cols-count"/>
6093
6109
  <!-- row for title -->
@@ -6130,7 +6146,7 @@
6130
6146
  <xsl:param name="colwidths"/>
6131
6147
  <xsl:param name="colgroup"/>
6132
6148
 
6133
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
6149
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source']"/>
6134
6150
 
6135
6151
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
6136
6152
 
@@ -6210,6 +6226,7 @@
6210
6226
 
6211
6227
  <xsl:apply-templates select="../*[local-name()='dl']"/>
6212
6228
  <xsl:apply-templates select="../*[local-name()='note']"/>
6229
+ <xsl:apply-templates select="../*[local-name()='source']"/>
6213
6230
 
6214
6231
  <xsl:variable name="isDisplayRowSeparator">
6215
6232
 
@@ -6901,7 +6918,7 @@
6901
6918
  <xsl:variable name="isAdded" select="@added"/>
6902
6919
  <xsl:variable name="isDeleted" select="@deleted"/>
6903
6920
  <!-- <dl><xsl:copy-of select="."/></dl> -->
6904
- <fo:block-container>
6921
+ <fo:block-container xsl:use-attribute-sets="dl-block-style">
6905
6922
 
6906
6923
  <xsl:call-template name="setBlockSpanAll"/>
6907
6924
 
@@ -6912,6 +6929,18 @@
6912
6929
  <xsl:attribute name="margin-left">6.5mm</xsl:attribute><!-- 8 mm -->
6913
6930
  </xsl:if>
6914
6931
 
6932
+ <xsl:if test="ancestor::*[local-name() = 'sourcecode']">
6933
+ <!-- set font-size as sourcecode font-size -->
6934
+ <xsl:variable name="sourcecode_attributes">
6935
+ <xsl:call-template name="get_sourcecode_attributes"/>
6936
+ </xsl:variable>
6937
+ <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@font-size">
6938
+ <xsl:attribute name="{local-name()}">
6939
+ <xsl:value-of select="."/>
6940
+ </xsl:attribute>
6941
+ </xsl:for-each>
6942
+ </xsl:if>
6943
+
6915
6944
  <xsl:if test="parent::*[local-name() = 'note']">
6916
6945
  <xsl:attribute name="margin-left">
6917
6946
  <xsl:choose>
@@ -7343,6 +7372,7 @@
7343
7372
  <xsl:param name="split_keep-within-line"/>
7344
7373
 
7345
7374
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
7375
+
7346
7376
  <xsl:call-template name="insert_dt_cell">
7347
7377
  <xsl:with-param name="key_iso" select="$key_iso"/>
7348
7378
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -7364,6 +7394,7 @@
7364
7394
  <!-- border is mandatory, to calculate real width -->
7365
7395
  <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
7366
7396
  <xsl:attribute name="text-align">left</xsl:attribute>
7397
+
7367
7398
  </xsl:if>
7368
7399
 
7369
7400
  <fo:block xsl:use-attribute-sets="dt-block-style">
@@ -7806,6 +7837,7 @@
7806
7837
  <fo:inline>
7807
7838
  <xsl:for-each select="$styles/style">
7808
7839
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
7840
+
7809
7841
  </xsl:for-each>
7810
7842
  <xsl:apply-templates/>
7811
7843
  </fo:inline>
@@ -9373,6 +9405,13 @@
9373
9405
  </fo:block>
9374
9406
  </xsl:template>
9375
9407
 
9408
+ <!-- SOURCE: ... -->
9409
+ <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
9410
+
9411
+ <xsl:call-template name="termsource"/>
9412
+
9413
+ </xsl:template>
9414
+
9376
9415
  <xsl:template match="*[local-name() = 'image']">
9377
9416
  <xsl:variable name="isAdded" select="../@added"/>
9378
9417
  <xsl:variable name="isDeleted" select="../@deleted"/>
@@ -10516,9 +10555,11 @@
10516
10555
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
10517
10556
  </xsl:if>
10518
10557
 
10519
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
10558
+ <xsl:apply-templates select="node()[not(local-name() = 'name' or local-name() = 'dl')]"/>
10520
10559
  </fo:block>
10521
10560
 
10561
+ <xsl:apply-templates select="*[local-name() = 'dl']"/> <!-- Key table -->
10562
+
10522
10563
  <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
10523
10564
 
10524
10565
  </fo:block-container>
@@ -10550,11 +10591,22 @@
10550
10591
  <!-- add sourcecode highlighting -->
10551
10592
  <xsl:template match="*[local-name()='sourcecode']//*[local-name()='span'][@class]" priority="2">
10552
10593
  <xsl:variable name="class" select="@class"/>
10594
+
10595
+ <!-- Example: <1> -->
10596
+ <xsl:variable name="is_callout">
10597
+ <xsl:if test="parent::*[local-name() = 'dt']">
10598
+ <xsl:variable name="dt_id" select="../@id"/>
10599
+ <xsl:if test="ancestor::*[local-name() = 'sourcecode']//*[local-name() = 'callout'][@target = $dt_id]">true</xsl:if>
10600
+ </xsl:if>
10601
+ </xsl:variable>
10602
+
10553
10603
  <xsl:choose>
10554
10604
  <xsl:when test="$sourcecode_css//class[@name = $class]">
10555
10605
  <fo:inline>
10556
10606
  <xsl:apply-templates select="$sourcecode_css//class[@name = $class]" mode="css"/>
10607
+ <xsl:if test="$is_callout = 'true'">&lt;</xsl:if>
10557
10608
  <xsl:apply-templates/>
10609
+ <xsl:if test="$is_callout = 'true'">&gt;</xsl:if>
10558
10610
  </fo:inline>
10559
10611
  </xsl:when>
10560
10612
  <xsl:otherwise>
@@ -10978,6 +11030,10 @@
10978
11030
  </fo:block>
10979
11031
  </xsl:template>
10980
11032
 
11033
+ <xsl:template match="*[local-name() = 'div']">
11034
+ <fo:block><xsl:apply-templates/></fo:block>
11035
+ </xsl:template>
11036
+
10981
11037
  <xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit'] | *[local-name() = 'div'][@type = 'requirement-inherit'] | *[local-name() = 'div'][@type = 'recommendation-inherit'] | *[local-name() = 'div'][@type = 'permission-inherit']">
10982
11038
  <fo:block xsl:use-attribute-sets="inherit-style">
10983
11039
  <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
@@ -11678,13 +11734,8 @@
11678
11734
  </xsl:template>
11679
11735
 
11680
11736
  <xsl:template match="*[local-name() = 'deprecates']">
11681
- <xsl:variable name="title-deprecated">
11682
- <xsl:call-template name="getLocalizedString">
11683
- <xsl:with-param name="key">deprecated</xsl:with-param>
11684
- </xsl:call-template>
11685
- </xsl:variable>
11686
11737
  <fo:block xsl:use-attribute-sets="deprecates-style">
11687
- <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
11738
+ <xsl:apply-templates/>
11688
11739
  </fo:block>
11689
11740
  </xsl:template>
11690
11741
 
@@ -12906,6 +12957,23 @@
12906
12957
  <xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image']" mode="update_xml_step1">
12907
12958
  <xsl:copy-of select="."/>
12908
12959
  </xsl:template>
12960
+
12961
+ <!-- add @id, redundant for table auto-layout algorithm -->
12962
+ <xsl:template match="*[local-name() = 'dl' or local-name() = 'table'][not(@id)]" mode="update_xml_step1">
12963
+ <xsl:copy>
12964
+ <xsl:copy-of select="@*"/>
12965
+ <xsl:call-template name="add_id"/>
12966
+ <xsl:apply-templates mode="update_xml_step1"/>
12967
+ </xsl:copy>
12968
+ </xsl:template>
12969
+
12970
+ <xsl:template name="add_id">
12971
+ <xsl:if test="not(@id)">
12972
+ <!-- add @id - first element with @id plus '_element_name' -->
12973
+ <xsl:attribute name="id"><xsl:value-of select="(.//*[@id])[1]/@id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
12974
+ </xsl:if>
12975
+ </xsl:template>
12976
+
12909
12977
  <!-- =========================================================================== -->
12910
12978
  <!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
12911
12979
  <!-- =========================================================================== -->