metanorma-ogc 2.5.2 → 2.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ogc/i18n-en.yaml +1 -1
- data/lib/isodoc/ogc/init.rb +5 -0
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +67 -10
- data/lib/isodoc/ogc/ogc.best-practice.xsl +67 -10
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +67 -10
- data/lib/isodoc/ogc/ogc.community-practice.xsl +67 -10
- data/lib/isodoc/ogc/ogc.community-standard.xsl +67 -10
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +67 -10
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +67 -10
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +67 -10
- data/lib/isodoc/ogc/ogc.other.xsl +67 -10
- data/lib/isodoc/ogc/ogc.policy.xsl +67 -10
- data/lib/isodoc/ogc/ogc.reference-model.xsl +67 -10
- data/lib/isodoc/ogc/ogc.release-notes.xsl +67 -10
- data/lib/isodoc/ogc/ogc.standard.xsl +67 -10
- data/lib/isodoc/ogc/ogc.test-suite.xsl +67 -10
- data/lib/isodoc/ogc/ogc.user-guide.xsl +67 -10
- data/lib/isodoc/ogc/ogc.white-paper.xsl +72 -10
- data/lib/isodoc/ogc/presentation_xml_convert.rb +0 -4
- data/lib/metanorma/ogc/biblio.rng +28 -25
- data/lib/metanorma/ogc/front.rb +20 -12
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +4 -4
@@ -386,7 +386,7 @@
|
|
386
386
|
<fo:inline font-weight="bold">
|
387
387
|
<!-- Editor: -->
|
388
388
|
<xsl:call-template name="getLocalizedString">
|
389
|
-
<xsl:with-param name="key">
|
389
|
+
<xsl:with-param name="key">editor_full</xsl:with-param>
|
390
390
|
</xsl:call-template><xsl:text>: </xsl:text>
|
391
391
|
</fo:inline>
|
392
392
|
<xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
|
@@ -1577,6 +1577,8 @@
|
|
1577
1577
|
<xsl:param name="svg_images"/> <!-- svg images array -->
|
1578
1578
|
<xsl:variable name="images" select="document($svg_images)"/>
|
1579
1579
|
<xsl:param name="basepath"/> <!-- base path for images -->
|
1580
|
+
<xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
|
1581
|
+
<xsl:param name="inputxml_filename"/> <!-- input xml file name -->
|
1580
1582
|
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
1581
1583
|
<xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
|
1582
1584
|
<xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
|
@@ -1629,6 +1631,20 @@
|
|
1629
1631
|
<xsl:call-template name="getLang"/>
|
1630
1632
|
</xsl:variable>
|
1631
1633
|
|
1634
|
+
<xsl:variable name="inputxml_filename_prefix">
|
1635
|
+
<xsl:choose>
|
1636
|
+
<xsl:when test="contains($inputxml_filename, '.presentation.xml')">
|
1637
|
+
<xsl:value-of select="substring-before($inputxml_filename, '.presentation.xml')"/>
|
1638
|
+
</xsl:when>
|
1639
|
+
<xsl:when test="contains($inputxml_filename, '.xml')">
|
1640
|
+
<xsl:value-of select="substring-before($inputxml_filename, '.xml')"/>
|
1641
|
+
</xsl:when>
|
1642
|
+
<xsl:otherwise>
|
1643
|
+
<xsl:value-of select="$inputxml_filename"/>
|
1644
|
+
</xsl:otherwise>
|
1645
|
+
</xsl:choose>
|
1646
|
+
</xsl:variable>
|
1647
|
+
|
1632
1648
|
<!-- Note 1: Each xslt has declated variable `namespace` that allows to set some properties, processing logic, etc. for concrete xslt.
|
1633
1649
|
You can put such conditions by using xslt construction `xsl:if test="..."` or <xsl:choose><xsl:when test=""></xsl:when><xsl:otherwiste></xsl:otherwiste></xsl:choose>,
|
1634
1650
|
BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
|
@@ -2657,6 +2673,10 @@
|
|
2657
2673
|
|
2658
2674
|
</xsl:attribute-set>
|
2659
2675
|
|
2676
|
+
<xsl:template name="refine_figure-block-style">
|
2677
|
+
|
2678
|
+
</xsl:template>
|
2679
|
+
|
2660
2680
|
<xsl:attribute-set name="figure-style">
|
2661
2681
|
|
2662
2682
|
</xsl:attribute-set>
|
@@ -3609,7 +3629,7 @@
|
|
3609
3629
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
3610
3630
|
|
3611
3631
|
<xsl:variable name="colwidths">
|
3612
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
3632
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col']) and not(@class = 'dl')">
|
3613
3633
|
<xsl:call-template name="calculate-column-widths">
|
3614
3634
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3615
3635
|
<xsl:with-param name="table" select="$simple-table"/>
|
@@ -3727,6 +3747,11 @@
|
|
3727
3747
|
<fo:table-column column-width="{@width}"/>
|
3728
3748
|
</xsl:for-each>
|
3729
3749
|
</xsl:when>
|
3750
|
+
<xsl:when test="@class = 'dl'">
|
3751
|
+
<xsl:for-each select=".//*[local-name()='tr'][1]/*">
|
3752
|
+
<fo:table-column column-width="{@width}"/>
|
3753
|
+
</xsl:for-each>
|
3754
|
+
</xsl:when>
|
3730
3755
|
<xsl:otherwise>
|
3731
3756
|
<xsl:call-template name="insertTableColumnWidth">
|
3732
3757
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
@@ -5010,6 +5035,7 @@
|
|
5010
5035
|
<!-- ===================== -->
|
5011
5036
|
<!-- Definition List -->
|
5012
5037
|
<!-- ===================== -->
|
5038
|
+
|
5013
5039
|
<xsl:template match="*[local-name()='dl']">
|
5014
5040
|
<xsl:variable name="isAdded" select="@added"/>
|
5015
5041
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -5222,10 +5248,21 @@
|
|
5222
5248
|
</xsl:variable>
|
5223
5249
|
|
5224
5250
|
<xsl:variable name="colwidths">
|
5225
|
-
<xsl:
|
5226
|
-
|
5227
|
-
<xsl:
|
5228
|
-
|
5251
|
+
<xsl:choose>
|
5252
|
+
<!-- dl from table[@class='dl'] -->
|
5253
|
+
<xsl:when test="*[local-name() = 'colgroup']">
|
5254
|
+
<autolayout/>
|
5255
|
+
<xsl:for-each select="*[local-name() = 'colgroup']/*[local-name() = 'col']">
|
5256
|
+
<column><xsl:value-of select="translate(@width,'%m','')"/></column>
|
5257
|
+
</xsl:for-each>
|
5258
|
+
</xsl:when>
|
5259
|
+
<xsl:otherwise>
|
5260
|
+
<xsl:call-template name="calculate-column-widths">
|
5261
|
+
<xsl:with-param name="cols-count" select="2"/>
|
5262
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
5263
|
+
</xsl:call-template>
|
5264
|
+
</xsl:otherwise>
|
5265
|
+
</xsl:choose>
|
5229
5266
|
</xsl:variable>
|
5230
5267
|
|
5231
5268
|
<!-- <xsl:text disable-output-escaping="yes"><!- -</xsl:text>
|
@@ -7331,6 +7368,12 @@
|
|
7331
7368
|
<xsl:when test="@updatetype = 'true'">
|
7332
7369
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
7333
7370
|
</xsl:when>
|
7371
|
+
<xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
|
7372
|
+
<!-- link to the PDF attachment -->
|
7373
|
+
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
7374
|
+
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
7375
|
+
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
7376
|
+
</xsl:when>
|
7334
7377
|
<xsl:otherwise>
|
7335
7378
|
<xsl:value-of select="normalize-space(@target)"/>
|
7336
7379
|
</xsl:otherwise>
|
@@ -7744,6 +7787,7 @@
|
|
7744
7787
|
<xsl:variable name="isAdded" select="@added"/>
|
7745
7788
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
7746
7789
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
7790
|
+
<xsl:call-template name="refine_figure-block-style"/>
|
7747
7791
|
|
7748
7792
|
<xsl:call-template name="setTrackChangesStyles">
|
7749
7793
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
@@ -12150,10 +12194,10 @@
|
|
12150
12194
|
|
12151
12195
|
<xsl:template name="addPDFUAmeta">
|
12152
12196
|
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
12153
|
-
|
12154
|
-
|
12155
|
-
|
12156
|
-
|
12197
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
12198
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
12199
|
+
</pdf:dictionary>
|
12200
|
+
</pdf:catalog>
|
12157
12201
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
12158
12202
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
12159
12203
|
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
@@ -12205,6 +12249,19 @@
|
|
12205
12249
|
</rdf:Description>
|
12206
12250
|
</rdf:RDF>
|
12207
12251
|
</x:xmpmeta>
|
12252
|
+
<!-- add attachments -->
|
12253
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
12254
|
+
<xsl:choose>
|
12255
|
+
<xsl:when test="normalize-space() != ''">
|
12256
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{.}" filename="{@name}"/>
|
12257
|
+
</xsl:when>
|
12258
|
+
<xsl:otherwise>
|
12259
|
+
<!-- _{filename}_attachments -->
|
12260
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
|
12261
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{@name}"/>
|
12262
|
+
</xsl:otherwise>
|
12263
|
+
</xsl:choose>
|
12264
|
+
</xsl:for-each>
|
12208
12265
|
</xsl:template> <!-- addPDFUAmeta -->
|
12209
12266
|
|
12210
12267
|
<xsl:template name="getId">
|
@@ -386,7 +386,7 @@
|
|
386
386
|
<fo:inline font-weight="bold">
|
387
387
|
<!-- Editor: -->
|
388
388
|
<xsl:call-template name="getLocalizedString">
|
389
|
-
<xsl:with-param name="key">
|
389
|
+
<xsl:with-param name="key">editor_full</xsl:with-param>
|
390
390
|
</xsl:call-template><xsl:text>: </xsl:text>
|
391
391
|
</fo:inline>
|
392
392
|
<xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
|
@@ -1577,6 +1577,8 @@
|
|
1577
1577
|
<xsl:param name="svg_images"/> <!-- svg images array -->
|
1578
1578
|
<xsl:variable name="images" select="document($svg_images)"/>
|
1579
1579
|
<xsl:param name="basepath"/> <!-- base path for images -->
|
1580
|
+
<xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
|
1581
|
+
<xsl:param name="inputxml_filename"/> <!-- input xml file name -->
|
1580
1582
|
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
1581
1583
|
<xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
|
1582
1584
|
<xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
|
@@ -1629,6 +1631,20 @@
|
|
1629
1631
|
<xsl:call-template name="getLang"/>
|
1630
1632
|
</xsl:variable>
|
1631
1633
|
|
1634
|
+
<xsl:variable name="inputxml_filename_prefix">
|
1635
|
+
<xsl:choose>
|
1636
|
+
<xsl:when test="contains($inputxml_filename, '.presentation.xml')">
|
1637
|
+
<xsl:value-of select="substring-before($inputxml_filename, '.presentation.xml')"/>
|
1638
|
+
</xsl:when>
|
1639
|
+
<xsl:when test="contains($inputxml_filename, '.xml')">
|
1640
|
+
<xsl:value-of select="substring-before($inputxml_filename, '.xml')"/>
|
1641
|
+
</xsl:when>
|
1642
|
+
<xsl:otherwise>
|
1643
|
+
<xsl:value-of select="$inputxml_filename"/>
|
1644
|
+
</xsl:otherwise>
|
1645
|
+
</xsl:choose>
|
1646
|
+
</xsl:variable>
|
1647
|
+
|
1632
1648
|
<!-- Note 1: Each xslt has declated variable `namespace` that allows to set some properties, processing logic, etc. for concrete xslt.
|
1633
1649
|
You can put such conditions by using xslt construction `xsl:if test="..."` or <xsl:choose><xsl:when test=""></xsl:when><xsl:otherwiste></xsl:otherwiste></xsl:choose>,
|
1634
1650
|
BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
|
@@ -2657,6 +2673,10 @@
|
|
2657
2673
|
|
2658
2674
|
</xsl:attribute-set>
|
2659
2675
|
|
2676
|
+
<xsl:template name="refine_figure-block-style">
|
2677
|
+
|
2678
|
+
</xsl:template>
|
2679
|
+
|
2660
2680
|
<xsl:attribute-set name="figure-style">
|
2661
2681
|
|
2662
2682
|
</xsl:attribute-set>
|
@@ -3609,7 +3629,7 @@
|
|
3609
3629
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
3610
3630
|
|
3611
3631
|
<xsl:variable name="colwidths">
|
3612
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
3632
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col']) and not(@class = 'dl')">
|
3613
3633
|
<xsl:call-template name="calculate-column-widths">
|
3614
3634
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3615
3635
|
<xsl:with-param name="table" select="$simple-table"/>
|
@@ -3727,6 +3747,11 @@
|
|
3727
3747
|
<fo:table-column column-width="{@width}"/>
|
3728
3748
|
</xsl:for-each>
|
3729
3749
|
</xsl:when>
|
3750
|
+
<xsl:when test="@class = 'dl'">
|
3751
|
+
<xsl:for-each select=".//*[local-name()='tr'][1]/*">
|
3752
|
+
<fo:table-column column-width="{@width}"/>
|
3753
|
+
</xsl:for-each>
|
3754
|
+
</xsl:when>
|
3730
3755
|
<xsl:otherwise>
|
3731
3756
|
<xsl:call-template name="insertTableColumnWidth">
|
3732
3757
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
@@ -5010,6 +5035,7 @@
|
|
5010
5035
|
<!-- ===================== -->
|
5011
5036
|
<!-- Definition List -->
|
5012
5037
|
<!-- ===================== -->
|
5038
|
+
|
5013
5039
|
<xsl:template match="*[local-name()='dl']">
|
5014
5040
|
<xsl:variable name="isAdded" select="@added"/>
|
5015
5041
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -5222,10 +5248,21 @@
|
|
5222
5248
|
</xsl:variable>
|
5223
5249
|
|
5224
5250
|
<xsl:variable name="colwidths">
|
5225
|
-
<xsl:
|
5226
|
-
|
5227
|
-
<xsl:
|
5228
|
-
|
5251
|
+
<xsl:choose>
|
5252
|
+
<!-- dl from table[@class='dl'] -->
|
5253
|
+
<xsl:when test="*[local-name() = 'colgroup']">
|
5254
|
+
<autolayout/>
|
5255
|
+
<xsl:for-each select="*[local-name() = 'colgroup']/*[local-name() = 'col']">
|
5256
|
+
<column><xsl:value-of select="translate(@width,'%m','')"/></column>
|
5257
|
+
</xsl:for-each>
|
5258
|
+
</xsl:when>
|
5259
|
+
<xsl:otherwise>
|
5260
|
+
<xsl:call-template name="calculate-column-widths">
|
5261
|
+
<xsl:with-param name="cols-count" select="2"/>
|
5262
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
5263
|
+
</xsl:call-template>
|
5264
|
+
</xsl:otherwise>
|
5265
|
+
</xsl:choose>
|
5229
5266
|
</xsl:variable>
|
5230
5267
|
|
5231
5268
|
<!-- <xsl:text disable-output-escaping="yes"><!- -</xsl:text>
|
@@ -7331,6 +7368,12 @@
|
|
7331
7368
|
<xsl:when test="@updatetype = 'true'">
|
7332
7369
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
7333
7370
|
</xsl:when>
|
7371
|
+
<xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
|
7372
|
+
<!-- link to the PDF attachment -->
|
7373
|
+
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
7374
|
+
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
7375
|
+
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
7376
|
+
</xsl:when>
|
7334
7377
|
<xsl:otherwise>
|
7335
7378
|
<xsl:value-of select="normalize-space(@target)"/>
|
7336
7379
|
</xsl:otherwise>
|
@@ -7744,6 +7787,7 @@
|
|
7744
7787
|
<xsl:variable name="isAdded" select="@added"/>
|
7745
7788
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
7746
7789
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
7790
|
+
<xsl:call-template name="refine_figure-block-style"/>
|
7747
7791
|
|
7748
7792
|
<xsl:call-template name="setTrackChangesStyles">
|
7749
7793
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
@@ -12150,10 +12194,10 @@
|
|
12150
12194
|
|
12151
12195
|
<xsl:template name="addPDFUAmeta">
|
12152
12196
|
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
12153
|
-
|
12154
|
-
|
12155
|
-
|
12156
|
-
|
12197
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
12198
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
12199
|
+
</pdf:dictionary>
|
12200
|
+
</pdf:catalog>
|
12157
12201
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
12158
12202
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
12159
12203
|
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
@@ -12205,6 +12249,19 @@
|
|
12205
12249
|
</rdf:Description>
|
12206
12250
|
</rdf:RDF>
|
12207
12251
|
</x:xmpmeta>
|
12252
|
+
<!-- add attachments -->
|
12253
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
12254
|
+
<xsl:choose>
|
12255
|
+
<xsl:when test="normalize-space() != ''">
|
12256
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{.}" filename="{@name}"/>
|
12257
|
+
</xsl:when>
|
12258
|
+
<xsl:otherwise>
|
12259
|
+
<!-- _{filename}_attachments -->
|
12260
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
|
12261
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{@name}"/>
|
12262
|
+
</xsl:otherwise>
|
12263
|
+
</xsl:choose>
|
12264
|
+
</xsl:for-each>
|
12208
12265
|
</xsl:template> <!-- addPDFUAmeta -->
|
12209
12266
|
|
12210
12267
|
<xsl:template name="getId">
|
@@ -386,7 +386,7 @@
|
|
386
386
|
<fo:inline font-weight="bold">
|
387
387
|
<!-- Editor: -->
|
388
388
|
<xsl:call-template name="getLocalizedString">
|
389
|
-
<xsl:with-param name="key">
|
389
|
+
<xsl:with-param name="key">editor_full</xsl:with-param>
|
390
390
|
</xsl:call-template><xsl:text>: </xsl:text>
|
391
391
|
</fo:inline>
|
392
392
|
<xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
|
@@ -1577,6 +1577,8 @@
|
|
1577
1577
|
<xsl:param name="svg_images"/> <!-- svg images array -->
|
1578
1578
|
<xsl:variable name="images" select="document($svg_images)"/>
|
1579
1579
|
<xsl:param name="basepath"/> <!-- base path for images -->
|
1580
|
+
<xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
|
1581
|
+
<xsl:param name="inputxml_filename"/> <!-- input xml file name -->
|
1580
1582
|
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
1581
1583
|
<xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
|
1582
1584
|
<xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
|
@@ -1629,6 +1631,20 @@
|
|
1629
1631
|
<xsl:call-template name="getLang"/>
|
1630
1632
|
</xsl:variable>
|
1631
1633
|
|
1634
|
+
<xsl:variable name="inputxml_filename_prefix">
|
1635
|
+
<xsl:choose>
|
1636
|
+
<xsl:when test="contains($inputxml_filename, '.presentation.xml')">
|
1637
|
+
<xsl:value-of select="substring-before($inputxml_filename, '.presentation.xml')"/>
|
1638
|
+
</xsl:when>
|
1639
|
+
<xsl:when test="contains($inputxml_filename, '.xml')">
|
1640
|
+
<xsl:value-of select="substring-before($inputxml_filename, '.xml')"/>
|
1641
|
+
</xsl:when>
|
1642
|
+
<xsl:otherwise>
|
1643
|
+
<xsl:value-of select="$inputxml_filename"/>
|
1644
|
+
</xsl:otherwise>
|
1645
|
+
</xsl:choose>
|
1646
|
+
</xsl:variable>
|
1647
|
+
|
1632
1648
|
<!-- Note 1: Each xslt has declated variable `namespace` that allows to set some properties, processing logic, etc. for concrete xslt.
|
1633
1649
|
You can put such conditions by using xslt construction `xsl:if test="..."` or <xsl:choose><xsl:when test=""></xsl:when><xsl:otherwiste></xsl:otherwiste></xsl:choose>,
|
1634
1650
|
BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
|
@@ -2657,6 +2673,10 @@
|
|
2657
2673
|
|
2658
2674
|
</xsl:attribute-set>
|
2659
2675
|
|
2676
|
+
<xsl:template name="refine_figure-block-style">
|
2677
|
+
|
2678
|
+
</xsl:template>
|
2679
|
+
|
2660
2680
|
<xsl:attribute-set name="figure-style">
|
2661
2681
|
|
2662
2682
|
</xsl:attribute-set>
|
@@ -3609,7 +3629,7 @@
|
|
3609
3629
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
3610
3630
|
|
3611
3631
|
<xsl:variable name="colwidths">
|
3612
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
3632
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col']) and not(@class = 'dl')">
|
3613
3633
|
<xsl:call-template name="calculate-column-widths">
|
3614
3634
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3615
3635
|
<xsl:with-param name="table" select="$simple-table"/>
|
@@ -3727,6 +3747,11 @@
|
|
3727
3747
|
<fo:table-column column-width="{@width}"/>
|
3728
3748
|
</xsl:for-each>
|
3729
3749
|
</xsl:when>
|
3750
|
+
<xsl:when test="@class = 'dl'">
|
3751
|
+
<xsl:for-each select=".//*[local-name()='tr'][1]/*">
|
3752
|
+
<fo:table-column column-width="{@width}"/>
|
3753
|
+
</xsl:for-each>
|
3754
|
+
</xsl:when>
|
3730
3755
|
<xsl:otherwise>
|
3731
3756
|
<xsl:call-template name="insertTableColumnWidth">
|
3732
3757
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
@@ -5010,6 +5035,7 @@
|
|
5010
5035
|
<!-- ===================== -->
|
5011
5036
|
<!-- Definition List -->
|
5012
5037
|
<!-- ===================== -->
|
5038
|
+
|
5013
5039
|
<xsl:template match="*[local-name()='dl']">
|
5014
5040
|
<xsl:variable name="isAdded" select="@added"/>
|
5015
5041
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -5222,10 +5248,21 @@
|
|
5222
5248
|
</xsl:variable>
|
5223
5249
|
|
5224
5250
|
<xsl:variable name="colwidths">
|
5225
|
-
<xsl:
|
5226
|
-
|
5227
|
-
<xsl:
|
5228
|
-
|
5251
|
+
<xsl:choose>
|
5252
|
+
<!-- dl from table[@class='dl'] -->
|
5253
|
+
<xsl:when test="*[local-name() = 'colgroup']">
|
5254
|
+
<autolayout/>
|
5255
|
+
<xsl:for-each select="*[local-name() = 'colgroup']/*[local-name() = 'col']">
|
5256
|
+
<column><xsl:value-of select="translate(@width,'%m','')"/></column>
|
5257
|
+
</xsl:for-each>
|
5258
|
+
</xsl:when>
|
5259
|
+
<xsl:otherwise>
|
5260
|
+
<xsl:call-template name="calculate-column-widths">
|
5261
|
+
<xsl:with-param name="cols-count" select="2"/>
|
5262
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
5263
|
+
</xsl:call-template>
|
5264
|
+
</xsl:otherwise>
|
5265
|
+
</xsl:choose>
|
5229
5266
|
</xsl:variable>
|
5230
5267
|
|
5231
5268
|
<!-- <xsl:text disable-output-escaping="yes"><!- -</xsl:text>
|
@@ -7331,6 +7368,12 @@
|
|
7331
7368
|
<xsl:when test="@updatetype = 'true'">
|
7332
7369
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
7333
7370
|
</xsl:when>
|
7371
|
+
<xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
|
7372
|
+
<!-- link to the PDF attachment -->
|
7373
|
+
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
7374
|
+
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
7375
|
+
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
7376
|
+
</xsl:when>
|
7334
7377
|
<xsl:otherwise>
|
7335
7378
|
<xsl:value-of select="normalize-space(@target)"/>
|
7336
7379
|
</xsl:otherwise>
|
@@ -7744,6 +7787,7 @@
|
|
7744
7787
|
<xsl:variable name="isAdded" select="@added"/>
|
7745
7788
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
7746
7789
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
7790
|
+
<xsl:call-template name="refine_figure-block-style"/>
|
7747
7791
|
|
7748
7792
|
<xsl:call-template name="setTrackChangesStyles">
|
7749
7793
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
@@ -12150,10 +12194,10 @@
|
|
12150
12194
|
|
12151
12195
|
<xsl:template name="addPDFUAmeta">
|
12152
12196
|
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
12153
|
-
|
12154
|
-
|
12155
|
-
|
12156
|
-
|
12197
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
12198
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
12199
|
+
</pdf:dictionary>
|
12200
|
+
</pdf:catalog>
|
12157
12201
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
12158
12202
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
12159
12203
|
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
@@ -12205,6 +12249,19 @@
|
|
12205
12249
|
</rdf:Description>
|
12206
12250
|
</rdf:RDF>
|
12207
12251
|
</x:xmpmeta>
|
12252
|
+
<!-- add attachments -->
|
12253
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
12254
|
+
<xsl:choose>
|
12255
|
+
<xsl:when test="normalize-space() != ''">
|
12256
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{.}" filename="{@name}"/>
|
12257
|
+
</xsl:when>
|
12258
|
+
<xsl:otherwise>
|
12259
|
+
<!-- _{filename}_attachments -->
|
12260
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
|
12261
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{@name}"/>
|
12262
|
+
</xsl:otherwise>
|
12263
|
+
</xsl:choose>
|
12264
|
+
</xsl:for-each>
|
12208
12265
|
</xsl:template> <!-- addPDFUAmeta -->
|
12209
12266
|
|
12210
12267
|
<xsl:template name="getId">
|
@@ -386,7 +386,7 @@
|
|
386
386
|
<fo:inline font-weight="bold">
|
387
387
|
<!-- Editor: -->
|
388
388
|
<xsl:call-template name="getLocalizedString">
|
389
|
-
<xsl:with-param name="key">
|
389
|
+
<xsl:with-param name="key">editor_full</xsl:with-param>
|
390
390
|
</xsl:call-template><xsl:text>: </xsl:text>
|
391
391
|
</fo:inline>
|
392
392
|
<xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
|
@@ -1577,6 +1577,8 @@
|
|
1577
1577
|
<xsl:param name="svg_images"/> <!-- svg images array -->
|
1578
1578
|
<xsl:variable name="images" select="document($svg_images)"/>
|
1579
1579
|
<xsl:param name="basepath"/> <!-- base path for images -->
|
1580
|
+
<xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
|
1581
|
+
<xsl:param name="inputxml_filename"/> <!-- input xml file name -->
|
1580
1582
|
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
1581
1583
|
<xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
|
1582
1584
|
<xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
|
@@ -1629,6 +1631,20 @@
|
|
1629
1631
|
<xsl:call-template name="getLang"/>
|
1630
1632
|
</xsl:variable>
|
1631
1633
|
|
1634
|
+
<xsl:variable name="inputxml_filename_prefix">
|
1635
|
+
<xsl:choose>
|
1636
|
+
<xsl:when test="contains($inputxml_filename, '.presentation.xml')">
|
1637
|
+
<xsl:value-of select="substring-before($inputxml_filename, '.presentation.xml')"/>
|
1638
|
+
</xsl:when>
|
1639
|
+
<xsl:when test="contains($inputxml_filename, '.xml')">
|
1640
|
+
<xsl:value-of select="substring-before($inputxml_filename, '.xml')"/>
|
1641
|
+
</xsl:when>
|
1642
|
+
<xsl:otherwise>
|
1643
|
+
<xsl:value-of select="$inputxml_filename"/>
|
1644
|
+
</xsl:otherwise>
|
1645
|
+
</xsl:choose>
|
1646
|
+
</xsl:variable>
|
1647
|
+
|
1632
1648
|
<!-- Note 1: Each xslt has declated variable `namespace` that allows to set some properties, processing logic, etc. for concrete xslt.
|
1633
1649
|
You can put such conditions by using xslt construction `xsl:if test="..."` or <xsl:choose><xsl:when test=""></xsl:when><xsl:otherwiste></xsl:otherwiste></xsl:choose>,
|
1634
1650
|
BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
|
@@ -2657,6 +2673,10 @@
|
|
2657
2673
|
|
2658
2674
|
</xsl:attribute-set>
|
2659
2675
|
|
2676
|
+
<xsl:template name="refine_figure-block-style">
|
2677
|
+
|
2678
|
+
</xsl:template>
|
2679
|
+
|
2660
2680
|
<xsl:attribute-set name="figure-style">
|
2661
2681
|
|
2662
2682
|
</xsl:attribute-set>
|
@@ -3609,7 +3629,7 @@
|
|
3609
3629
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
3610
3630
|
|
3611
3631
|
<xsl:variable name="colwidths">
|
3612
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
3632
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col']) and not(@class = 'dl')">
|
3613
3633
|
<xsl:call-template name="calculate-column-widths">
|
3614
3634
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3615
3635
|
<xsl:with-param name="table" select="$simple-table"/>
|
@@ -3727,6 +3747,11 @@
|
|
3727
3747
|
<fo:table-column column-width="{@width}"/>
|
3728
3748
|
</xsl:for-each>
|
3729
3749
|
</xsl:when>
|
3750
|
+
<xsl:when test="@class = 'dl'">
|
3751
|
+
<xsl:for-each select=".//*[local-name()='tr'][1]/*">
|
3752
|
+
<fo:table-column column-width="{@width}"/>
|
3753
|
+
</xsl:for-each>
|
3754
|
+
</xsl:when>
|
3730
3755
|
<xsl:otherwise>
|
3731
3756
|
<xsl:call-template name="insertTableColumnWidth">
|
3732
3757
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
@@ -5010,6 +5035,7 @@
|
|
5010
5035
|
<!-- ===================== -->
|
5011
5036
|
<!-- Definition List -->
|
5012
5037
|
<!-- ===================== -->
|
5038
|
+
|
5013
5039
|
<xsl:template match="*[local-name()='dl']">
|
5014
5040
|
<xsl:variable name="isAdded" select="@added"/>
|
5015
5041
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -5222,10 +5248,21 @@
|
|
5222
5248
|
</xsl:variable>
|
5223
5249
|
|
5224
5250
|
<xsl:variable name="colwidths">
|
5225
|
-
<xsl:
|
5226
|
-
|
5227
|
-
<xsl:
|
5228
|
-
|
5251
|
+
<xsl:choose>
|
5252
|
+
<!-- dl from table[@class='dl'] -->
|
5253
|
+
<xsl:when test="*[local-name() = 'colgroup']">
|
5254
|
+
<autolayout/>
|
5255
|
+
<xsl:for-each select="*[local-name() = 'colgroup']/*[local-name() = 'col']">
|
5256
|
+
<column><xsl:value-of select="translate(@width,'%m','')"/></column>
|
5257
|
+
</xsl:for-each>
|
5258
|
+
</xsl:when>
|
5259
|
+
<xsl:otherwise>
|
5260
|
+
<xsl:call-template name="calculate-column-widths">
|
5261
|
+
<xsl:with-param name="cols-count" select="2"/>
|
5262
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
5263
|
+
</xsl:call-template>
|
5264
|
+
</xsl:otherwise>
|
5265
|
+
</xsl:choose>
|
5229
5266
|
</xsl:variable>
|
5230
5267
|
|
5231
5268
|
<!-- <xsl:text disable-output-escaping="yes"><!- -</xsl:text>
|
@@ -7331,6 +7368,12 @@
|
|
7331
7368
|
<xsl:when test="@updatetype = 'true'">
|
7332
7369
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
7333
7370
|
</xsl:when>
|
7371
|
+
<xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
|
7372
|
+
<!-- link to the PDF attachment -->
|
7373
|
+
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
7374
|
+
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
7375
|
+
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
7376
|
+
</xsl:when>
|
7334
7377
|
<xsl:otherwise>
|
7335
7378
|
<xsl:value-of select="normalize-space(@target)"/>
|
7336
7379
|
</xsl:otherwise>
|
@@ -7744,6 +7787,7 @@
|
|
7744
7787
|
<xsl:variable name="isAdded" select="@added"/>
|
7745
7788
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
7746
7789
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
7790
|
+
<xsl:call-template name="refine_figure-block-style"/>
|
7747
7791
|
|
7748
7792
|
<xsl:call-template name="setTrackChangesStyles">
|
7749
7793
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
@@ -12150,10 +12194,10 @@
|
|
12150
12194
|
|
12151
12195
|
<xsl:template name="addPDFUAmeta">
|
12152
12196
|
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
12153
|
-
|
12154
|
-
|
12155
|
-
|
12156
|
-
|
12197
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
12198
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
12199
|
+
</pdf:dictionary>
|
12200
|
+
</pdf:catalog>
|
12157
12201
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
12158
12202
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
12159
12203
|
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
@@ -12205,6 +12249,19 @@
|
|
12205
12249
|
</rdf:Description>
|
12206
12250
|
</rdf:RDF>
|
12207
12251
|
</x:xmpmeta>
|
12252
|
+
<!-- add attachments -->
|
12253
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
12254
|
+
<xsl:choose>
|
12255
|
+
<xsl:when test="normalize-space() != ''">
|
12256
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{.}" filename="{@name}"/>
|
12257
|
+
</xsl:when>
|
12258
|
+
<xsl:otherwise>
|
12259
|
+
<!-- _{filename}_attachments -->
|
12260
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
|
12261
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{@name}"/>
|
12262
|
+
</xsl:otherwise>
|
12263
|
+
</xsl:choose>
|
12264
|
+
</xsl:for-each>
|
12208
12265
|
</xsl:template> <!-- addPDFUAmeta -->
|
12209
12266
|
|
12210
12267
|
<xsl:template name="getId">
|