metanorma-ogc 2.2.3 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/automerge.yml +31 -0
- data/lib/isodoc/ogc/html/htmlstyle.css +1 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +42 -14
- data/lib/isodoc/ogc/ogc.best-practice.xsl +42 -14
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +42 -14
- data/lib/isodoc/ogc/ogc.community-practice.xsl +42 -14
- data/lib/isodoc/ogc/ogc.community-standard.xsl +42 -14
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +42 -14
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +42 -14
- data/lib/isodoc/ogc/ogc.other.xsl +42 -14
- data/lib/isodoc/ogc/ogc.policy.xsl +42 -14
- data/lib/isodoc/ogc/ogc.reference-model.xsl +42 -14
- data/lib/isodoc/ogc/ogc.release-notes.xsl +42 -14
- data/lib/isodoc/ogc/ogc.standard.xsl +42 -14
- data/lib/isodoc/ogc/ogc.test-suite.xsl +42 -14
- data/lib/isodoc/ogc/ogc.user-guide.xsl +42 -14
- data/lib/isodoc/ogc/ogc.white-paper.xsl +26 -9
- data/lib/isodoc/ogc/xref.rb +19 -19
- data/lib/metanorma/ogc/basicdoc.rng +0 -27
- data/lib/metanorma/ogc/biblio-standoc.rng +164 -0
- data/lib/metanorma/ogc/biblio.rng +45 -18
- data/lib/metanorma/ogc/isodoc.rng +31 -194
- data/lib/metanorma/ogc/ogc.rng +1 -74
- data/lib/metanorma/ogc/relaton-ogc.rng +82 -0
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +5 -2
@@ -2083,6 +2083,8 @@
|
|
2083
2083
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2084
2084
|
<xsl:attribute name="display-align">center</xsl:attribute>
|
2085
2085
|
|
2086
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
2087
|
+
<xsl:attribute name="padding-bottom">1mm</xsl:attribute>
|
2086
2088
|
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
2087
2089
|
|
2088
2090
|
</xsl:attribute-set> <!-- table-header-cell-style -->
|
@@ -3184,9 +3186,9 @@
|
|
3184
3186
|
|
3185
3187
|
<fo:block-container xsl:use-attribute-sets="table-container-style">
|
3186
3188
|
|
3187
|
-
<xsl:if test="ancestor::*[local-name()='sections']">
|
3189
|
+
<!-- <xsl:if test="ancestor::*[local-name()='sections']"> -->
|
3188
3190
|
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
3189
|
-
</xsl:if>
|
3191
|
+
<!-- </xsl:if> -->
|
3190
3192
|
|
3191
3193
|
<!-- end table block-container attributes -->
|
3192
3194
|
|
@@ -3960,9 +3962,12 @@
|
|
3960
3962
|
<fo:table-row xsl:use-attribute-sets="table-body-row-style">
|
3961
3963
|
|
3962
3964
|
<xsl:variable name="number"><xsl:number/></xsl:variable>
|
3963
|
-
<xsl:
|
3964
|
-
<xsl:
|
3965
|
-
|
3965
|
+
<xsl:attribute name="background-color">
|
3966
|
+
<xsl:choose>
|
3967
|
+
<xsl:when test="$number mod 2 = 0">rgb(252, 246, 222)</xsl:when>
|
3968
|
+
<xsl:otherwise>rgb(254, 252, 245)</xsl:otherwise>
|
3969
|
+
</xsl:choose>
|
3970
|
+
</xsl:attribute>
|
3966
3971
|
|
3967
3972
|
<xsl:call-template name="setTableRowAttributes"/>
|
3968
3973
|
<xsl:apply-templates/>
|
@@ -3983,6 +3988,12 @@
|
|
3983
3988
|
<xsl:with-param name="default">center</xsl:with-param>
|
3984
3989
|
</xsl:call-template>
|
3985
3990
|
|
3991
|
+
<xsl:if test="starts-with(ancestor::*[local-name() = 'table'][1]/@type, 'recommend') and normalize-space(@align) = ''">
|
3992
|
+
<xsl:call-template name="setTextAlignment">
|
3993
|
+
<xsl:with-param name="default">left</xsl:with-param>
|
3994
|
+
</xsl:call-template>
|
3995
|
+
</xsl:if>
|
3996
|
+
|
3986
3997
|
<xsl:if test="$lang = 'ar'">
|
3987
3998
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3988
3999
|
</xsl:if>
|
@@ -4994,8 +5005,10 @@
|
|
4994
5005
|
|
4995
5006
|
<!-- 10 -->
|
4996
5007
|
|
4997
|
-
|
4998
|
-
|
5008
|
+
<xsl:choose>
|
5009
|
+
<xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
|
5010
|
+
<xsl:otherwise>9.5</xsl:otherwise>
|
5011
|
+
</xsl:choose>
|
4999
5012
|
|
5000
5013
|
</xsl:variable>
|
5001
5014
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -5013,8 +5026,17 @@
|
|
5013
5026
|
</fo:inline>
|
5014
5027
|
</xsl:template> <!-- tt -->
|
5015
5028
|
|
5029
|
+
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
|
5016
5030
|
<xsl:template match="*[local-name()='tt']/text()" priority="2">
|
5017
|
-
<xsl:
|
5031
|
+
<xsl:choose>
|
5032
|
+
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
|
5033
|
+
<!-- url -->
|
5034
|
+
<xsl:call-template name="add-zero-spaces-link-java"/>
|
5035
|
+
</xsl:when>
|
5036
|
+
<xsl:otherwise>
|
5037
|
+
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
5038
|
+
</xsl:otherwise>
|
5039
|
+
</xsl:choose>
|
5018
5040
|
</xsl:template>
|
5019
5041
|
|
5020
5042
|
<xsl:template match="*[local-name()='underline']">
|
@@ -5370,8 +5392,11 @@
|
|
5370
5392
|
|
5371
5393
|
<xsl:template name="add-zero-spaces-link-java">
|
5372
5394
|
<xsl:param name="text" select="."/>
|
5395
|
+
|
5396
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
|
5397
|
+
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
5373
5398
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
5374
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($
|
5399
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1')"/>
|
5375
5400
|
</xsl:template>
|
5376
5401
|
|
5377
5402
|
<!-- add zero space after dash character (for table's entries) -->
|
@@ -7483,8 +7508,10 @@
|
|
7483
7508
|
<xsl:if test="$current_template = 'standard'">8</xsl:if>
|
7484
7509
|
</xsl:if> -->
|
7485
7510
|
|
7486
|
-
|
7487
|
-
|
7511
|
+
<xsl:choose>
|
7512
|
+
<xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
|
7513
|
+
<xsl:otherwise>9.5</xsl:otherwise>
|
7514
|
+
</xsl:choose>
|
7488
7515
|
|
7489
7516
|
</xsl:variable>
|
7490
7517
|
|
@@ -8031,7 +8058,8 @@
|
|
8031
8058
|
<xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
8032
8059
|
<fo:block font-size="11pt">
|
8033
8060
|
|
8034
|
-
<xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute>
|
8061
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute> -->
|
8062
|
+
<xsl:attribute name="color">white</xsl:attribute>
|
8035
8063
|
|
8036
8064
|
<xsl:apply-templates/>
|
8037
8065
|
</fo:block>
|
@@ -8384,7 +8412,7 @@
|
|
8384
8412
|
<!-- ====== -->
|
8385
8413
|
<!-- eref -->
|
8386
8414
|
<!-- ====== -->
|
8387
|
-
<xsl:template match="*[local-name() = 'eref']">
|
8415
|
+
<xsl:template match="*[local-name() = 'eref']" name="eref">
|
8388
8416
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
8389
8417
|
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
|
8390
8418
|
<xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
|
@@ -9837,7 +9865,7 @@
|
|
9837
9865
|
|
9838
9866
|
<xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
|
9839
9867
|
|
9840
|
-
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or
|
9868
|
+
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
9841
9869
|
|
9842
9870
|
<!-- enclose standard's number into tag 'keep-together_within-line' -->
|
9843
9871
|
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
@@ -2083,6 +2083,8 @@
|
|
2083
2083
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2084
2084
|
<xsl:attribute name="display-align">center</xsl:attribute>
|
2085
2085
|
|
2086
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
2087
|
+
<xsl:attribute name="padding-bottom">1mm</xsl:attribute>
|
2086
2088
|
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
2087
2089
|
|
2088
2090
|
</xsl:attribute-set> <!-- table-header-cell-style -->
|
@@ -3184,9 +3186,9 @@
|
|
3184
3186
|
|
3185
3187
|
<fo:block-container xsl:use-attribute-sets="table-container-style">
|
3186
3188
|
|
3187
|
-
<xsl:if test="ancestor::*[local-name()='sections']">
|
3189
|
+
<!-- <xsl:if test="ancestor::*[local-name()='sections']"> -->
|
3188
3190
|
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
3189
|
-
</xsl:if>
|
3191
|
+
<!-- </xsl:if> -->
|
3190
3192
|
|
3191
3193
|
<!-- end table block-container attributes -->
|
3192
3194
|
|
@@ -3960,9 +3962,12 @@
|
|
3960
3962
|
<fo:table-row xsl:use-attribute-sets="table-body-row-style">
|
3961
3963
|
|
3962
3964
|
<xsl:variable name="number"><xsl:number/></xsl:variable>
|
3963
|
-
<xsl:
|
3964
|
-
<xsl:
|
3965
|
-
|
3965
|
+
<xsl:attribute name="background-color">
|
3966
|
+
<xsl:choose>
|
3967
|
+
<xsl:when test="$number mod 2 = 0">rgb(252, 246, 222)</xsl:when>
|
3968
|
+
<xsl:otherwise>rgb(254, 252, 245)</xsl:otherwise>
|
3969
|
+
</xsl:choose>
|
3970
|
+
</xsl:attribute>
|
3966
3971
|
|
3967
3972
|
<xsl:call-template name="setTableRowAttributes"/>
|
3968
3973
|
<xsl:apply-templates/>
|
@@ -3983,6 +3988,12 @@
|
|
3983
3988
|
<xsl:with-param name="default">center</xsl:with-param>
|
3984
3989
|
</xsl:call-template>
|
3985
3990
|
|
3991
|
+
<xsl:if test="starts-with(ancestor::*[local-name() = 'table'][1]/@type, 'recommend') and normalize-space(@align) = ''">
|
3992
|
+
<xsl:call-template name="setTextAlignment">
|
3993
|
+
<xsl:with-param name="default">left</xsl:with-param>
|
3994
|
+
</xsl:call-template>
|
3995
|
+
</xsl:if>
|
3996
|
+
|
3986
3997
|
<xsl:if test="$lang = 'ar'">
|
3987
3998
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3988
3999
|
</xsl:if>
|
@@ -4994,8 +5005,10 @@
|
|
4994
5005
|
|
4995
5006
|
<!-- 10 -->
|
4996
5007
|
|
4997
|
-
|
4998
|
-
|
5008
|
+
<xsl:choose>
|
5009
|
+
<xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
|
5010
|
+
<xsl:otherwise>9.5</xsl:otherwise>
|
5011
|
+
</xsl:choose>
|
4999
5012
|
|
5000
5013
|
</xsl:variable>
|
5001
5014
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -5013,8 +5026,17 @@
|
|
5013
5026
|
</fo:inline>
|
5014
5027
|
</xsl:template> <!-- tt -->
|
5015
5028
|
|
5029
|
+
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
|
5016
5030
|
<xsl:template match="*[local-name()='tt']/text()" priority="2">
|
5017
|
-
<xsl:
|
5031
|
+
<xsl:choose>
|
5032
|
+
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
|
5033
|
+
<!-- url -->
|
5034
|
+
<xsl:call-template name="add-zero-spaces-link-java"/>
|
5035
|
+
</xsl:when>
|
5036
|
+
<xsl:otherwise>
|
5037
|
+
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
5038
|
+
</xsl:otherwise>
|
5039
|
+
</xsl:choose>
|
5018
5040
|
</xsl:template>
|
5019
5041
|
|
5020
5042
|
<xsl:template match="*[local-name()='underline']">
|
@@ -5370,8 +5392,11 @@
|
|
5370
5392
|
|
5371
5393
|
<xsl:template name="add-zero-spaces-link-java">
|
5372
5394
|
<xsl:param name="text" select="."/>
|
5395
|
+
|
5396
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
|
5397
|
+
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
5373
5398
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
5374
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($
|
5399
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1')"/>
|
5375
5400
|
</xsl:template>
|
5376
5401
|
|
5377
5402
|
<!-- add zero space after dash character (for table's entries) -->
|
@@ -7483,8 +7508,10 @@
|
|
7483
7508
|
<xsl:if test="$current_template = 'standard'">8</xsl:if>
|
7484
7509
|
</xsl:if> -->
|
7485
7510
|
|
7486
|
-
|
7487
|
-
|
7511
|
+
<xsl:choose>
|
7512
|
+
<xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
|
7513
|
+
<xsl:otherwise>9.5</xsl:otherwise>
|
7514
|
+
</xsl:choose>
|
7488
7515
|
|
7489
7516
|
</xsl:variable>
|
7490
7517
|
|
@@ -8031,7 +8058,8 @@
|
|
8031
8058
|
<xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
8032
8059
|
<fo:block font-size="11pt">
|
8033
8060
|
|
8034
|
-
<xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute>
|
8061
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute> -->
|
8062
|
+
<xsl:attribute name="color">white</xsl:attribute>
|
8035
8063
|
|
8036
8064
|
<xsl:apply-templates/>
|
8037
8065
|
</fo:block>
|
@@ -8384,7 +8412,7 @@
|
|
8384
8412
|
<!-- ====== -->
|
8385
8413
|
<!-- eref -->
|
8386
8414
|
<!-- ====== -->
|
8387
|
-
<xsl:template match="*[local-name() = 'eref']">
|
8415
|
+
<xsl:template match="*[local-name() = 'eref']" name="eref">
|
8388
8416
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
8389
8417
|
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
|
8390
8418
|
<xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
|
@@ -9837,7 +9865,7 @@
|
|
9837
9865
|
|
9838
9866
|
<xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
|
9839
9867
|
|
9840
|
-
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or
|
9868
|
+
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
9841
9869
|
|
9842
9870
|
<!-- enclose standard's number into tag 'keep-together_within-line' -->
|
9843
9871
|
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
@@ -4192,8 +4192,10 @@
|
|
4192
4192
|
|
4193
4193
|
<!-- 10 -->
|
4194
4194
|
|
4195
|
-
|
4196
|
-
|
4195
|
+
<xsl:choose>
|
4196
|
+
<xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
|
4197
|
+
<xsl:otherwise>9.5</xsl:otherwise>
|
4198
|
+
</xsl:choose>
|
4197
4199
|
|
4198
4200
|
</xsl:variable>
|
4199
4201
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -4211,8 +4213,17 @@
|
|
4211
4213
|
</fo:inline>
|
4212
4214
|
</xsl:template> <!-- tt -->
|
4213
4215
|
|
4216
|
+
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
|
4214
4217
|
<xsl:template match="*[local-name()='tt']/text()" priority="2">
|
4215
|
-
<xsl:
|
4218
|
+
<xsl:choose>
|
4219
|
+
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
|
4220
|
+
<!-- url -->
|
4221
|
+
<xsl:call-template name="add-zero-spaces-link-java"/>
|
4222
|
+
</xsl:when>
|
4223
|
+
<xsl:otherwise>
|
4224
|
+
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
4225
|
+
</xsl:otherwise>
|
4226
|
+
</xsl:choose>
|
4216
4227
|
</xsl:template>
|
4217
4228
|
|
4218
4229
|
<xsl:template match="*[local-name()='underline']">
|
@@ -4568,8 +4579,11 @@
|
|
4568
4579
|
|
4569
4580
|
<xsl:template name="add-zero-spaces-link-java">
|
4570
4581
|
<xsl:param name="text" select="."/>
|
4582
|
+
|
4583
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
|
4584
|
+
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
4571
4585
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
4572
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($
|
4586
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1')"/>
|
4573
4587
|
</xsl:template>
|
4574
4588
|
|
4575
4589
|
<!-- add zero space after dash character (for table's entries) -->
|
@@ -6650,8 +6664,10 @@
|
|
6650
6664
|
<xsl:if test="$current_template = 'standard'">8</xsl:if>
|
6651
6665
|
</xsl:if> -->
|
6652
6666
|
|
6653
|
-
|
6654
|
-
|
6667
|
+
<xsl:choose>
|
6668
|
+
<xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
|
6669
|
+
<xsl:otherwise>9.5</xsl:otherwise>
|
6670
|
+
</xsl:choose>
|
6655
6671
|
|
6656
6672
|
</xsl:variable>
|
6657
6673
|
|
@@ -7190,7 +7206,8 @@
|
|
7190
7206
|
<xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
7191
7207
|
<fo:block font-size="11pt">
|
7192
7208
|
|
7193
|
-
<xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute>
|
7209
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute> -->
|
7210
|
+
<xsl:attribute name="color">white</xsl:attribute>
|
7194
7211
|
|
7195
7212
|
<xsl:apply-templates/>
|
7196
7213
|
</fo:block>
|
@@ -7543,7 +7560,7 @@
|
|
7543
7560
|
<!-- ====== -->
|
7544
7561
|
<!-- eref -->
|
7545
7562
|
<!-- ====== -->
|
7546
|
-
<xsl:template match="*[local-name() = 'eref']">
|
7563
|
+
<xsl:template match="*[local-name() = 'eref']" name="eref">
|
7547
7564
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
7548
7565
|
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
|
7549
7566
|
<xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
|
@@ -9003,7 +9020,7 @@
|
|
9003
9020
|
|
9004
9021
|
<xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
|
9005
9022
|
|
9006
|
-
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or
|
9023
|
+
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
9007
9024
|
|
9008
9025
|
<!-- enclose standard's number into tag 'keep-together_within-line' -->
|
9009
9026
|
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
data/lib/isodoc/ogc/xref.rb
CHANGED
@@ -6,17 +6,17 @@ module IsoDoc
|
|
6
6
|
class Xref < IsoDoc::Xref
|
7
7
|
def initial_anchor_names(doc)
|
8
8
|
if @parse_settings.empty? || @parse_settings[:clauses]
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
9
|
+
preface_anchor_names(doc)
|
10
|
+
n = Counter.new
|
11
|
+
n = section_names(doc.at(ns("//clause[@type = 'scope']")), n, 1)
|
12
|
+
n = section_names(doc.at(ns("//clause[@type = 'conformance']")), n, 1)
|
13
|
+
n = section_names(doc.at(ns(@klass.norm_ref_xpath)), n, 1)
|
14
|
+
n = section_names(
|
15
|
+
doc.at(ns("//sections/terms | //sections/clause[descendant::terms]")),
|
16
|
+
n, 1
|
17
|
+
)
|
18
|
+
n = section_names(doc.at(ns("//sections/definitions")), n, 1)
|
19
|
+
clause_names(doc, n)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -29,23 +29,23 @@ module IsoDoc
|
|
29
29
|
"//introduction"].each do |path|
|
30
30
|
preface_names_numbered(doc.at(ns(path)))
|
31
31
|
end
|
32
|
-
doc.xpath(ns("//preface/clause[not(@type = 'keywords' or "\
|
33
|
-
"@type = 'submitting_orgs' or @type = 'security' or "\
|
32
|
+
doc.xpath(ns("//preface/clause[not(@type = 'keywords' or " \
|
33
|
+
"@type = 'submitting_orgs' or @type = 'security' or " \
|
34
34
|
"@type = 'executivesummary')]"))
|
35
35
|
.each { |c| preface_names_numbered(c) }
|
36
36
|
preface_names_numbered(doc.at(ns("//acknowledgements")))
|
37
37
|
sequential_asset_names(
|
38
|
-
doc.xpath(ns("//preface/abstract | //foreword | //introduction | "\
|
38
|
+
doc.xpath(ns("//preface/abstract | //foreword | //introduction | " \
|
39
39
|
"//submitters | //acknowledgements | //preface/clause")),
|
40
40
|
)
|
41
41
|
end
|
42
42
|
|
43
43
|
def middle_section_asset_names(doc)
|
44
44
|
middle_sections =
|
45
|
-
"//clause[@type = 'scope' or @type = 'conformance'] | //foreword | "\
|
46
|
-
"//introduction | //preface/abstract | //submitters | "\
|
47
|
-
"//acknowledgements | //preface/clause | "\
|
48
|
-
"
|
45
|
+
"//clause[@type = 'scope' or @type = 'conformance'] | //foreword | " \
|
46
|
+
"//introduction | //preface/abstract | //submitters | " \
|
47
|
+
"//acknowledgements | //preface/clause | " \
|
48
|
+
"#{@klass.norm_ref_xpath} | //sections/terms | " \
|
49
49
|
"//sections/definitions | //clause[parent::sections]"
|
50
50
|
sequential_asset_names(doc.xpath(ns(middle_sections)))
|
51
51
|
end
|
@@ -57,7 +57,7 @@ module IsoDoc
|
|
57
57
|
pref = preface_number(@prefacenum, 1)
|
58
58
|
@anchors[clause["id"]] =
|
59
59
|
{ label: pref,
|
60
|
-
level: 1, xref:
|
60
|
+
level: 1, xref: clause_title(clause), type: "clause" }
|
61
61
|
clause.xpath(ns(SUBCLAUSES)).each_with_index do |c, i|
|
62
62
|
preface_names_numbered1(c, "#{pref}.#{preface_number(i + 1, 2)}", 2)
|
63
63
|
end
|
@@ -1,10 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
|
-
<include href="biblio.rng">
|
4
|
-
<start>
|
5
|
-
<ref name="document"/>
|
6
|
-
</start>
|
7
|
-
</include>
|
8
3
|
<define name="document">
|
9
4
|
<element name="document">
|
10
5
|
<optional>
|
@@ -1125,26 +1120,4 @@
|
|
1125
1120
|
</zeroOrMore>
|
1126
1121
|
</element>
|
1127
1122
|
</define>
|
1128
|
-
<define name="ext">
|
1129
|
-
<element name="ext">
|
1130
|
-
<ref name="BibDataExtensionType"/>
|
1131
|
-
</element>
|
1132
|
-
</define>
|
1133
|
-
<define name="BibDataExtensionType">
|
1134
|
-
<ref name="doctype"/>
|
1135
|
-
</define>
|
1136
|
-
<define name="doctype">
|
1137
|
-
<element name="doctype">
|
1138
|
-
<ref name="DocumentType"/>
|
1139
|
-
</element>
|
1140
|
-
</define>
|
1141
|
-
<define name="DocumentType">
|
1142
|
-
<value>document</value>
|
1143
|
-
</define>
|
1144
|
-
<define name="BibData">
|
1145
|
-
<ref name="BibliographicItem"/>
|
1146
|
-
<optional>
|
1147
|
-
<ref name="ext"/>
|
1148
|
-
</optional>
|
1149
|
-
</define>
|
1150
1123
|
</grammar>
|
@@ -0,0 +1,164 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
|
3
|
+
<!--
|
4
|
+
Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
|
5
|
+
of relaton
|
6
|
+
|
7
|
+
Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
|
8
|
+
(SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
|
9
|
+
-->
|
10
|
+
<include href="biblio.rng">
|
11
|
+
<define name="BibData">
|
12
|
+
<ref name="BibliographicItem"/>
|
13
|
+
<optional>
|
14
|
+
<ref name="ext"/>
|
15
|
+
</optional>
|
16
|
+
</define>
|
17
|
+
</include>
|
18
|
+
<define name="ext">
|
19
|
+
<element name="ext">
|
20
|
+
<ref name="BibDataExtensionType"/>
|
21
|
+
</element>
|
22
|
+
</define>
|
23
|
+
<define name="BibDataExtensionType">
|
24
|
+
<optional>
|
25
|
+
<attribute name="schema-version"/>
|
26
|
+
</optional>
|
27
|
+
<ref name="doctype"/>
|
28
|
+
<optional>
|
29
|
+
<ref name="docsubtype"/>
|
30
|
+
</optional>
|
31
|
+
<optional>
|
32
|
+
<ref name="editorialgroup"/>
|
33
|
+
</optional>
|
34
|
+
<zeroOrMore>
|
35
|
+
<ref name="ics"/>
|
36
|
+
</zeroOrMore>
|
37
|
+
<zeroOrMore>
|
38
|
+
<ref name="structuredidentifier"/>
|
39
|
+
</zeroOrMore>
|
40
|
+
</define>
|
41
|
+
<define name="doctype">
|
42
|
+
<element name="doctype">
|
43
|
+
<optional>
|
44
|
+
<attribute name="abbreviation"/>
|
45
|
+
</optional>
|
46
|
+
<ref name="DocumentType"/>
|
47
|
+
</element>
|
48
|
+
</define>
|
49
|
+
<define name="DocumentType">
|
50
|
+
<value>document</value>
|
51
|
+
</define>
|
52
|
+
<define name="docsubtype">
|
53
|
+
<element name="subdoctype">
|
54
|
+
<ref name="DocumentSubtype"/>
|
55
|
+
</element>
|
56
|
+
</define>
|
57
|
+
<define name="DocumentSubtype">
|
58
|
+
<text/>
|
59
|
+
</define>
|
60
|
+
<define name="editorialgroup">
|
61
|
+
<element name="editorialgroup">
|
62
|
+
<oneOrMore>
|
63
|
+
<ref name="technical-committee"/>
|
64
|
+
</oneOrMore>
|
65
|
+
</element>
|
66
|
+
</define>
|
67
|
+
<define name="technical-committee">
|
68
|
+
<element name="technical-committee">
|
69
|
+
<ref name="IsoWorkgroup"/>
|
70
|
+
</element>
|
71
|
+
</define>
|
72
|
+
<define name="IsoWorkgroup">
|
73
|
+
<optional>
|
74
|
+
<attribute name="number"/>
|
75
|
+
</optional>
|
76
|
+
<optional>
|
77
|
+
<attribute name="type"/>
|
78
|
+
</optional>
|
79
|
+
<optional>
|
80
|
+
<attribute name="identifier"/>
|
81
|
+
</optional>
|
82
|
+
<optional>
|
83
|
+
<attribute name="prefix"/>
|
84
|
+
</optional>
|
85
|
+
<text/>
|
86
|
+
</define>
|
87
|
+
<define name="ics">
|
88
|
+
<element name="ics">
|
89
|
+
<element name="code">
|
90
|
+
<text/>
|
91
|
+
</element>
|
92
|
+
<optional>
|
93
|
+
<element name="text">
|
94
|
+
<text/>
|
95
|
+
</element>
|
96
|
+
</optional>
|
97
|
+
</element>
|
98
|
+
</define>
|
99
|
+
<define name="structuredidentifier">
|
100
|
+
<element name="structuredidentifier">
|
101
|
+
<optional>
|
102
|
+
<attribute name="type"/>
|
103
|
+
</optional>
|
104
|
+
<oneOrMore>
|
105
|
+
<element name="agency">
|
106
|
+
<text/>
|
107
|
+
</element>
|
108
|
+
</oneOrMore>
|
109
|
+
<optional>
|
110
|
+
<element name="class">
|
111
|
+
<text/>
|
112
|
+
</element>
|
113
|
+
</optional>
|
114
|
+
<element name="docnumber">
|
115
|
+
<text/>
|
116
|
+
</element>
|
117
|
+
<optional>
|
118
|
+
<element name="partnumber">
|
119
|
+
<text/>
|
120
|
+
</element>
|
121
|
+
</optional>
|
122
|
+
<optional>
|
123
|
+
<element name="edition">
|
124
|
+
<text/>
|
125
|
+
</element>
|
126
|
+
</optional>
|
127
|
+
<optional>
|
128
|
+
<element name="version">
|
129
|
+
<text/>
|
130
|
+
</element>
|
131
|
+
</optional>
|
132
|
+
<optional>
|
133
|
+
<element name="supplementtype">
|
134
|
+
<text/>
|
135
|
+
</element>
|
136
|
+
</optional>
|
137
|
+
<optional>
|
138
|
+
<element name="supplementnumber">
|
139
|
+
<text/>
|
140
|
+
</element>
|
141
|
+
</optional>
|
142
|
+
<optional>
|
143
|
+
<element name="amendment">
|
144
|
+
<text/>
|
145
|
+
</element>
|
146
|
+
</optional>
|
147
|
+
<optional>
|
148
|
+
<element name="corrigendum">
|
149
|
+
<text/>
|
150
|
+
</element>
|
151
|
+
</optional>
|
152
|
+
<optional>
|
153
|
+
<element name="language">
|
154
|
+
<text/>
|
155
|
+
</element>
|
156
|
+
</optional>
|
157
|
+
<optional>
|
158
|
+
<element name="year">
|
159
|
+
<text/>
|
160
|
+
</element>
|
161
|
+
</optional>
|
162
|
+
</element>
|
163
|
+
</define>
|
164
|
+
</grammar>
|