metanorma-ogc 1.2.12 → 1.2.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +9 -32
- data/.gitignore +2 -0
- data/.rubocop.yml +6 -2
- data/lib/asciidoctor/ogc/biblio.rng +4 -6
- data/lib/asciidoctor/ogc/boilerplate.xml +1 -1
- data/lib/asciidoctor/ogc/converter.rb +14 -15
- data/lib/asciidoctor/ogc/isodoc.rng +105 -2
- data/lib/asciidoctor/ogc/ogc.rng +22 -0
- data/lib/isodoc/ogc/base_convert.rb +15 -1
- data/lib/isodoc/ogc/html/htmlstyle.css +3 -0
- data/lib/isodoc/ogc/html/htmlstyle.scss +4 -0
- data/lib/isodoc/ogc/html/ogc.css +3 -0
- data/lib/isodoc/ogc/html/ogc.scss +3 -0
- data/lib/isodoc/ogc/i18n-en.yaml +1 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +496 -253
- data/lib/isodoc/ogc/ogc.best-practice.xsl +496 -253
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +496 -253
- data/lib/isodoc/ogc/ogc.community-practice.xsl +496 -253
- data/lib/isodoc/ogc/ogc.community-standard.xsl +496 -253
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +496 -253
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +496 -253
- data/lib/isodoc/ogc/ogc.other.xsl +496 -253
- data/lib/isodoc/ogc/ogc.policy.xsl +496 -253
- data/lib/isodoc/ogc/ogc.reference-model.xsl +496 -253
- data/lib/isodoc/ogc/ogc.release-notes.xsl +496 -253
- data/lib/isodoc/ogc/ogc.standard.xsl +496 -253
- data/lib/isodoc/ogc/ogc.test-suite.xsl +496 -253
- data/lib/isodoc/ogc/ogc.user-guide.xsl +496 -253
- data/lib/isodoc/ogc/ogc.white-paper.xsl +547 -264
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +2 -2
- metadata +9 -9
@@ -3,6 +3,7 @@
|
|
3
3
|
<xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
5
5
|
<xsl:param name="svg_images"/>
|
6
|
+
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
6
7
|
<xsl:variable name="images" select="document($svg_images)"/>
|
7
8
|
|
8
9
|
<xsl:variable name="pageWidth" select="'215.9mm'"/>
|
@@ -105,7 +106,9 @@
|
|
105
106
|
|
106
107
|
</fo:layout-master-set>
|
107
108
|
|
108
|
-
<
|
109
|
+
<fo:declarations>
|
110
|
+
<xsl:call-template name="addPDFUAmeta"/>
|
111
|
+
</fo:declarations>
|
109
112
|
|
110
113
|
<xsl:call-template name="addBookmarks">
|
111
114
|
<xsl:with-param name="contents" select="$contents"/>
|
@@ -124,24 +127,64 @@
|
|
124
127
|
</fo:block-container>
|
125
128
|
</fo:block-container>
|
126
129
|
|
127
|
-
<fo:block font-family="Lato" font-weight="300" font-size="14pt" font-style="italic" margin-top="6pt" color="rgb(21, 43, 77)">
|
130
|
+
<!-- <fo:block font-family="Lato" font-weight="300" font-size="14pt" font-style="italic" margin-top="6pt" color="rgb(21, 43, 77)">
|
128
131
|
<xsl:text>Additional context, inspirational quote, etc. fits into this subheading area</xsl:text>
|
129
|
-
</fo:block>
|
132
|
+
</fo:block> -->
|
130
133
|
|
131
|
-
<fo:block
|
132
|
-
<fo:block margin-top="
|
133
|
-
|
134
|
-
|
135
|
-
<fo:block margin-top="
|
136
|
-
<fo:block margin-top="
|
137
|
-
|
134
|
+
<fo:block text-align="right" font-size="10pt" margin-top="12pt" margin-bottom="24pt">
|
135
|
+
<fo:block margin-top="6pt">Submission Date: <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:date[@type = 'received']/ogc:on"/></fo:block>
|
136
|
+
<fo:block margin-top="6pt">Approval Date: <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:date[@type = 'issued']/ogc:on"/></fo:block>
|
137
|
+
<fo:block margin-top="6pt">Publication Date: <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:date[@type = 'published']/ogc:on"/></fo:block>
|
138
|
+
<fo:block margin-top="6pt">External identifier of this OGC® document: <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:docidentifier[@type = 'ogc-external']"/></fo:block>
|
139
|
+
<fo:block margin-top="6pt">Internal reference number of this OGC® document: <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:docnumber"/></fo:block>
|
140
|
+
|
141
|
+
<xsl:variable name="url" select="/ogc:ogc-standard/ogc:bibdata/ogc:uri"/>
|
142
|
+
<xsl:if test="normalize-space($url) != ''">
|
143
|
+
<fo:block margin-top="6pt">URL for this OGC® document: <xsl:value-of select="$url"/></fo:block>
|
144
|
+
</xsl:if>
|
145
|
+
|
146
|
+
<xsl:variable name="edition" select="/ogc:ogc-standard/ogc:bibdata/ogc:edition"/>
|
147
|
+
<xsl:if test="normalize-space($edition) != ''">
|
148
|
+
<fo:block margin-top="6pt">Version: <xsl:value-of select="$edition"/></fo:block>
|
149
|
+
</xsl:if>
|
150
|
+
|
151
|
+
<fo:block margin-top="6pt"><xsl:text>Category: </xsl:text>
|
152
|
+
<xsl:call-template name="capitalizeWords">
|
153
|
+
<xsl:with-param name="str" select="/ogc:ogc-standard/ogc:bibdata/ogc:ext/ogc:doctype"/>
|
154
|
+
</xsl:call-template>
|
138
155
|
</fo:block>
|
156
|
+
|
157
|
+
<xsl:variable name="editors">
|
158
|
+
<xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
|
159
|
+
<xsl:value-of select="."/>
|
160
|
+
<xsl:if test="position() != last()">, </xsl:if>
|
161
|
+
</xsl:for-each>
|
162
|
+
</xsl:variable>
|
163
|
+
<xsl:if test="normalize-space($editors) != ''">
|
164
|
+
<fo:block margin-top="6pt">Editor: <xsl:value-of select="$editors"/></fo:block>
|
165
|
+
</xsl:if>
|
166
|
+
</fo:block>
|
167
|
+
|
168
|
+
<!-- absolute-position="fixed" left="20mm" top="91mm" width="175mm" -->
|
169
|
+
<fo:block-container font-size="9pt" margin-left="-5mm" margin-right="-5mm">
|
170
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
171
|
+
<fo:block margin-top="8pt">
|
172
|
+
<xsl:apply-templates select="/ogc:ogc-standard/ogc:boilerplate/ogc:copyright-statement"/>
|
173
|
+
</fo:block>
|
174
|
+
<fo:block margin-top="8pt"> </fo:block>
|
175
|
+
<fo:block margin-top="8pt">
|
176
|
+
<xsl:apply-templates select="/ogc:ogc-standard/ogc:boilerplate/ogc:legal-statement"/>
|
177
|
+
</fo:block>
|
178
|
+
</fo:block-container>
|
139
179
|
</fo:block-container>
|
140
180
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
181
|
+
<!-- absolute-position="fixed" left="79mm" top="168mm" -->
|
182
|
+
<fo:block-container margin-top="24pt" margin-left="-5mm" margin-right="-5mm">
|
183
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
184
|
+
<fo:block text-align="center">
|
185
|
+
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo-OGC))}" width="57.5mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo"/>
|
186
|
+
</fo:block>
|
187
|
+
</fo:block-container>
|
145
188
|
</fo:block-container>
|
146
189
|
|
147
190
|
</fo:flow>
|
@@ -1158,6 +1201,7 @@
|
|
1158
1201
|
|
1159
1202
|
|
1160
1203
|
|
1204
|
+
|
1161
1205
|
|
1162
1206
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
1163
1207
|
|
@@ -1453,202 +1497,230 @@
|
|
1453
1497
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1454
1498
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1455
1499
|
|
1456
|
-
<xsl:variable name="
|
1457
|
-
<xsl:call-template name="getSimpleTable"/>
|
1458
|
-
</xsl:variable>
|
1500
|
+
<xsl:variable name="table">
|
1459
1501
|
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
1465
|
-
<fo:block> </fo:block>
|
1466
|
-
</xsl:if> -->
|
1467
|
-
|
1468
|
-
<!-- $namespace = 'iso' or -->
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
<xsl:call-template name="fn_name_display"/>
|
1502
|
+
<xsl:variable name="simple-table">
|
1503
|
+
<xsl:call-template name="getSimpleTable"/>
|
1504
|
+
</xsl:variable>
|
1473
1505
|
|
1474
1506
|
|
1475
|
-
|
1476
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1477
|
-
|
1478
|
-
<!-- <xsl:variable name="cols-count">
|
1479
|
-
<xsl:choose>
|
1480
|
-
<xsl:when test="*[local-name()='thead']">
|
1481
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1482
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1483
|
-
</xsl:call-template>
|
1484
|
-
</xsl:when>
|
1485
|
-
<xsl:otherwise>
|
1486
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1487
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1488
|
-
</xsl:call-template>
|
1489
|
-
</xsl:otherwise>
|
1490
|
-
</xsl:choose>
|
1491
|
-
</xsl:variable> -->
|
1492
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1493
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
<xsl:variable name="colwidths">
|
1498
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1499
|
-
<xsl:call-template name="calculate-column-widths">
|
1500
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1501
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
1502
|
-
</xsl:call-template>
|
1503
|
-
</xsl:if>
|
1504
|
-
</xsl:variable>
|
1505
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1506
|
-
|
1507
|
-
<!-- <xsl:variable name="colwidths2">
|
1508
|
-
<xsl:call-template name="calculate-column-widths">
|
1509
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1510
|
-
</xsl:call-template>
|
1511
|
-
</xsl:variable> -->
|
1512
|
-
|
1513
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1514
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1515
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1516
|
-
|
1517
|
-
<xsl:variable name="margin-left">
|
1518
|
-
<xsl:choose>
|
1519
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1520
|
-
<xsl:otherwise>0</xsl:otherwise>
|
1521
|
-
</xsl:choose>
|
1522
|
-
</xsl:variable>
|
1523
|
-
|
1524
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1525
1507
|
|
1526
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1527
1508
|
|
1528
1509
|
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1510
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1511
|
+
<fo:block> </fo:block>
|
1512
|
+
</xsl:if> -->
|
1513
|
+
|
1514
|
+
<!-- $namespace = 'iso' or -->
|
1532
1515
|
|
1516
|
+
|
1533
1517
|
|
1518
|
+
<xsl:call-template name="fn_name_display"/>
|
1534
1519
|
|
1535
|
-
|
1536
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1537
|
-
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
1538
|
-
|
1520
|
+
|
1539
1521
|
|
1522
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1540
1523
|
|
1524
|
+
<!-- <xsl:variable name="cols-count">
|
1525
|
+
<xsl:choose>
|
1526
|
+
<xsl:when test="*[local-name()='thead']">
|
1527
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1528
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1529
|
+
</xsl:call-template>
|
1530
|
+
</xsl:when>
|
1531
|
+
<xsl:otherwise>
|
1532
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1533
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1534
|
+
</xsl:call-template>
|
1535
|
+
</xsl:otherwise>
|
1536
|
+
</xsl:choose>
|
1537
|
+
</xsl:variable> -->
|
1538
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1539
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1541
1540
|
|
1542
1541
|
|
1543
1542
|
|
1543
|
+
<xsl:variable name="colwidths">
|
1544
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1545
|
+
<xsl:call-template name="calculate-column-widths">
|
1546
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1547
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
1548
|
+
</xsl:call-template>
|
1549
|
+
</xsl:if>
|
1550
|
+
</xsl:variable>
|
1551
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1544
1552
|
|
1553
|
+
<!-- <xsl:variable name="colwidths2">
|
1554
|
+
<xsl:call-template name="calculate-column-widths">
|
1555
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1556
|
+
</xsl:call-template>
|
1557
|
+
</xsl:variable> -->
|
1545
1558
|
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
</xsl:
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1559
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1560
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1561
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1562
|
+
|
1563
|
+
<xsl:variable name="margin-left">
|
1564
|
+
<xsl:choose>
|
1565
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1566
|
+
<xsl:otherwise>0</xsl:otherwise>
|
1567
|
+
</xsl:choose>
|
1568
|
+
</xsl:variable>
|
1569
|
+
|
1570
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1556
1571
|
|
1572
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1557
1573
|
|
1558
1574
|
|
1575
|
+
|
1576
|
+
|
1577
|
+
|
1559
1578
|
|
1560
1579
|
|
1561
|
-
<attribute name="margin-left">0mm</attribute>
|
1562
|
-
<attribute name="margin-right">0mm</attribute>
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
1580
|
|
1567
|
-
|
1581
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1582
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1583
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
1584
|
+
|
1568
1585
|
|
1569
|
-
</xsl:variable>
|
1570
|
-
|
1571
|
-
|
1572
|
-
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1573
1586
|
|
1574
|
-
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1575
|
-
<xsl:attribute name="{@name}">
|
1576
|
-
<xsl:value-of select="."/>
|
1577
|
-
</xsl:attribute>
|
1578
|
-
</xsl:for-each>
|
1579
1587
|
|
1580
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1581
|
-
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1582
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1583
|
-
</xsl:if>
|
1584
1588
|
|
1585
|
-
<xsl:choose>
|
1586
|
-
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1587
|
-
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1588
|
-
<fo:table-column column-width="{@width}"/>
|
1589
|
-
</xsl:for-each>
|
1590
|
-
</xsl:when>
|
1591
|
-
<xsl:otherwise>
|
1592
|
-
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1593
|
-
<xsl:choose>
|
1594
|
-
<xsl:when test=". = 1 or . = 0">
|
1595
|
-
<fo:table-column column-width="proportional-column-width(2)"/>
|
1596
|
-
</xsl:when>
|
1597
|
-
<xsl:otherwise>
|
1598
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
1599
|
-
</xsl:otherwise>
|
1600
|
-
</xsl:choose>
|
1601
|
-
</xsl:for-each>
|
1602
|
-
</xsl:otherwise>
|
1603
|
-
</xsl:choose>
|
1604
1589
|
|
1605
|
-
<xsl:choose>
|
1606
|
-
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1607
|
-
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1608
|
-
</xsl:when>
|
1609
|
-
<xsl:otherwise>
|
1610
|
-
<xsl:apply-templates/>
|
1611
|
-
</xsl:otherwise>
|
1612
|
-
</xsl:choose>
|
1613
1590
|
|
1614
|
-
|
1615
|
-
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
<
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1591
|
+
<xsl:variable name="table_width">
|
1592
|
+
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1593
|
+
|
1594
|
+
|
1595
|
+
|
1596
|
+
<xsl:choose>
|
1597
|
+
<xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
|
1598
|
+
<xsl:otherwise>100%</xsl:otherwise>
|
1599
|
+
</xsl:choose>
|
1600
|
+
|
1601
|
+
</xsl:variable>
|
1602
|
+
|
1603
|
+
<xsl:variable name="table_attributes">
|
1604
|
+
<attribute name="table-layout">fixed</attribute>
|
1605
|
+
<attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
|
1606
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1607
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1608
|
+
|
1609
|
+
|
1610
|
+
|
1611
|
+
|
1612
|
+
|
1613
|
+
<attribute name="margin-left">0mm</attribute>
|
1614
|
+
<attribute name="margin-right">0mm</attribute>
|
1615
|
+
|
1616
|
+
|
1617
|
+
|
1618
|
+
|
1619
|
+
|
1620
|
+
|
1621
|
+
</xsl:variable>
|
1622
|
+
|
1632
1623
|
|
1633
|
-
<
|
1624
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1625
|
+
|
1626
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1627
|
+
<xsl:attribute name="{@name}">
|
1628
|
+
<xsl:value-of select="."/>
|
1629
|
+
</xsl:attribute>
|
1630
|
+
</xsl:for-each>
|
1631
|
+
|
1632
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1633
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1634
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1635
|
+
</xsl:if>
|
1636
|
+
|
1637
|
+
<xsl:choose>
|
1638
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1639
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1640
|
+
<fo:table-column column-width="{@width}"/>
|
1641
|
+
</xsl:for-each>
|
1642
|
+
</xsl:when>
|
1643
|
+
<xsl:otherwise>
|
1644
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1645
|
+
<xsl:choose>
|
1646
|
+
<xsl:when test=". = 1 or . = 0">
|
1647
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1648
|
+
</xsl:when>
|
1649
|
+
<xsl:otherwise>
|
1650
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1651
|
+
</xsl:otherwise>
|
1652
|
+
</xsl:choose>
|
1653
|
+
</xsl:for-each>
|
1654
|
+
</xsl:otherwise>
|
1655
|
+
</xsl:choose>
|
1656
|
+
|
1634
1657
|
<xsl:choose>
|
1635
|
-
<xsl:when test="
|
1636
|
-
<
|
1658
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1659
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1637
1660
|
</xsl:when>
|
1638
1661
|
<xsl:otherwise>
|
1639
|
-
<
|
1662
|
+
<xsl:apply-templates/>
|
1640
1663
|
</xsl:otherwise>
|
1641
1664
|
</xsl:choose>
|
1665
|
+
|
1666
|
+
</fo:table>
|
1667
|
+
|
1668
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
1669
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1670
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1671
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1672
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1673
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
1674
|
+
</xsl:call-template>
|
1642
1675
|
</xsl:for-each>
|
1643
|
-
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
1676
|
+
|
1677
|
+
<!-- insert footer as table -->
|
1678
|
+
<!-- <fo:table>
|
1679
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1680
|
+
<xsl:attribute name="{@name}">
|
1681
|
+
<xsl:value-of select="."/>
|
1682
|
+
</xsl:attribute>
|
1683
|
+
</xsl:for-each>
|
1684
|
+
|
1685
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1686
|
+
<xsl:choose>
|
1687
|
+
<xsl:when test=". = 1 or . = 0">
|
1688
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1689
|
+
</xsl:when>
|
1690
|
+
<xsl:otherwise>
|
1691
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1692
|
+
</xsl:otherwise>
|
1693
|
+
</xsl:choose>
|
1694
|
+
</xsl:for-each>
|
1695
|
+
</fo:table>-->
|
1696
|
+
|
1697
|
+
|
1698
|
+
|
1699
|
+
|
1700
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1701
|
+
|
1702
|
+
|
1703
|
+
</fo:block-container>
|
1704
|
+
</xsl:variable>
|
1705
|
+
|
1706
|
+
|
1707
|
+
|
1708
|
+
<xsl:choose>
|
1709
|
+
<xsl:when test="@width">
|
1710
|
+
|
1711
|
+
<!-- centered table when table name is centered (see table-name-style) -->
|
1712
|
+
|
1713
|
+
|
1714
|
+
|
1715
|
+
<xsl:copy-of select="$table"/>
|
1716
|
+
|
1717
|
+
|
1718
|
+
</xsl:when>
|
1719
|
+
<xsl:otherwise>
|
1720
|
+
<xsl:copy-of select="$table"/>
|
1721
|
+
</xsl:otherwise>
|
1722
|
+
</xsl:choose>
|
1723
|
+
|
1652
1724
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1653
1725
|
<xsl:if test="normalize-space() != ''">
|
1654
1726
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -1776,7 +1848,15 @@
|
|
1776
1848
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1777
1849
|
<xsl:value-of select="@target"/>
|
1778
1850
|
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1779
|
-
<xsl:variable name="
|
1851
|
+
<xsl:variable name="mathml">
|
1852
|
+
<xsl:for-each select="*">
|
1853
|
+
<xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
|
1854
|
+
<xsl:copy-of select="."/>
|
1855
|
+
</xsl:if>
|
1856
|
+
</xsl:for-each>
|
1857
|
+
</xsl:variable>
|
1858
|
+
|
1859
|
+
<xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
|
1780
1860
|
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1781
1861
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1782
1862
|
<xsl:param name="cols-count"/>
|
@@ -2487,7 +2567,7 @@
|
|
2487
2567
|
<xsl:with-param name="table" select="$html-table"/>
|
2488
2568
|
</xsl:call-template>
|
2489
2569
|
</xsl:variable>
|
2490
|
-
<!-- colwidths=<xsl:
|
2570
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2491
2571
|
<xsl:variable name="maxlength_dt">
|
2492
2572
|
<xsl:call-template name="getMaxLength_dt"/>
|
2493
2573
|
</xsl:variable>
|
@@ -2516,13 +2596,22 @@
|
|
2516
2596
|
</xsl:when>
|
2517
2597
|
<xsl:otherwise>
|
2518
2598
|
<xsl:choose>
|
2599
|
+
<!-- to set width check most wide chars like `W` -->
|
2519
2600
|
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
2520
|
-
<fo:table-column column-width="
|
2521
|
-
<fo:table-column column-width="
|
2601
|
+
<fo:table-column column-width="7%"/>
|
2602
|
+
<fo:table-column column-width="93%"/>
|
2522
2603
|
</xsl:when>
|
2523
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like
|
2524
|
-
<fo:table-column column-width="
|
2525
|
-
<fo:table-column column-width="
|
2604
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like ABC, etc -->
|
2605
|
+
<fo:table-column column-width="15%"/>
|
2606
|
+
<fo:table-column column-width="85%"/>
|
2607
|
+
</xsl:when>
|
2608
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 7"> <!-- if dt contains short text like ABCDEF, etc -->
|
2609
|
+
<fo:table-column column-width="20%"/>
|
2610
|
+
<fo:table-column column-width="80%"/>
|
2611
|
+
</xsl:when>
|
2612
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
|
2613
|
+
<fo:table-column column-width="25%"/>
|
2614
|
+
<fo:table-column column-width="75%"/>
|
2526
2615
|
</xsl:when>
|
2527
2616
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
2528
2617
|
<fo:table-column column-width="60%"/>
|
@@ -2743,6 +2832,10 @@
|
|
2743
2832
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
2744
2833
|
<xsl:apply-templates/>
|
2745
2834
|
</fo:inline>
|
2835
|
+
</xsl:template><xsl:template match="*[local-name()='hi']">
|
2836
|
+
<fo:inline background-color="yellow">
|
2837
|
+
<xsl:apply-templates/>
|
2838
|
+
</fo:inline>
|
2746
2839
|
</xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
2747
2840
|
<xsl:variable name="text" select="normalize-space(.)"/>
|
2748
2841
|
<fo:inline font-size="75%">
|
@@ -2832,6 +2925,10 @@
|
|
2832
2925
|
<xsl:param name="text" select="."/>
|
2833
2926
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2834
2927
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
2928
|
+
</xsl:template><xsl:template name="add-zero-spaces-link-java">
|
2929
|
+
<xsl:param name="text" select="."/>
|
2930
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2931
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1')"/>
|
2835
2932
|
</xsl:template><xsl:template name="add-zero-spaces">
|
2836
2933
|
<xsl:param name="text" select="."/>
|
2837
2934
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
@@ -3079,6 +3176,7 @@
|
|
3079
3176
|
<xsl:apply-templates select="." mode="mathml"/>
|
3080
3177
|
</xsl:variable>
|
3081
3178
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3179
|
+
|
3082
3180
|
<!-- <xsl:copy-of select="."/> -->
|
3083
3181
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3084
3182
|
</fo:instream-foreign-object>
|
@@ -3092,7 +3190,12 @@
|
|
3092
3190
|
<!-- replace start and end spaces to non-break space -->
|
3093
3191
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3094
3192
|
</xsl:copy>
|
3095
|
-
</xsl:template><xsl:template match="
|
3193
|
+
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
3194
|
+
<xsl:copy>
|
3195
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3196
|
+
</xsl:copy>
|
3197
|
+
<mathml:mspace width="0.5ex"/>
|
3198
|
+
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3096
3199
|
<xsl:variable name="target">
|
3097
3200
|
<xsl:choose>
|
3098
3201
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
@@ -3113,7 +3216,10 @@
|
|
3113
3216
|
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
3114
3217
|
<xsl:choose>
|
3115
3218
|
<xsl:when test="normalize-space(.) = ''">
|
3116
|
-
<xsl:value-of select="$target"/>
|
3219
|
+
<!-- <xsl:value-of select="$target"/> -->
|
3220
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
3221
|
+
<xsl:with-param name="text" select="$target"/>
|
3222
|
+
</xsl:call-template>
|
3117
3223
|
</xsl:when>
|
3118
3224
|
<xsl:otherwise>
|
3119
3225
|
<xsl:apply-templates/>
|
@@ -3123,8 +3229,6 @@
|
|
3123
3229
|
</xsl:otherwise>
|
3124
3230
|
</xsl:choose>
|
3125
3231
|
</fo:inline>
|
3126
|
-
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
3127
|
-
<fo:inline id="{@id}"/>
|
3128
3232
|
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
3129
3233
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
3130
3234
|
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
@@ -3337,6 +3441,7 @@
|
|
3337
3441
|
<fo:block id="{@id}">
|
3338
3442
|
<xsl:apply-templates/>
|
3339
3443
|
</fo:block>
|
3444
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3340
3445
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
|
3341
3446
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
3342
3447
|
<xsl:apply-templates/>
|
@@ -3601,6 +3706,8 @@
|
|
3601
3706
|
<xsl:copy>
|
3602
3707
|
<xsl:apply-templates mode="contents_item"/>
|
3603
3708
|
</xsl:copy>
|
3709
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
3710
|
+
<xsl:copy-of select="."/>
|
3604
3711
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3605
3712
|
<xsl:text> </xsl:text>
|
3606
3713
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -3937,10 +4044,11 @@
|
|
3937
4044
|
</xsl:choose>
|
3938
4045
|
|
3939
4046
|
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3940
|
-
|
4047
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
3941
4048
|
<xsl:variable name="element">
|
3942
4049
|
block
|
3943
4050
|
|
4051
|
+
|
3944
4052
|
</xsl:variable>
|
3945
4053
|
<xsl:choose>
|
3946
4054
|
<xsl:when test="normalize-space($element) = 'block'">
|
@@ -4015,11 +4123,13 @@
|
|
4015
4123
|
</xsl:if>
|
4016
4124
|
</xsl:if>
|
4017
4125
|
|
4126
|
+
|
4018
4127
|
<fo:block-container margin-left="0mm">
|
4019
4128
|
|
4020
4129
|
<fo:block xsl:use-attribute-sets="quote-style">
|
4021
4130
|
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
4022
|
-
|
4131
|
+
|
4132
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
4023
4133
|
</fo:block>
|
4024
4134
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4025
4135
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -4042,32 +4152,50 @@
|
|
4042
4152
|
<xsl:text>— </xsl:text>
|
4043
4153
|
<xsl:apply-templates/>
|
4044
4154
|
</xsl:template><xsl:template match="*[local-name() = 'eref']">
|
4045
|
-
|
4046
|
-
|
4047
|
-
|
4048
|
-
|
4049
|
-
|
4050
|
-
|
4051
|
-
|
4052
|
-
|
4053
|
-
|
4054
|
-
|
4055
|
-
|
4056
|
-
|
4057
|
-
|
4058
|
-
|
4059
|
-
|
4060
|
-
|
4061
|
-
|
4062
|
-
|
4063
|
-
|
4064
|
-
|
4065
|
-
|
4066
|
-
|
4067
|
-
|
4068
|
-
|
4069
|
-
|
4070
|
-
|
4155
|
+
|
4156
|
+
<xsl:variable name="bibitemid">
|
4157
|
+
<xsl:choose>
|
4158
|
+
<xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"/>
|
4159
|
+
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
4160
|
+
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
4161
|
+
</xsl:choose>
|
4162
|
+
</xsl:variable>
|
4163
|
+
|
4164
|
+
<xsl:choose>
|
4165
|
+
<xsl:when test="normalize-space($bibitemid) != ''">
|
4166
|
+
<fo:inline xsl:use-attribute-sets="eref-style">
|
4167
|
+
<xsl:if test="@type = 'footnote'">
|
4168
|
+
|
4169
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
4170
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4171
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
4172
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
4173
|
+
|
4174
|
+
|
4175
|
+
</xsl:if>
|
4176
|
+
|
4177
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4178
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
4179
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
4180
|
+
</xsl:if>
|
4181
|
+
<xsl:if test="@type = 'inline'">
|
4182
|
+
|
4183
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
4184
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
4185
|
+
|
4186
|
+
|
4187
|
+
|
4188
|
+
</xsl:if>
|
4189
|
+
|
4190
|
+
<xsl:apply-templates/>
|
4191
|
+
</fo:basic-link>
|
4192
|
+
|
4193
|
+
</fo:inline>
|
4194
|
+
</xsl:when>
|
4195
|
+
<xsl:otherwise>
|
4196
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4197
|
+
</xsl:otherwise>
|
4198
|
+
</xsl:choose>
|
4071
4199
|
</xsl:template><xsl:template match="*[local-name() = 'tab']">
|
4072
4200
|
<!-- zero-space char -->
|
4073
4201
|
<xsl:variable name="depth">
|
@@ -4254,6 +4382,153 @@
|
|
4254
4382
|
</fo:block>
|
4255
4383
|
</xsl:otherwise>
|
4256
4384
|
</xsl:choose>
|
4385
|
+
</xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="dash" select="'–'"/><xsl:variable name="bookmark_in_fn">
|
4386
|
+
<xsl:for-each select="//*[local-name() = 'bookmark'][ancestor::*[local-name() = 'fn']]">
|
4387
|
+
<bookmark><xsl:value-of select="@id"/></bookmark>
|
4388
|
+
</xsl:for-each>
|
4389
|
+
</xsl:variable><xsl:template match="@*|node()" mode="index_add_id">
|
4390
|
+
<xsl:copy>
|
4391
|
+
<xsl:apply-templates select="@*|node()" mode="index_add_id"/>
|
4392
|
+
</xsl:copy>
|
4393
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
|
4394
|
+
<xsl:variable name="id">
|
4395
|
+
<xsl:call-template name="generateIndexXrefId"/>
|
4396
|
+
</xsl:variable>
|
4397
|
+
<xsl:copy> <!-- add id to xref -->
|
4398
|
+
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
4399
|
+
<xsl:attribute name="id">
|
4400
|
+
<xsl:value-of select="$id"/>
|
4401
|
+
</xsl:attribute>
|
4402
|
+
<xsl:apply-templates mode="index_add_id"/>
|
4403
|
+
</xsl:copy>
|
4404
|
+
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
4405
|
+
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
4406
|
+
<xsl:if test="@to">
|
4407
|
+
<xsl:value-of select="$dash"/>
|
4408
|
+
<xsl:copy>
|
4409
|
+
<xsl:copy-of select="@*"/>
|
4410
|
+
<xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
|
4411
|
+
<xsl:attribute name="id">
|
4412
|
+
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
4413
|
+
</xsl:attribute>
|
4414
|
+
<xsl:apply-templates mode="index_add_id"/>
|
4415
|
+
</xsl:copy>
|
4416
|
+
</xsl:if>
|
4417
|
+
</xsl:template><xsl:template match="@*|node()" mode="index_update">
|
4418
|
+
<xsl:copy>
|
4419
|
+
<xsl:apply-templates select="@*|node()" mode="index_update"/>
|
4420
|
+
</xsl:copy>
|
4421
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" mode="index_update">
|
4422
|
+
<xsl:copy>
|
4423
|
+
<xsl:apply-templates select="@*" mode="index_update"/>
|
4424
|
+
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
4425
|
+
</xsl:copy>
|
4426
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/node()" mode="process_li_element" priority="2">
|
4427
|
+
<xsl:param name="element"/>
|
4428
|
+
<xsl:param name="remove" select="'false'"/>
|
4429
|
+
<xsl:param name="target"/>
|
4430
|
+
<!-- <node></node> -->
|
4431
|
+
<xsl:choose>
|
4432
|
+
<xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $dash) and $remove = 'true'">
|
4433
|
+
<!-- skip text (i.e. remove it) and process next element -->
|
4434
|
+
<!-- [removed_<xsl:value-of select="."/>] -->
|
4435
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
4436
|
+
<xsl:with-param name="target"><xsl:value-of select="$target"/></xsl:with-param>
|
4437
|
+
</xsl:apply-templates>
|
4438
|
+
</xsl:when>
|
4439
|
+
<xsl:when test="self::text()">
|
4440
|
+
<xsl:value-of select="."/>
|
4441
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
4442
|
+
</xsl:when>
|
4443
|
+
<xsl:when test="self::* and local-name(.) = 'xref'">
|
4444
|
+
<xsl:variable name="id" select="@id"/>
|
4445
|
+
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
4446
|
+
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
4447
|
+
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
4448
|
+
|
4449
|
+
<xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
|
4450
|
+
<xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
|
4451
|
+
|
4452
|
+
<xsl:choose>
|
4453
|
+
<!-- 2nd pass -->
|
4454
|
+
<!-- if page is equal to page for next and page is not the end of range -->
|
4455
|
+
<xsl:when test="$page != '' and $page_next != '' and $page = $page_next and not(contains($page, '_to'))"> <!-- case: 12, 12-14 -->
|
4456
|
+
<!-- skip element (i.e. remove it) and remove next text ',' -->
|
4457
|
+
<!-- [removed_xref] -->
|
4458
|
+
|
4459
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
4460
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
4461
|
+
<xsl:with-param name="target">
|
4462
|
+
<xsl:choose>
|
4463
|
+
<xsl:when test="$target != ''"><xsl:value-of select="$target"/></xsl:when>
|
4464
|
+
<xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise>
|
4465
|
+
</xsl:choose>
|
4466
|
+
</xsl:with-param>
|
4467
|
+
</xsl:apply-templates>
|
4468
|
+
</xsl:when>
|
4469
|
+
|
4470
|
+
<xsl:when test="$page != '' and $page_prev != '' and $page = $page_prev and contains($page_prev, '_to')"> <!-- case: 12-14, 14, ... -->
|
4471
|
+
<!-- remove xref -->
|
4472
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
4473
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
4474
|
+
</xsl:apply-templates>
|
4475
|
+
</xsl:when>
|
4476
|
+
|
4477
|
+
<xsl:otherwise>
|
4478
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
4479
|
+
<xsl:with-param name="target" select="$target"/>
|
4480
|
+
</xsl:apply-templates>
|
4481
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
4482
|
+
</xsl:otherwise>
|
4483
|
+
</xsl:choose>
|
4484
|
+
</xsl:when>
|
4485
|
+
<xsl:when test="self::* and local-name(.) = 'ul'">
|
4486
|
+
<!-- ul -->
|
4487
|
+
<xsl:apply-templates select="." mode="index_update"/>
|
4488
|
+
</xsl:when>
|
4489
|
+
<xsl:otherwise>
|
4490
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
4491
|
+
<xsl:with-param name="target" select="$target"/>
|
4492
|
+
</xsl:apply-templates>
|
4493
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
4494
|
+
</xsl:otherwise>
|
4495
|
+
</xsl:choose>
|
4496
|
+
</xsl:template><xsl:template match="@*|node()" mode="xref_copy">
|
4497
|
+
<xsl:param name="target"/>
|
4498
|
+
<xsl:copy>
|
4499
|
+
<xsl:apply-templates select="@*" mode="xref_copy"/>
|
4500
|
+
<xsl:if test="$target != '' and not(xalan:nodeset($bookmark_in_fn)//bookmark[. = $target])">
|
4501
|
+
<xsl:attribute name="target"><xsl:value-of select="$target"/></xsl:attribute>
|
4502
|
+
</xsl:if>
|
4503
|
+
<xsl:apply-templates select="node()" mode="xref_copy"/>
|
4504
|
+
</xsl:copy>
|
4505
|
+
</xsl:template><xsl:template name="generateIndexXrefId">
|
4506
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
4507
|
+
|
4508
|
+
<xsl:variable name="docid">
|
4509
|
+
<xsl:call-template name="getDocumentId"/>
|
4510
|
+
</xsl:variable>
|
4511
|
+
<xsl:variable name="item_number">
|
4512
|
+
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
|
4513
|
+
</xsl:variable>
|
4514
|
+
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
4515
|
+
<xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
4516
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']" priority="4">
|
4517
|
+
<xsl:apply-templates/>
|
4518
|
+
<fo:block>
|
4519
|
+
<xsl:if test="following-sibling::*[local-name() = 'clause']">
|
4520
|
+
<fo:block> </fo:block>
|
4521
|
+
</xsl:if>
|
4522
|
+
</fo:block>
|
4523
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'ul']" priority="4">
|
4524
|
+
<xsl:apply-templates/>
|
4525
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
4526
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
4527
|
+
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
4528
|
+
<xsl:apply-templates/>
|
4529
|
+
</fo:block>
|
4530
|
+
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
4531
|
+
<fo:inline id="{@id}" font-size="1pt"/>
|
4257
4532
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4258
4533
|
<!-- <row>
|
4259
4534
|
<date>05-07-2013</date>
|
@@ -4581,7 +4856,7 @@
|
|
4581
4856
|
<xsl:param name="charDelim" select="', '"/>
|
4582
4857
|
<xsl:choose>
|
4583
4858
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
4584
|
-
<xsl:for-each select="
|
4859
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4585
4860
|
<xsl:sort data-type="text" order="ascending"/>
|
4586
4861
|
<xsl:call-template name="insertKeyword">
|
4587
4862
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -4590,7 +4865,7 @@
|
|
4590
4865
|
</xsl:for-each>
|
4591
4866
|
</xsl:when>
|
4592
4867
|
<xsl:otherwise>
|
4593
|
-
<xsl:for-each select="
|
4868
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4594
4869
|
<xsl:call-template name="insertKeyword">
|
4595
4870
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
4596
4871
|
<xsl:with-param name="charDelim" select="$charDelim"/>
|
@@ -4607,63 +4882,71 @@
|
|
4607
4882
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
4608
4883
|
</xsl:choose>
|
4609
4884
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
4610
|
-
<
|
4611
|
-
<
|
4612
|
-
|
4613
|
-
|
4614
|
-
|
4615
|
-
|
4616
|
-
|
4617
|
-
|
4618
|
-
|
4619
|
-
|
4620
|
-
|
4621
|
-
|
4885
|
+
<xsl:variable name="lang">
|
4886
|
+
<xsl:call-template name="getLang"/>
|
4887
|
+
</xsl:variable>
|
4888
|
+
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
4889
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
4890
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
4891
|
+
</pdf:dictionary>
|
4892
|
+
</pdf:catalog>
|
4893
|
+
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
4894
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
4895
|
+
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
4896
|
+
<!-- Dublin Core properties go here -->
|
4897
|
+
<dc:title>
|
4898
|
+
<xsl:variable name="title">
|
4899
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4900
|
+
|
4622
4901
|
|
4623
4902
|
|
4624
4903
|
|
4625
|
-
<xsl:value-of select="
|
4904
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
4626
4905
|
|
4627
4906
|
|
4628
4907
|
|
4629
|
-
</xsl:
|
4630
|
-
|
4631
|
-
|
4632
|
-
|
4633
|
-
|
4634
|
-
|
4635
|
-
|
4636
|
-
</xsl:
|
4637
|
-
</xsl:
|
4638
|
-
</
|
4639
|
-
|
4908
|
+
</xsl:for-each>
|
4909
|
+
</xsl:variable>
|
4910
|
+
<xsl:choose>
|
4911
|
+
<xsl:when test="normalize-space($title) != ''">
|
4912
|
+
<xsl:value-of select="$title"/>
|
4913
|
+
</xsl:when>
|
4914
|
+
<xsl:otherwise>
|
4915
|
+
<xsl:text> </xsl:text>
|
4916
|
+
</xsl:otherwise>
|
4917
|
+
</xsl:choose>
|
4918
|
+
</dc:title>
|
4919
|
+
<dc:creator>
|
4920
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4640
4921
|
|
4922
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
4923
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
4924
|
+
<xsl:if test="position() != last()">; </xsl:if>
|
4925
|
+
</xsl:for-each>
|
4641
4926
|
|
4642
4927
|
|
4643
|
-
|
4644
|
-
|
4645
|
-
|
4646
|
-
|
4647
|
-
|
4648
|
-
|
4649
|
-
|
4650
|
-
|
4651
|
-
|
4652
|
-
|
4653
|
-
|
4654
|
-
|
4655
|
-
|
4656
|
-
<
|
4657
|
-
|
4658
|
-
|
4659
|
-
|
4660
|
-
|
4661
|
-
|
4662
|
-
|
4663
|
-
|
4664
|
-
|
4665
|
-
</x:xmpmeta>
|
4666
|
-
</fo:declarations>
|
4928
|
+
|
4929
|
+
</xsl:for-each>
|
4930
|
+
</dc:creator>
|
4931
|
+
<dc:description>
|
4932
|
+
<xsl:variable name="abstract">
|
4933
|
+
|
4934
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
4935
|
+
|
4936
|
+
|
4937
|
+
</xsl:variable>
|
4938
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
4939
|
+
</dc:description>
|
4940
|
+
<pdf:Keywords>
|
4941
|
+
<xsl:call-template name="insertKeywords"/>
|
4942
|
+
</pdf:Keywords>
|
4943
|
+
</rdf:Description>
|
4944
|
+
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
4945
|
+
<!-- XMP properties go here -->
|
4946
|
+
<xmp:CreatorTool/>
|
4947
|
+
</rdf:Description>
|
4948
|
+
</rdf:RDF>
|
4949
|
+
</x:xmpmeta>
|
4667
4950
|
</xsl:template><xsl:template name="getId">
|
4668
4951
|
<xsl:choose>
|
4669
4952
|
<xsl:when test="../@id">
|