metanorma-ogc 2.2.5 → 2.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/ogc/html/htmlstyle.css +6 -0
  3. data/lib/isodoc/ogc/html/htmlstyle.scss +1 -0
  4. data/lib/isodoc/ogc/metadata.rb +7 -6
  5. data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +122 -16
  6. data/lib/isodoc/ogc/ogc.best-practice.xsl +122 -16
  7. data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +122 -16
  8. data/lib/isodoc/ogc/ogc.community-practice.xsl +122 -16
  9. data/lib/isodoc/ogc/ogc.community-standard.xsl +122 -16
  10. data/lib/isodoc/ogc/ogc.discussion-paper.xsl +122 -16
  11. data/lib/isodoc/ogc/ogc.draft-standard.xsl +10902 -0
  12. data/lib/isodoc/ogc/ogc.engineering-report.xsl +122 -16
  13. data/lib/isodoc/ogc/ogc.other.xsl +122 -16
  14. data/lib/isodoc/ogc/ogc.policy.xsl +122 -16
  15. data/lib/isodoc/ogc/ogc.reference-model.xsl +122 -16
  16. data/lib/isodoc/ogc/ogc.release-notes.xsl +122 -16
  17. data/lib/isodoc/ogc/ogc.standard.xsl +122 -16
  18. data/lib/isodoc/ogc/ogc.test-suite.xsl +122 -16
  19. data/lib/isodoc/ogc/ogc.user-guide.xsl +122 -16
  20. data/lib/isodoc/ogc/ogc.white-paper.xsl +120 -15
  21. data/lib/isodoc/ogc/pdf_convert.rb +5 -4
  22. data/lib/isodoc/ogc/presentation_xml_convert.rb +5 -5
  23. data/lib/metanorma/ogc/biblio.rng +5 -0
  24. data/lib/metanorma/ogc/cleanup.rb +14 -14
  25. data/lib/metanorma/ogc/converter.rb +2 -2
  26. data/lib/metanorma/ogc/front.rb +12 -8
  27. data/lib/metanorma/ogc/isodoc.rng +46 -12
  28. data/lib/metanorma/ogc/relaton-ogc.rng +1 -0
  29. data/lib/metanorma/ogc/validate.rb +15 -15
  30. data/lib/metanorma/ogc/version.rb +1 -1
  31. data/metanorma-ogc.gemspec +3 -2
  32. metadata +5 -11
  33. data/.github/workflows/automerge.yml +0 -31
  34. data/.github/workflows/rake.yml +0 -15
  35. data/.github/workflows/release.yml +0 -24
  36. data/Rakefile +0 -8
  37. data/bin/console +0 -14
  38. data/bin/rspec +0 -17
  39. data/bin/setup +0 -8
@@ -1143,7 +1143,7 @@
1143
1143
  <xsl:template name="insertHeaderFooter">
1144
1144
  <xsl:param name="color" select="$color_blue"/>
1145
1145
  <fo:static-content flow-name="footer" role="artifact">
1146
- <fo:block-container font-size="8pt" height="100%" color="{$color}" padding-top="6mm">
1146
+ <fo:block-container font-size="8pt" color="{$color}" padding-top="6mm">
1147
1147
  <fo:table table-layout="fixed" width="100%">
1148
1148
  <fo:table-column column-width="90%"/>
1149
1149
  <fo:table-column column-width="10%"/>
@@ -1883,6 +1883,15 @@
1883
1883
 
1884
1884
  </xsl:attribute-set>
1885
1885
 
1886
+ <xsl:attribute-set name="pre-style">
1887
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1888
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1889
+
1890
+ <xsl:attribute name="font-family">Fira Code, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1891
+ <xsl:attribute name="line-height">113%</xsl:attribute>
1892
+
1893
+ </xsl:attribute-set>
1894
+
1886
1895
  <xsl:attribute-set name="permission-style">
1887
1896
 
1888
1897
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
@@ -2026,6 +2035,11 @@
2026
2035
  </xsl:variable>
2027
2036
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
2028
2037
 
2038
+ <xsl:variable name="table-cell-border_">
2039
+
2040
+ </xsl:variable>
2041
+ <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
2042
+
2029
2043
  <xsl:attribute-set name="table-container-style">
2030
2044
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2031
2045
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -2037,8 +2051,6 @@
2037
2051
  <xsl:attribute-set name="table-style">
2038
2052
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
2039
2053
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
2040
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2041
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2042
2054
 
2043
2055
  </xsl:attribute-set><!-- table-style -->
2044
2056
 
@@ -3208,6 +3220,12 @@
3208
3220
  <xsl:variable name="table_attributes">
3209
3221
 
3210
3222
  <xsl:element name="table_attributes" use-attribute-sets="table-style">
3223
+
3224
+ <xsl:if test="$margin-side != 0">
3225
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
3226
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
3227
+ </xsl:if>
3228
+
3211
3229
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
3212
3230
 
3213
3231
  </xsl:element>
@@ -3961,6 +3979,10 @@
3961
3979
  <xsl:template match="*[local-name()='tr']">
3962
3980
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3963
3981
 
3982
+ <xsl:if test="*[local-name() = 'th']">
3983
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
3984
+ </xsl:if>
3985
+
3964
3986
  <xsl:variable name="number"><xsl:number/></xsl:variable>
3965
3987
  <xsl:attribute name="background-color">
3966
3988
  <xsl:choose>
@@ -5953,6 +5975,9 @@
5953
5975
  <xsl:value-of select="substring($str, 2)"/>
5954
5976
  </xsl:template>
5955
5977
 
5978
+ <!-- ======================================= -->
5979
+ <!-- math -->
5980
+ <!-- ======================================= -->
5956
5981
  <xsl:template match="mathml:math">
5957
5982
  <xsl:variable name="isAdded" select="@added"/>
5958
5983
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -6003,14 +6028,57 @@
6003
6028
  <xsl:value-of select="$comment_text"/>
6004
6029
  </xsl:template>
6005
6030
 
6031
+ <xsl:template match="*[local-name() = 'asciimath']">
6032
+ <xsl:param name="process" select="'false'"/>
6033
+ <xsl:if test="$process = 'true'">
6034
+ <xsl:apply-templates/>
6035
+ </xsl:if>
6036
+ </xsl:template>
6037
+
6038
+ <xsl:template match="*[local-name() = 'latexmath']"/>
6039
+
6040
+ <xsl:template name="getMathml_asciimath_text">
6041
+ <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
6042
+ <xsl:variable name="latexmath">
6043
+
6044
+ </xsl:variable>
6045
+ <xsl:variable name="asciimath_text_following">
6046
+ <xsl:choose>
6047
+ <xsl:when test="normalize-space($latexmath) != ''">
6048
+ <xsl:value-of select="$latexmath"/>
6049
+ </xsl:when>
6050
+ <xsl:when test="normalize-space($asciimath) != ''">
6051
+ <xsl:value-of select="$asciimath"/>
6052
+ </xsl:when>
6053
+ <xsl:otherwise>
6054
+ <xsl:value-of select="following-sibling::node()[1][self::comment()]"/>
6055
+ </xsl:otherwise>
6056
+ </xsl:choose>
6057
+ </xsl:variable>
6058
+ <xsl:variable name="asciimath_text_">
6059
+ <xsl:choose>
6060
+ <xsl:when test="normalize-space($asciimath_text_following) != ''">
6061
+ <xsl:value-of select="$asciimath_text_following"/>
6062
+ </xsl:when>
6063
+ <xsl:otherwise>
6064
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
6065
+ </xsl:otherwise>
6066
+ </xsl:choose>
6067
+ </xsl:variable>
6068
+ <xsl:variable name="asciimath_text_2" select="java:org.metanorma.fop.Util.unescape($asciimath_text_)"/>
6069
+ <xsl:variable name="asciimath_text" select="java:trim(java:java.lang.String.new($asciimath_text_2))"/>
6070
+ <xsl:value-of select="$asciimath_text"/>
6071
+ </xsl:template>
6072
+
6006
6073
  <xsl:template name="mathml_instream_object">
6007
- <xsl:param name="comment_text"/>
6074
+ <xsl:param name="asciimath_text"/>
6008
6075
  <xsl:param name="mathml_content"/>
6009
6076
 
6010
- <xsl:variable name="comment_text_">
6077
+ <xsl:variable name="asciimath_text_">
6011
6078
  <xsl:choose>
6012
- <xsl:when test="normalize-space($comment_text) != ''"><xsl:value-of select="$comment_text"/></xsl:when>
6013
- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
6079
+ <xsl:when test="normalize-space($asciimath_text) != ''"><xsl:value-of select="$asciimath_text"/></xsl:when>
6080
+ <!-- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise> -->
6081
+ <xsl:otherwise><xsl:call-template name="getMathml_asciimath_text"/></xsl:otherwise>
6014
6082
  </xsl:choose>
6015
6083
  </xsl:variable>
6016
6084
 
@@ -6027,10 +6095,10 @@
6027
6095
  </xsl:attribute>
6028
6096
 
6029
6097
  <!-- <xsl:if test="$add_math_as_text = 'true'"> -->
6030
- <xsl:if test="normalize-space($comment_text_) != ''">
6098
+ <xsl:if test="normalize-space($asciimath_text_) != ''">
6031
6099
  <!-- put Mathin Alternate Text -->
6032
6100
  <xsl:attribute name="fox:alt-text">
6033
- <xsl:value-of select="$comment_text_"/>
6101
+ <xsl:value-of select="$asciimath_text_"/>
6034
6102
  </xsl:attribute>
6035
6103
  </xsl:if>
6036
6104
  <!-- </xsl:if> -->
@@ -6103,6 +6171,29 @@
6103
6171
  <xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
6104
6172
  </xsl:template>
6105
6173
 
6174
+ <!-- Examples:
6175
+ <stem type="AsciiMath">x = 1</stem>
6176
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
6177
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
6178
+ -->
6179
+ <xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
6180
+ <fo:inline xsl:use-attribute-sets="mathml-style">
6181
+
6182
+ <xsl:choose>
6183
+ <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
6184
+ <xsl:otherwise>
6185
+ <xsl:apply-templates>
6186
+ <xsl:with-param name="process">true</xsl:with-param>
6187
+ </xsl:apply-templates>
6188
+ </xsl:otherwise>
6189
+ </xsl:choose>
6190
+
6191
+ </fo:inline>
6192
+ </xsl:template>
6193
+ <!-- ======================================= -->
6194
+ <!-- END: math -->
6195
+ <!-- ======================================= -->
6196
+
6106
6197
  <xsl:template match="*[local-name()='localityStack']"/>
6107
6198
 
6108
6199
  <xsl:template match="*[local-name()='link']" name="link">
@@ -7467,9 +7558,9 @@
7467
7558
  <xsl:apply-templates mode="contents_item"/>
7468
7559
  </xsl:template>
7469
7560
 
7470
- <!-- ====== -->
7471
- <!-- sourcecode -->
7472
- <!-- ====== -->
7561
+ <!-- =============== -->
7562
+ <!-- sourcecode -->
7563
+ <!-- =============== -->
7473
7564
  <xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
7474
7565
 
7475
7566
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
@@ -7783,8 +7874,22 @@
7783
7874
  </fo:block>
7784
7875
  </xsl:if>
7785
7876
  </xsl:template>
7786
- <!-- ====== -->
7787
- <!-- ====== -->
7877
+ <!-- =============== -->
7878
+ <!-- END sourcecode -->
7879
+ <!-- =============== -->
7880
+
7881
+ <!-- =============== -->
7882
+ <!-- pre -->
7883
+ <!-- =============== -->
7884
+ <xsl:template match="*[local-name()='pre']" name="pre">
7885
+ <fo:block xsl:use-attribute-sets="pre-style">
7886
+ <xsl:copy-of select="@id"/>
7887
+ <xsl:apply-templates/>
7888
+ </fo:block>
7889
+ </xsl:template>
7890
+ <!-- =============== -->
7891
+ <!-- pre -->
7892
+ <!-- =============== -->
7788
7893
 
7789
7894
  <!-- ========== -->
7790
7895
  <!-- permission -->
@@ -10341,13 +10446,14 @@
10341
10446
  </xsl:template>
10342
10447
 
10343
10448
  <xsl:template name="setId">
10449
+ <xsl:param name="prefix"/>
10344
10450
  <xsl:attribute name="id">
10345
10451
  <xsl:choose>
10346
10452
  <xsl:when test="@id">
10347
- <xsl:value-of select="@id"/>
10453
+ <xsl:value-of select="concat($prefix, @id)"/>
10348
10454
  </xsl:when>
10349
10455
  <xsl:otherwise>
10350
- <xsl:value-of select="generate-id()"/>
10456
+ <xsl:value-of select="concat($prefix, generate-id())"/>
10351
10457
  </xsl:otherwise>
10352
10458
  </xsl:choose>
10353
10459
  </xsl:attribute>
@@ -1143,7 +1143,7 @@
1143
1143
  <xsl:template name="insertHeaderFooter">
1144
1144
  <xsl:param name="color" select="$color_blue"/>
1145
1145
  <fo:static-content flow-name="footer" role="artifact">
1146
- <fo:block-container font-size="8pt" height="100%" color="{$color}" padding-top="6mm">
1146
+ <fo:block-container font-size="8pt" color="{$color}" padding-top="6mm">
1147
1147
  <fo:table table-layout="fixed" width="100%">
1148
1148
  <fo:table-column column-width="90%"/>
1149
1149
  <fo:table-column column-width="10%"/>
@@ -1883,6 +1883,15 @@
1883
1883
 
1884
1884
  </xsl:attribute-set>
1885
1885
 
1886
+ <xsl:attribute-set name="pre-style">
1887
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1888
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1889
+
1890
+ <xsl:attribute name="font-family">Fira Code, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1891
+ <xsl:attribute name="line-height">113%</xsl:attribute>
1892
+
1893
+ </xsl:attribute-set>
1894
+
1886
1895
  <xsl:attribute-set name="permission-style">
1887
1896
 
1888
1897
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
@@ -2026,6 +2035,11 @@
2026
2035
  </xsl:variable>
2027
2036
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
2028
2037
 
2038
+ <xsl:variable name="table-cell-border_">
2039
+
2040
+ </xsl:variable>
2041
+ <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
2042
+
2029
2043
  <xsl:attribute-set name="table-container-style">
2030
2044
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2031
2045
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -2037,8 +2051,6 @@
2037
2051
  <xsl:attribute-set name="table-style">
2038
2052
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
2039
2053
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
2040
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2041
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2042
2054
 
2043
2055
  </xsl:attribute-set><!-- table-style -->
2044
2056
 
@@ -3208,6 +3220,12 @@
3208
3220
  <xsl:variable name="table_attributes">
3209
3221
 
3210
3222
  <xsl:element name="table_attributes" use-attribute-sets="table-style">
3223
+
3224
+ <xsl:if test="$margin-side != 0">
3225
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
3226
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
3227
+ </xsl:if>
3228
+
3211
3229
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
3212
3230
 
3213
3231
  </xsl:element>
@@ -3961,6 +3979,10 @@
3961
3979
  <xsl:template match="*[local-name()='tr']">
3962
3980
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3963
3981
 
3982
+ <xsl:if test="*[local-name() = 'th']">
3983
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
3984
+ </xsl:if>
3985
+
3964
3986
  <xsl:variable name="number"><xsl:number/></xsl:variable>
3965
3987
  <xsl:attribute name="background-color">
3966
3988
  <xsl:choose>
@@ -5953,6 +5975,9 @@
5953
5975
  <xsl:value-of select="substring($str, 2)"/>
5954
5976
  </xsl:template>
5955
5977
 
5978
+ <!-- ======================================= -->
5979
+ <!-- math -->
5980
+ <!-- ======================================= -->
5956
5981
  <xsl:template match="mathml:math">
5957
5982
  <xsl:variable name="isAdded" select="@added"/>
5958
5983
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -6003,14 +6028,57 @@
6003
6028
  <xsl:value-of select="$comment_text"/>
6004
6029
  </xsl:template>
6005
6030
 
6031
+ <xsl:template match="*[local-name() = 'asciimath']">
6032
+ <xsl:param name="process" select="'false'"/>
6033
+ <xsl:if test="$process = 'true'">
6034
+ <xsl:apply-templates/>
6035
+ </xsl:if>
6036
+ </xsl:template>
6037
+
6038
+ <xsl:template match="*[local-name() = 'latexmath']"/>
6039
+
6040
+ <xsl:template name="getMathml_asciimath_text">
6041
+ <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
6042
+ <xsl:variable name="latexmath">
6043
+
6044
+ </xsl:variable>
6045
+ <xsl:variable name="asciimath_text_following">
6046
+ <xsl:choose>
6047
+ <xsl:when test="normalize-space($latexmath) != ''">
6048
+ <xsl:value-of select="$latexmath"/>
6049
+ </xsl:when>
6050
+ <xsl:when test="normalize-space($asciimath) != ''">
6051
+ <xsl:value-of select="$asciimath"/>
6052
+ </xsl:when>
6053
+ <xsl:otherwise>
6054
+ <xsl:value-of select="following-sibling::node()[1][self::comment()]"/>
6055
+ </xsl:otherwise>
6056
+ </xsl:choose>
6057
+ </xsl:variable>
6058
+ <xsl:variable name="asciimath_text_">
6059
+ <xsl:choose>
6060
+ <xsl:when test="normalize-space($asciimath_text_following) != ''">
6061
+ <xsl:value-of select="$asciimath_text_following"/>
6062
+ </xsl:when>
6063
+ <xsl:otherwise>
6064
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
6065
+ </xsl:otherwise>
6066
+ </xsl:choose>
6067
+ </xsl:variable>
6068
+ <xsl:variable name="asciimath_text_2" select="java:org.metanorma.fop.Util.unescape($asciimath_text_)"/>
6069
+ <xsl:variable name="asciimath_text" select="java:trim(java:java.lang.String.new($asciimath_text_2))"/>
6070
+ <xsl:value-of select="$asciimath_text"/>
6071
+ </xsl:template>
6072
+
6006
6073
  <xsl:template name="mathml_instream_object">
6007
- <xsl:param name="comment_text"/>
6074
+ <xsl:param name="asciimath_text"/>
6008
6075
  <xsl:param name="mathml_content"/>
6009
6076
 
6010
- <xsl:variable name="comment_text_">
6077
+ <xsl:variable name="asciimath_text_">
6011
6078
  <xsl:choose>
6012
- <xsl:when test="normalize-space($comment_text) != ''"><xsl:value-of select="$comment_text"/></xsl:when>
6013
- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
6079
+ <xsl:when test="normalize-space($asciimath_text) != ''"><xsl:value-of select="$asciimath_text"/></xsl:when>
6080
+ <!-- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise> -->
6081
+ <xsl:otherwise><xsl:call-template name="getMathml_asciimath_text"/></xsl:otherwise>
6014
6082
  </xsl:choose>
6015
6083
  </xsl:variable>
6016
6084
 
@@ -6027,10 +6095,10 @@
6027
6095
  </xsl:attribute>
6028
6096
 
6029
6097
  <!-- <xsl:if test="$add_math_as_text = 'true'"> -->
6030
- <xsl:if test="normalize-space($comment_text_) != ''">
6098
+ <xsl:if test="normalize-space($asciimath_text_) != ''">
6031
6099
  <!-- put Mathin Alternate Text -->
6032
6100
  <xsl:attribute name="fox:alt-text">
6033
- <xsl:value-of select="$comment_text_"/>
6101
+ <xsl:value-of select="$asciimath_text_"/>
6034
6102
  </xsl:attribute>
6035
6103
  </xsl:if>
6036
6104
  <!-- </xsl:if> -->
@@ -6103,6 +6171,29 @@
6103
6171
  <xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
6104
6172
  </xsl:template>
6105
6173
 
6174
+ <!-- Examples:
6175
+ <stem type="AsciiMath">x = 1</stem>
6176
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
6177
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
6178
+ -->
6179
+ <xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
6180
+ <fo:inline xsl:use-attribute-sets="mathml-style">
6181
+
6182
+ <xsl:choose>
6183
+ <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
6184
+ <xsl:otherwise>
6185
+ <xsl:apply-templates>
6186
+ <xsl:with-param name="process">true</xsl:with-param>
6187
+ </xsl:apply-templates>
6188
+ </xsl:otherwise>
6189
+ </xsl:choose>
6190
+
6191
+ </fo:inline>
6192
+ </xsl:template>
6193
+ <!-- ======================================= -->
6194
+ <!-- END: math -->
6195
+ <!-- ======================================= -->
6196
+
6106
6197
  <xsl:template match="*[local-name()='localityStack']"/>
6107
6198
 
6108
6199
  <xsl:template match="*[local-name()='link']" name="link">
@@ -7467,9 +7558,9 @@
7467
7558
  <xsl:apply-templates mode="contents_item"/>
7468
7559
  </xsl:template>
7469
7560
 
7470
- <!-- ====== -->
7471
- <!-- sourcecode -->
7472
- <!-- ====== -->
7561
+ <!-- =============== -->
7562
+ <!-- sourcecode -->
7563
+ <!-- =============== -->
7473
7564
  <xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
7474
7565
 
7475
7566
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
@@ -7783,8 +7874,22 @@
7783
7874
  </fo:block>
7784
7875
  </xsl:if>
7785
7876
  </xsl:template>
7786
- <!-- ====== -->
7787
- <!-- ====== -->
7877
+ <!-- =============== -->
7878
+ <!-- END sourcecode -->
7879
+ <!-- =============== -->
7880
+
7881
+ <!-- =============== -->
7882
+ <!-- pre -->
7883
+ <!-- =============== -->
7884
+ <xsl:template match="*[local-name()='pre']" name="pre">
7885
+ <fo:block xsl:use-attribute-sets="pre-style">
7886
+ <xsl:copy-of select="@id"/>
7887
+ <xsl:apply-templates/>
7888
+ </fo:block>
7889
+ </xsl:template>
7890
+ <!-- =============== -->
7891
+ <!-- pre -->
7892
+ <!-- =============== -->
7788
7893
 
7789
7894
  <!-- ========== -->
7790
7895
  <!-- permission -->
@@ -10341,13 +10446,14 @@
10341
10446
  </xsl:template>
10342
10447
 
10343
10448
  <xsl:template name="setId">
10449
+ <xsl:param name="prefix"/>
10344
10450
  <xsl:attribute name="id">
10345
10451
  <xsl:choose>
10346
10452
  <xsl:when test="@id">
10347
- <xsl:value-of select="@id"/>
10453
+ <xsl:value-of select="concat($prefix, @id)"/>
10348
10454
  </xsl:when>
10349
10455
  <xsl:otherwise>
10350
- <xsl:value-of select="generate-id()"/>
10456
+ <xsl:value-of select="concat($prefix, generate-id())"/>
10351
10457
  </xsl:otherwise>
10352
10458
  </xsl:choose>
10353
10459
  </xsl:attribute>