metanorma-ogc 2.2.2.1 → 2.2.4
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/init.rb +5 -4
- data/lib/isodoc/ogc/metadata.rb +1 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +59 -12
- data/lib/isodoc/ogc/ogc.best-practice.xsl +59 -12
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +59 -12
- data/lib/isodoc/ogc/ogc.community-practice.xsl +59 -12
- data/lib/isodoc/ogc/ogc.community-standard.xsl +59 -12
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +59 -12
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +59 -12
- data/lib/isodoc/ogc/ogc.other.xsl +59 -12
- data/lib/isodoc/ogc/ogc.policy.xsl +59 -12
- data/lib/isodoc/ogc/ogc.reference-model.xsl +59 -12
- data/lib/isodoc/ogc/ogc.release-notes.xsl +59 -12
- data/lib/isodoc/ogc/ogc.standard.xsl +59 -12
- data/lib/isodoc/ogc/ogc.test-suite.xsl +59 -12
- data/lib/isodoc/ogc/ogc.user-guide.xsl +59 -12
- data/lib/isodoc/ogc/ogc.white-paper.xsl +59 -12
- data/lib/isodoc/ogc/word_convert.rb +5 -0
- data/lib/isodoc/ogc/xref.rb +0 -5
- data/lib/metanorma/ogc/biblio.rng +32 -1
- data/lib/metanorma/ogc/isodoc.rng +9 -0
- data/lib/metanorma/ogc/version.rb +1 -1
- data/lib/relaton/render/config.yml +1 -2
- data/metanorma-ogc.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7adf6c461b7ddc359300a52c69478423152abe1ab12aacf0daa4187d814a94dc
|
4
|
+
data.tar.gz: 21d7f093725809a37a91ca06f7c6ecb650c18b9bfd111bc93b4d8255a57aac55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de3a8519a85c8f430f9e175622618f9674a1d249f9b0a99a112be0ba7e2c84f3847ff0f8c975b849a1c07156a16584a592064a303fda786558d0fbfd5a5b0525
|
7
|
+
data.tar.gz: 5067835db0ef0a9686e75e028505141b542b022d52789c5b8f69b9d2f80e5d88832f36006310e97533f5bc2950315e21866a5dc573c0cba8761529817ab637bc
|
data/lib/isodoc/ogc/init.rb
CHANGED
@@ -6,8 +6,8 @@ require_relative "i18n"
|
|
6
6
|
module IsoDoc
|
7
7
|
module Ogc
|
8
8
|
module Init
|
9
|
-
def metadata_init(lang, script, labels)
|
10
|
-
@meta = Metadata.new(lang, script, labels)
|
9
|
+
def metadata_init(lang, script, locale, labels)
|
10
|
+
@meta = Metadata.new(lang, script, locale, labels)
|
11
11
|
end
|
12
12
|
|
13
13
|
def xref_init(lang, script, _klass, labels, options)
|
@@ -15,8 +15,9 @@ module IsoDoc
|
|
15
15
|
@xrefs = Xref.new(lang, script, html, labels, options)
|
16
16
|
end
|
17
17
|
|
18
|
-
def i18n_init(lang, script, i18nyaml = nil)
|
19
|
-
@i18n = I18n.new(lang, script,
|
18
|
+
def i18n_init(lang, script, locale, i18nyaml = nil)
|
19
|
+
@i18n = I18n.new(lang, script, locale: locale,
|
20
|
+
i18nyaml: i18nyaml || @i18nyaml)
|
20
21
|
end
|
21
22
|
|
22
23
|
def fileloc(loc)
|
data/lib/isodoc/ogc/metadata.rb
CHANGED
@@ -7392,6 +7392,18 @@
|
|
7392
7392
|
</xsl:copy>
|
7393
7393
|
</xsl:template>
|
7394
7394
|
|
7395
|
+
<xsl:template match="*[local-name() = 'sub']" mode="contents_item">
|
7396
|
+
<xsl:copy>
|
7397
|
+
<xsl:apply-templates mode="contents_item"/>
|
7398
|
+
</xsl:copy>
|
7399
|
+
</xsl:template>
|
7400
|
+
|
7401
|
+
<xsl:template match="*[local-name() = 'sup']" mode="contents_item">
|
7402
|
+
<xsl:copy>
|
7403
|
+
<xsl:apply-templates mode="contents_item"/>
|
7404
|
+
</xsl:copy>
|
7405
|
+
</xsl:template>
|
7406
|
+
|
7395
7407
|
<xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
7396
7408
|
<xsl:copy-of select="."/>
|
7397
7409
|
</xsl:template>
|
@@ -8372,7 +8384,7 @@
|
|
8372
8384
|
<!-- ====== -->
|
8373
8385
|
<!-- eref -->
|
8374
8386
|
<!-- ====== -->
|
8375
|
-
<xsl:template match="*[local-name() = 'eref']">
|
8387
|
+
<xsl:template match="*[local-name() = 'eref']" name="eref">
|
8376
8388
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
8377
8389
|
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
|
8378
8390
|
<xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
|
@@ -8874,21 +8886,29 @@
|
|
8874
8886
|
</xsl:variable>
|
8875
8887
|
|
8876
8888
|
<xsl:template match="@*|node()" mode="index_add_id">
|
8889
|
+
<xsl:param name="docid"/>
|
8877
8890
|
<xsl:copy>
|
8878
|
-
|
8891
|
+
<xsl:apply-templates select="@*|node()" mode="index_add_id">
|
8892
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8893
|
+
</xsl:apply-templates>
|
8879
8894
|
</xsl:copy>
|
8880
8895
|
</xsl:template>
|
8881
8896
|
|
8882
8897
|
<xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
|
8898
|
+
<xsl:param name="docid"/>
|
8883
8899
|
<xsl:variable name="id">
|
8884
|
-
<xsl:call-template name="generateIndexXrefId"
|
8900
|
+
<xsl:call-template name="generateIndexXrefId">
|
8901
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8902
|
+
</xsl:call-template>
|
8885
8903
|
</xsl:variable>
|
8886
8904
|
<xsl:copy> <!-- add id to xref -->
|
8887
8905
|
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
8888
8906
|
<xsl:attribute name="id">
|
8889
8907
|
<xsl:value-of select="$id"/>
|
8890
8908
|
</xsl:attribute>
|
8891
|
-
<xsl:apply-templates mode="index_add_id"
|
8909
|
+
<xsl:apply-templates mode="index_add_id">
|
8910
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8911
|
+
</xsl:apply-templates>
|
8892
8912
|
</xsl:copy>
|
8893
8913
|
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
8894
8914
|
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
@@ -8900,7 +8920,9 @@
|
|
8900
8920
|
<xsl:attribute name="id">
|
8901
8921
|
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
8902
8922
|
</xsl:attribute>
|
8903
|
-
<xsl:apply-templates mode="index_add_id"
|
8923
|
+
<xsl:apply-templates mode="index_add_id">
|
8924
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8925
|
+
</xsl:apply-templates>
|
8904
8926
|
</xsl:copy>
|
8905
8927
|
</xsl:if>
|
8906
8928
|
</xsl:template>
|
@@ -8937,12 +8959,33 @@
|
|
8937
8959
|
</xsl:when>
|
8938
8960
|
<xsl:when test="self::* and local-name(.) = 'xref'">
|
8939
8961
|
<xsl:variable name="id" select="@id"/>
|
8940
|
-
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
8941
|
-
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8942
|
-
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
8943
8962
|
|
8963
|
+
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8944
8964
|
<xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8945
|
-
|
8965
|
+
|
8966
|
+
<xsl:variable name="pages_">
|
8967
|
+
<xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
|
8968
|
+
<xsl:choose>
|
8969
|
+
<xsl:when test="@id = $id">
|
8970
|
+
<page><xsl:value-of select="."/></page>
|
8971
|
+
</xsl:when>
|
8972
|
+
<xsl:when test="@id = $id_next">
|
8973
|
+
<page_next><xsl:value-of select="."/></page_next>
|
8974
|
+
</xsl:when>
|
8975
|
+
<xsl:when test="@id = $id_prev">
|
8976
|
+
<page_prev><xsl:value-of select="."/></page_prev>
|
8977
|
+
</xsl:when>
|
8978
|
+
</xsl:choose>
|
8979
|
+
</xsl:for-each>
|
8980
|
+
</xsl:variable>
|
8981
|
+
<xsl:variable name="pages" select="xalan:nodeset($pages_)"/>
|
8982
|
+
|
8983
|
+
<!-- <xsl:variable name="page" select="$index/index/item[@id = $id]"/> -->
|
8984
|
+
<xsl:variable name="page" select="$pages/page"/>
|
8985
|
+
<!-- <xsl:variable name="page_next" select="$index/index/item[@id = $id_next]"/> -->
|
8986
|
+
<xsl:variable name="page_next" select="$pages/page_next"/>
|
8987
|
+
<!-- <xsl:variable name="page_prev" select="$index/index/item[@id = $id_prev]"/> -->
|
8988
|
+
<xsl:variable name="page_prev" select="$pages/page_prev"/>
|
8946
8989
|
|
8947
8990
|
<xsl:choose>
|
8948
8991
|
<!-- 2nd pass -->
|
@@ -9002,16 +9045,20 @@
|
|
9002
9045
|
</xsl:template>
|
9003
9046
|
|
9004
9047
|
<xsl:template name="generateIndexXrefId">
|
9048
|
+
<xsl:param name="docid"/>
|
9049
|
+
|
9005
9050
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
9006
9051
|
|
9007
|
-
<xsl:variable name="
|
9008
|
-
<xsl:
|
9052
|
+
<xsl:variable name="docid_curr">
|
9053
|
+
<xsl:value-of select="$docid"/>
|
9054
|
+
<xsl:if test="normalize-space($docid) = ''"><xsl:call-template name="getDocumentId"/></xsl:if>
|
9009
9055
|
</xsl:variable>
|
9056
|
+
|
9010
9057
|
<xsl:variable name="item_number">
|
9011
9058
|
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
|
9012
9059
|
</xsl:variable>
|
9013
9060
|
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
9014
|
-
<xsl:value-of select="concat($
|
9061
|
+
<xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
9015
9062
|
</xsl:template>
|
9016
9063
|
|
9017
9064
|
<xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'title']" priority="4">
|
@@ -7392,6 +7392,18 @@
|
|
7392
7392
|
</xsl:copy>
|
7393
7393
|
</xsl:template>
|
7394
7394
|
|
7395
|
+
<xsl:template match="*[local-name() = 'sub']" mode="contents_item">
|
7396
|
+
<xsl:copy>
|
7397
|
+
<xsl:apply-templates mode="contents_item"/>
|
7398
|
+
</xsl:copy>
|
7399
|
+
</xsl:template>
|
7400
|
+
|
7401
|
+
<xsl:template match="*[local-name() = 'sup']" mode="contents_item">
|
7402
|
+
<xsl:copy>
|
7403
|
+
<xsl:apply-templates mode="contents_item"/>
|
7404
|
+
</xsl:copy>
|
7405
|
+
</xsl:template>
|
7406
|
+
|
7395
7407
|
<xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
7396
7408
|
<xsl:copy-of select="."/>
|
7397
7409
|
</xsl:template>
|
@@ -8372,7 +8384,7 @@
|
|
8372
8384
|
<!-- ====== -->
|
8373
8385
|
<!-- eref -->
|
8374
8386
|
<!-- ====== -->
|
8375
|
-
<xsl:template match="*[local-name() = 'eref']">
|
8387
|
+
<xsl:template match="*[local-name() = 'eref']" name="eref">
|
8376
8388
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
8377
8389
|
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
|
8378
8390
|
<xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
|
@@ -8874,21 +8886,29 @@
|
|
8874
8886
|
</xsl:variable>
|
8875
8887
|
|
8876
8888
|
<xsl:template match="@*|node()" mode="index_add_id">
|
8889
|
+
<xsl:param name="docid"/>
|
8877
8890
|
<xsl:copy>
|
8878
|
-
|
8891
|
+
<xsl:apply-templates select="@*|node()" mode="index_add_id">
|
8892
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8893
|
+
</xsl:apply-templates>
|
8879
8894
|
</xsl:copy>
|
8880
8895
|
</xsl:template>
|
8881
8896
|
|
8882
8897
|
<xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
|
8898
|
+
<xsl:param name="docid"/>
|
8883
8899
|
<xsl:variable name="id">
|
8884
|
-
<xsl:call-template name="generateIndexXrefId"
|
8900
|
+
<xsl:call-template name="generateIndexXrefId">
|
8901
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8902
|
+
</xsl:call-template>
|
8885
8903
|
</xsl:variable>
|
8886
8904
|
<xsl:copy> <!-- add id to xref -->
|
8887
8905
|
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
8888
8906
|
<xsl:attribute name="id">
|
8889
8907
|
<xsl:value-of select="$id"/>
|
8890
8908
|
</xsl:attribute>
|
8891
|
-
<xsl:apply-templates mode="index_add_id"
|
8909
|
+
<xsl:apply-templates mode="index_add_id">
|
8910
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8911
|
+
</xsl:apply-templates>
|
8892
8912
|
</xsl:copy>
|
8893
8913
|
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
8894
8914
|
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
@@ -8900,7 +8920,9 @@
|
|
8900
8920
|
<xsl:attribute name="id">
|
8901
8921
|
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
8902
8922
|
</xsl:attribute>
|
8903
|
-
<xsl:apply-templates mode="index_add_id"
|
8923
|
+
<xsl:apply-templates mode="index_add_id">
|
8924
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8925
|
+
</xsl:apply-templates>
|
8904
8926
|
</xsl:copy>
|
8905
8927
|
</xsl:if>
|
8906
8928
|
</xsl:template>
|
@@ -8937,12 +8959,33 @@
|
|
8937
8959
|
</xsl:when>
|
8938
8960
|
<xsl:when test="self::* and local-name(.) = 'xref'">
|
8939
8961
|
<xsl:variable name="id" select="@id"/>
|
8940
|
-
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
8941
|
-
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8942
|
-
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
8943
8962
|
|
8963
|
+
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8944
8964
|
<xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8945
|
-
|
8965
|
+
|
8966
|
+
<xsl:variable name="pages_">
|
8967
|
+
<xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
|
8968
|
+
<xsl:choose>
|
8969
|
+
<xsl:when test="@id = $id">
|
8970
|
+
<page><xsl:value-of select="."/></page>
|
8971
|
+
</xsl:when>
|
8972
|
+
<xsl:when test="@id = $id_next">
|
8973
|
+
<page_next><xsl:value-of select="."/></page_next>
|
8974
|
+
</xsl:when>
|
8975
|
+
<xsl:when test="@id = $id_prev">
|
8976
|
+
<page_prev><xsl:value-of select="."/></page_prev>
|
8977
|
+
</xsl:when>
|
8978
|
+
</xsl:choose>
|
8979
|
+
</xsl:for-each>
|
8980
|
+
</xsl:variable>
|
8981
|
+
<xsl:variable name="pages" select="xalan:nodeset($pages_)"/>
|
8982
|
+
|
8983
|
+
<!-- <xsl:variable name="page" select="$index/index/item[@id = $id]"/> -->
|
8984
|
+
<xsl:variable name="page" select="$pages/page"/>
|
8985
|
+
<!-- <xsl:variable name="page_next" select="$index/index/item[@id = $id_next]"/> -->
|
8986
|
+
<xsl:variable name="page_next" select="$pages/page_next"/>
|
8987
|
+
<!-- <xsl:variable name="page_prev" select="$index/index/item[@id = $id_prev]"/> -->
|
8988
|
+
<xsl:variable name="page_prev" select="$pages/page_prev"/>
|
8946
8989
|
|
8947
8990
|
<xsl:choose>
|
8948
8991
|
<!-- 2nd pass -->
|
@@ -9002,16 +9045,20 @@
|
|
9002
9045
|
</xsl:template>
|
9003
9046
|
|
9004
9047
|
<xsl:template name="generateIndexXrefId">
|
9048
|
+
<xsl:param name="docid"/>
|
9049
|
+
|
9005
9050
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
9006
9051
|
|
9007
|
-
<xsl:variable name="
|
9008
|
-
<xsl:
|
9052
|
+
<xsl:variable name="docid_curr">
|
9053
|
+
<xsl:value-of select="$docid"/>
|
9054
|
+
<xsl:if test="normalize-space($docid) = ''"><xsl:call-template name="getDocumentId"/></xsl:if>
|
9009
9055
|
</xsl:variable>
|
9056
|
+
|
9010
9057
|
<xsl:variable name="item_number">
|
9011
9058
|
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
|
9012
9059
|
</xsl:variable>
|
9013
9060
|
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
9014
|
-
<xsl:value-of select="concat($
|
9061
|
+
<xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
9015
9062
|
</xsl:template>
|
9016
9063
|
|
9017
9064
|
<xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'title']" priority="4">
|
@@ -7392,6 +7392,18 @@
|
|
7392
7392
|
</xsl:copy>
|
7393
7393
|
</xsl:template>
|
7394
7394
|
|
7395
|
+
<xsl:template match="*[local-name() = 'sub']" mode="contents_item">
|
7396
|
+
<xsl:copy>
|
7397
|
+
<xsl:apply-templates mode="contents_item"/>
|
7398
|
+
</xsl:copy>
|
7399
|
+
</xsl:template>
|
7400
|
+
|
7401
|
+
<xsl:template match="*[local-name() = 'sup']" mode="contents_item">
|
7402
|
+
<xsl:copy>
|
7403
|
+
<xsl:apply-templates mode="contents_item"/>
|
7404
|
+
</xsl:copy>
|
7405
|
+
</xsl:template>
|
7406
|
+
|
7395
7407
|
<xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
7396
7408
|
<xsl:copy-of select="."/>
|
7397
7409
|
</xsl:template>
|
@@ -8372,7 +8384,7 @@
|
|
8372
8384
|
<!-- ====== -->
|
8373
8385
|
<!-- eref -->
|
8374
8386
|
<!-- ====== -->
|
8375
|
-
<xsl:template match="*[local-name() = 'eref']">
|
8387
|
+
<xsl:template match="*[local-name() = 'eref']" name="eref">
|
8376
8388
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
8377
8389
|
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
|
8378
8390
|
<xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
|
@@ -8874,21 +8886,29 @@
|
|
8874
8886
|
</xsl:variable>
|
8875
8887
|
|
8876
8888
|
<xsl:template match="@*|node()" mode="index_add_id">
|
8889
|
+
<xsl:param name="docid"/>
|
8877
8890
|
<xsl:copy>
|
8878
|
-
|
8891
|
+
<xsl:apply-templates select="@*|node()" mode="index_add_id">
|
8892
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8893
|
+
</xsl:apply-templates>
|
8879
8894
|
</xsl:copy>
|
8880
8895
|
</xsl:template>
|
8881
8896
|
|
8882
8897
|
<xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
|
8898
|
+
<xsl:param name="docid"/>
|
8883
8899
|
<xsl:variable name="id">
|
8884
|
-
<xsl:call-template name="generateIndexXrefId"
|
8900
|
+
<xsl:call-template name="generateIndexXrefId">
|
8901
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8902
|
+
</xsl:call-template>
|
8885
8903
|
</xsl:variable>
|
8886
8904
|
<xsl:copy> <!-- add id to xref -->
|
8887
8905
|
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
8888
8906
|
<xsl:attribute name="id">
|
8889
8907
|
<xsl:value-of select="$id"/>
|
8890
8908
|
</xsl:attribute>
|
8891
|
-
<xsl:apply-templates mode="index_add_id"
|
8909
|
+
<xsl:apply-templates mode="index_add_id">
|
8910
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8911
|
+
</xsl:apply-templates>
|
8892
8912
|
</xsl:copy>
|
8893
8913
|
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
8894
8914
|
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
@@ -8900,7 +8920,9 @@
|
|
8900
8920
|
<xsl:attribute name="id">
|
8901
8921
|
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
8902
8922
|
</xsl:attribute>
|
8903
|
-
<xsl:apply-templates mode="index_add_id"
|
8923
|
+
<xsl:apply-templates mode="index_add_id">
|
8924
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8925
|
+
</xsl:apply-templates>
|
8904
8926
|
</xsl:copy>
|
8905
8927
|
</xsl:if>
|
8906
8928
|
</xsl:template>
|
@@ -8937,12 +8959,33 @@
|
|
8937
8959
|
</xsl:when>
|
8938
8960
|
<xsl:when test="self::* and local-name(.) = 'xref'">
|
8939
8961
|
<xsl:variable name="id" select="@id"/>
|
8940
|
-
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
8941
|
-
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8942
|
-
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
8943
8962
|
|
8963
|
+
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8944
8964
|
<xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8945
|
-
|
8965
|
+
|
8966
|
+
<xsl:variable name="pages_">
|
8967
|
+
<xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
|
8968
|
+
<xsl:choose>
|
8969
|
+
<xsl:when test="@id = $id">
|
8970
|
+
<page><xsl:value-of select="."/></page>
|
8971
|
+
</xsl:when>
|
8972
|
+
<xsl:when test="@id = $id_next">
|
8973
|
+
<page_next><xsl:value-of select="."/></page_next>
|
8974
|
+
</xsl:when>
|
8975
|
+
<xsl:when test="@id = $id_prev">
|
8976
|
+
<page_prev><xsl:value-of select="."/></page_prev>
|
8977
|
+
</xsl:when>
|
8978
|
+
</xsl:choose>
|
8979
|
+
</xsl:for-each>
|
8980
|
+
</xsl:variable>
|
8981
|
+
<xsl:variable name="pages" select="xalan:nodeset($pages_)"/>
|
8982
|
+
|
8983
|
+
<!-- <xsl:variable name="page" select="$index/index/item[@id = $id]"/> -->
|
8984
|
+
<xsl:variable name="page" select="$pages/page"/>
|
8985
|
+
<!-- <xsl:variable name="page_next" select="$index/index/item[@id = $id_next]"/> -->
|
8986
|
+
<xsl:variable name="page_next" select="$pages/page_next"/>
|
8987
|
+
<!-- <xsl:variable name="page_prev" select="$index/index/item[@id = $id_prev]"/> -->
|
8988
|
+
<xsl:variable name="page_prev" select="$pages/page_prev"/>
|
8946
8989
|
|
8947
8990
|
<xsl:choose>
|
8948
8991
|
<!-- 2nd pass -->
|
@@ -9002,16 +9045,20 @@
|
|
9002
9045
|
</xsl:template>
|
9003
9046
|
|
9004
9047
|
<xsl:template name="generateIndexXrefId">
|
9048
|
+
<xsl:param name="docid"/>
|
9049
|
+
|
9005
9050
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
9006
9051
|
|
9007
|
-
<xsl:variable name="
|
9008
|
-
<xsl:
|
9052
|
+
<xsl:variable name="docid_curr">
|
9053
|
+
<xsl:value-of select="$docid"/>
|
9054
|
+
<xsl:if test="normalize-space($docid) = ''"><xsl:call-template name="getDocumentId"/></xsl:if>
|
9009
9055
|
</xsl:variable>
|
9056
|
+
|
9010
9057
|
<xsl:variable name="item_number">
|
9011
9058
|
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
|
9012
9059
|
</xsl:variable>
|
9013
9060
|
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
9014
|
-
<xsl:value-of select="concat($
|
9061
|
+
<xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
9015
9062
|
</xsl:template>
|
9016
9063
|
|
9017
9064
|
<xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'title']" priority="4">
|
@@ -7392,6 +7392,18 @@
|
|
7392
7392
|
</xsl:copy>
|
7393
7393
|
</xsl:template>
|
7394
7394
|
|
7395
|
+
<xsl:template match="*[local-name() = 'sub']" mode="contents_item">
|
7396
|
+
<xsl:copy>
|
7397
|
+
<xsl:apply-templates mode="contents_item"/>
|
7398
|
+
</xsl:copy>
|
7399
|
+
</xsl:template>
|
7400
|
+
|
7401
|
+
<xsl:template match="*[local-name() = 'sup']" mode="contents_item">
|
7402
|
+
<xsl:copy>
|
7403
|
+
<xsl:apply-templates mode="contents_item"/>
|
7404
|
+
</xsl:copy>
|
7405
|
+
</xsl:template>
|
7406
|
+
|
7395
7407
|
<xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
7396
7408
|
<xsl:copy-of select="."/>
|
7397
7409
|
</xsl:template>
|
@@ -8372,7 +8384,7 @@
|
|
8372
8384
|
<!-- ====== -->
|
8373
8385
|
<!-- eref -->
|
8374
8386
|
<!-- ====== -->
|
8375
|
-
<xsl:template match="*[local-name() = 'eref']">
|
8387
|
+
<xsl:template match="*[local-name() = 'eref']" name="eref">
|
8376
8388
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
8377
8389
|
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
|
8378
8390
|
<xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
|
@@ -8874,21 +8886,29 @@
|
|
8874
8886
|
</xsl:variable>
|
8875
8887
|
|
8876
8888
|
<xsl:template match="@*|node()" mode="index_add_id">
|
8889
|
+
<xsl:param name="docid"/>
|
8877
8890
|
<xsl:copy>
|
8878
|
-
|
8891
|
+
<xsl:apply-templates select="@*|node()" mode="index_add_id">
|
8892
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8893
|
+
</xsl:apply-templates>
|
8879
8894
|
</xsl:copy>
|
8880
8895
|
</xsl:template>
|
8881
8896
|
|
8882
8897
|
<xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
|
8898
|
+
<xsl:param name="docid"/>
|
8883
8899
|
<xsl:variable name="id">
|
8884
|
-
<xsl:call-template name="generateIndexXrefId"
|
8900
|
+
<xsl:call-template name="generateIndexXrefId">
|
8901
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8902
|
+
</xsl:call-template>
|
8885
8903
|
</xsl:variable>
|
8886
8904
|
<xsl:copy> <!-- add id to xref -->
|
8887
8905
|
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
8888
8906
|
<xsl:attribute name="id">
|
8889
8907
|
<xsl:value-of select="$id"/>
|
8890
8908
|
</xsl:attribute>
|
8891
|
-
<xsl:apply-templates mode="index_add_id"
|
8909
|
+
<xsl:apply-templates mode="index_add_id">
|
8910
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8911
|
+
</xsl:apply-templates>
|
8892
8912
|
</xsl:copy>
|
8893
8913
|
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
8894
8914
|
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
@@ -8900,7 +8920,9 @@
|
|
8900
8920
|
<xsl:attribute name="id">
|
8901
8921
|
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
8902
8922
|
</xsl:attribute>
|
8903
|
-
<xsl:apply-templates mode="index_add_id"
|
8923
|
+
<xsl:apply-templates mode="index_add_id">
|
8924
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8925
|
+
</xsl:apply-templates>
|
8904
8926
|
</xsl:copy>
|
8905
8927
|
</xsl:if>
|
8906
8928
|
</xsl:template>
|
@@ -8937,12 +8959,33 @@
|
|
8937
8959
|
</xsl:when>
|
8938
8960
|
<xsl:when test="self::* and local-name(.) = 'xref'">
|
8939
8961
|
<xsl:variable name="id" select="@id"/>
|
8940
|
-
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
8941
|
-
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8942
|
-
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
8943
8962
|
|
8963
|
+
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8944
8964
|
<xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8945
|
-
|
8965
|
+
|
8966
|
+
<xsl:variable name="pages_">
|
8967
|
+
<xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
|
8968
|
+
<xsl:choose>
|
8969
|
+
<xsl:when test="@id = $id">
|
8970
|
+
<page><xsl:value-of select="."/></page>
|
8971
|
+
</xsl:when>
|
8972
|
+
<xsl:when test="@id = $id_next">
|
8973
|
+
<page_next><xsl:value-of select="."/></page_next>
|
8974
|
+
</xsl:when>
|
8975
|
+
<xsl:when test="@id = $id_prev">
|
8976
|
+
<page_prev><xsl:value-of select="."/></page_prev>
|
8977
|
+
</xsl:when>
|
8978
|
+
</xsl:choose>
|
8979
|
+
</xsl:for-each>
|
8980
|
+
</xsl:variable>
|
8981
|
+
<xsl:variable name="pages" select="xalan:nodeset($pages_)"/>
|
8982
|
+
|
8983
|
+
<!-- <xsl:variable name="page" select="$index/index/item[@id = $id]"/> -->
|
8984
|
+
<xsl:variable name="page" select="$pages/page"/>
|
8985
|
+
<!-- <xsl:variable name="page_next" select="$index/index/item[@id = $id_next]"/> -->
|
8986
|
+
<xsl:variable name="page_next" select="$pages/page_next"/>
|
8987
|
+
<!-- <xsl:variable name="page_prev" select="$index/index/item[@id = $id_prev]"/> -->
|
8988
|
+
<xsl:variable name="page_prev" select="$pages/page_prev"/>
|
8946
8989
|
|
8947
8990
|
<xsl:choose>
|
8948
8991
|
<!-- 2nd pass -->
|
@@ -9002,16 +9045,20 @@
|
|
9002
9045
|
</xsl:template>
|
9003
9046
|
|
9004
9047
|
<xsl:template name="generateIndexXrefId">
|
9048
|
+
<xsl:param name="docid"/>
|
9049
|
+
|
9005
9050
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
9006
9051
|
|
9007
|
-
<xsl:variable name="
|
9008
|
-
<xsl:
|
9052
|
+
<xsl:variable name="docid_curr">
|
9053
|
+
<xsl:value-of select="$docid"/>
|
9054
|
+
<xsl:if test="normalize-space($docid) = ''"><xsl:call-template name="getDocumentId"/></xsl:if>
|
9009
9055
|
</xsl:variable>
|
9056
|
+
|
9010
9057
|
<xsl:variable name="item_number">
|
9011
9058
|
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
|
9012
9059
|
</xsl:variable>
|
9013
9060
|
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
9014
|
-
<xsl:value-of select="concat($
|
9061
|
+
<xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
9015
9062
|
</xsl:template>
|
9016
9063
|
|
9017
9064
|
<xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'title']" priority="4">
|