lib/isodoc/un/un.plenary-attachment.xsl in metanorma-un-0.8.2 vs lib/isodoc/un/un.plenary-attachment.xsl in metanorma-un-0.8.3
- old
+ new
@@ -1,25 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:un="https://www.metanorma.org/ns/un" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:barcode="http://barcode4j.krysalis.org/ns" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java" version="1.0">
<xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
- <xsl:param name="svg_images"/>
- <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
- <xsl:variable name="images" select="document($svg_images)"/>
- <xsl:param name="basepath"/>
-
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
- <xsl:variable name="marginLeftRight1" select="40"/>
- <xsl:variable name="marginLeftRight2" select="40"/>
- <xsl:variable name="marginTop" select="30"/>
- <xsl:variable name="marginBottom" select="40"/>
-
<xsl:variable name="debug">false</xsl:variable>
<xsl:variable name="contents">
<contents>
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -31,13 +21,10 @@
<xsl:apply-templates select="/un:un-standard/un:annex" mode="contents"/>
<xsl:apply-templates select="/un:un-standard/un:bibliography/un:references" mode="contents"/>
</contents>
</xsl:variable>
- <xsl:variable name="lang">
- <xsl:call-template name="getLang"/>
- </xsl:variable>
<xsl:variable name="title" select="/un:un-standard/un:bibdata/un:title[@language = 'en' and @type = 'main']"/>
<xsl:variable name="id" select="/un:un-standard/un:bibdata/un:ext/un:session/un:id"/>
@@ -434,19 +421,10 @@
<xsl:choose>
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
<xsl:otherwise>left</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
- <!-- <xsl:choose>
- <xsl:when test="ancestor::un:sections">
- <fo:inline padding-right="10mm"><xsl:number format="1. " level="any" count="un:sections//un:clause/un:p"/></fo:inline>
- </xsl:when>
- <xsl:when test="ancestor::un:annex">
- <xsl:variable name="annex_id" select="ancestor::un:annex/@id"/>
- <fo:inline padding-right="10mm"><xsl:number format="1. " level="any" count="un:annex[@id = $annex_id]//un:clause/un:p"/></fo:inline>
- </xsl:when>
- </xsl:choose> -->
<xsl:apply-templates/>
</fo:block>
</xsl:template>
@@ -492,128 +470,39 @@
<fo:block>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
- <xsl:template match="un:p" name="paragraph"> <!-- priority="3" [not(parent::un:note)]-->
-
- <fo:block margin-bottom="6pt" line-height="122%">
- <xsl:if test="following-sibling::*">
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
- </xsl:if>
- <xsl:attribute name="text-align">
- <xsl:choose>
- <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
- <xsl:otherwise>justify</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:apply-templates/>
- </fo:block>
-
+ <xsl:template match="un:p" name="paragraph">
+ <fo:block margin-bottom="6pt" line-height="122%">
+ <xsl:if test="following-sibling::*">
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
+ </xsl:if>
+ <xsl:attribute name="text-align">
+ <xsl:choose>
+ <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
+ <xsl:otherwise>justify</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </fo:block>
</xsl:template>
- <xsl:template match="un:p2">
- <fo:block-container margin-left="1mm">
- <fo:block margin-left="-1mm">
- <fo:list-block provisional-distance-between-starts="9mm" margin-bottom="6pt" line-height="122%">
- <xsl:attribute name="text-align">
- <xsl:choose>
- <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
- <xsl:otherwise>justify</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block>
- <xsl:choose>
- <xsl:when test="ancestor::un:sections">
- <xsl:number format="1. " level="any" count="un:sections//un:clause/un:p"/>
- </xsl:when>
- <xsl:when test="ancestor::un:annex">
- <xsl:variable name="annex_id" select="ancestor::un:annex/@id"/>
- <xsl:number format="1. " level="any" count="un:annex[@id = $annex_id]//un:p"/> <!-- //un:clause -->
- </xsl:when>
- </xsl:choose>
- </fo:block>
- </fo:list-item-label>
- <fo:list-item-body text-indent="body-start()">
- <fo:block>
- <xsl:text> </xsl:text><xsl:apply-templates/>
- </fo:block>
- </fo:list-item-body>
- </fo:list-item>
- </fo:list-block>
- </fo:block>
- </fo:block-container>
- </xsl:template>
-
<xsl:template match="un:fn/un:p">
<fo:block>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
- <xsl:template match="un:ul | un:ol" mode="ul_ol">
+ <xsl:template match="un:ul | un:ol" mode="list" priority="2">
<fo:block-container margin-left="8mm" text-indent="0mm">
- <fo:list-block provisional-distance-between-starts="4mm" margin-left="-8mm">
- <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
- </fo:list-block>
- <xsl:apply-templates select="./un:note"/>
+ <xsl:call-template name="list"/>
</fo:block-container>
</xsl:template>
- <xsl:template match="un:li">
- <xsl:variable name="level">
- <xsl:call-template name="getLevel"/>
- </xsl:variable>
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block>
- <xsl:choose>
- <xsl:when test="local-name(..) = 'ul'">
- <xsl:call-template name="setULLabel"/>
- </xsl:when>
- <xsl:otherwise> <!-- for ordered lists -->
- <xsl:choose>
- <xsl:when test="../@type = 'arabic'">
- <xsl:number format="1."/>
- </xsl:when>
- <xsl:when test="../@type = 'alphabet'">
- <xsl:number format="1)"/>
- </xsl:when>
- <xsl:when test="ancestor::*[un:annex]">
- <xsl:choose>
- <xsl:when test="$level = 1">
- <xsl:number format="a)" lang="en"/>
- </xsl:when>
- <xsl:when test="$level = 2">
- <xsl:number format="i)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:number format="1.)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:number format="1."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </fo:block>
- </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
- <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
- <xsl:apply-templates select="./un:note"/>
- </fo:block>
- </fo:list-item-body>
- </fo:list-item>
- </xsl:template>
-
<xsl:template match="un:li//un:p">
<fo:block margin-bottom="6pt" line-height="122%" text-align="justify">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
@@ -859,54 +748,11 @@
<xsl:text> [</xsl:text><xsl:apply-templates/><xsl:text>]</xsl:text>
</xsl:template>
<xsl:template match="un:docidentifier"/>
- <xsl:template match="un:formula" name="formula-un" priority="2">
- <fo:block-container margin-left="0mm">
- <xsl:if test="parent::*[local-name() = 'note']">
- <xsl:attribute name="margin-left">
- <xsl:choose>
- <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </xsl:if>
- <fo:block-container margin-left="0mm">
- <fo:block id="{@id}" margin-top="6pt">
- <fo:table table-layout="fixed" width="100%">
- <fo:table-column column-width="95%"/>
- <fo:table-column column-width="5%"/>
- <fo:table-body>
- <fo:table-row>
- <fo:table-cell>
- <fo:block text-align="center">
- <xsl:if test="ancestor::un:annex">
- <xsl:attribute name="text-align">left</xsl:attribute>
- <xsl:attribute name="margin-left">7mm</xsl:attribute>
- </xsl:if>
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
- </fo:block>
- </fo:table-cell>
- <fo:table-cell> <!-- display-align="center" -->
- <fo:block text-align="right">
- <xsl:apply-templates select="un:name"/>
- </fo:block>
- </fo:table-cell>
- </fo:table-row>
- </fo:table-body>
- </fo:table>
- </fo:block>
-
- </fo:block-container>
- </fo:block-container>
- </xsl:template>
-
-
-
-
<xsl:template match="un:dl" priority="2">
<fo:block-container margin-left="0mm">
<xsl:if test="parent::*[local-name() = 'note']">
<xsl:attribute name="margin-left">
<xsl:choose>
@@ -977,15 +823,25 @@
<xsl:variable name="Image-Recycle">
<xsl:text>iVBORw0KGgoAAAANSUhEUgAAAJkAAAAmCAYAAADXwDkaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA+lpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNy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l80QzUwx2y0exd1OefiZp2SwkH7fIApxnIhHgN/uwSnK9rHMGlTzW27fbttd6WZ4vyOjg6GU1zf67RY5eXlZTt37mz3PliWCaHL5ubmlm7QhsvK9sMi/W48Holu2rQxfTIvEVlcrPTjqe4EZ7CgwBdra9uSmtcPt6eta6FynHEJKYGv2Jd90s86AQpAwNJsRuT5xUAHrKK4IkCd9g6NQAQPIi8vz4f5o72tANZVgO/GMpe59RvrtQvt7JMQLS0dAyI9sst1m7uTuL28gqwJBqfh8pTaWOTqTIvSblYxVtTe2RnbvHlzg/fsEofcLK4oasda9edCs9An49viDe3tm3sS2YHA/gAL39Le/tU2lGFS0mphWYsBlhI432690j5UQnnB0DjXjuv/Pkr/knwu5fQOx46PR+RzPKz5FG+vOtVFmJn08mQq/ix17K4bM722kS3f8O0J0IOnwddK6jo7zqrx5f7EdckzAOrK/5erFeIorlh4YH/pthHXfac7449A8DVAaRXYTgUQ4wdj/xgw8ytFk7xSqrdd135+AIqVLd+k6ICjZETxZhgY8HLnv3VGvTZa/+9kz/qlzuHctP4A89UE73L1sCJO8nXeWcqW3QOHeLyryF/Q4L3BoEhzW+fOO0A12vewbTZxj6/yWeCqz4J31WY1ny3/F6UYkeY68LIzhtsxa8myZailU1K6HlxN/x9kjcPp+HcBBgAS2JZd+kqHSQAAAABJRU5ErkJggg==</xsl:text>
</xsl:variable>
-<xsl:variable name="pageWidth_">
+<xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:variable name="lang">
+ <xsl:call-template name="getLang"/>
+ </xsl:variable><xsl:variable name="pageWidth_">
210
</xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
297
- </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="titles_">
+ </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="marginLeftRight1_">
+ 40
+ </xsl:variable><xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/><xsl:variable name="marginLeftRight2_">
+ 40
+ </xsl:variable><xsl:variable name="marginLeftRight2" select="normalize-space($marginLeftRight2_)"/><xsl:variable name="marginTop_">
+ 30
+ </xsl:variable><xsl:variable name="marginTop" select="normalize-space($marginTop_)"/><xsl:variable name="marginBottom_">
+ 40
+ </xsl:variable><xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/><xsl:variable name="titles_">
<title-edition lang="en">
<xsl:text>Edition </xsl:text>
@@ -1041,11 +897,11 @@
<title-continued lang="fr">(continué)</title-continued>
</xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
- </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
+ </xsl:variable><xsl:variable name="linebreak">
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:variable name="non_breaking_hyphen">‑</xsl:variable><xsl:variable name="thin_space"> </xsl:variable><xsl:variable name="zero_width_space"></xsl:variable><xsl:variable name="en_dash">–</xsl:variable><xsl:template name="getTitle">
<xsl:param name="name"/>
<xsl:param name="lang"/>
<xsl:variable name="lang_">
<xsl:choose>
<xsl:when test="$lang != ''">
@@ -1064,11 +920,11 @@
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
</xsl:otherwise>
</xsl:choose>
- </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
+ </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:attribute-set name="root-style">
@@ -1219,11 +1075,10 @@
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -1231,12 +1086,14 @@
+
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
<xsl:attribute name="font-size">10pt</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -1605,22 +1462,23 @@
</xsl:attribute-set><xsl:attribute-set name="quote-style">
- <xsl:attribute name="role">BlockQuote</xsl:attribute>
+ <xsl:attribute name="margin-left">12mm</xsl:attribute>
+ <xsl:attribute name="margin-right">12mm</xsl:attribute>
</xsl:attribute-set><xsl:attribute-set name="quote-source-style">
+ <xsl:attribute name="text-align">right</xsl:attribute>
-
</xsl:attribute-set><xsl:attribute-set name="termsource-style">
@@ -1635,10 +1493,13 @@
</xsl:attribute-set><xsl:attribute-set name="term-style">
+ </xsl:attribute-set><xsl:attribute-set name="term-name-style">
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set><xsl:attribute-set name="figure-style">
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
@@ -1663,11 +1524,38 @@
</xsl:attribute-set><xsl:attribute-set name="formula-style">
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
+
+
+
+
+
+ </xsl:attribute-set><xsl:attribute-set name="formula-stem-block-style">
+ <xsl:attribute name="text-align">center</xsl:attribute>
+
+
+
+
+
+
+
+
+
+
+
+ </xsl:attribute-set><xsl:attribute-set name="formula-stem-number-style">
+ <xsl:attribute name="text-align">right</xsl:attribute>
+
+
+
+
+
</xsl:attribute-set><xsl:attribute-set name="image-style">
<xsl:attribute name="text-align">center</xsl:attribute>
@@ -1701,10 +1589,22 @@
<xsl:attribute name="font-weight">bold</xsl:attribute>
<xsl:attribute name="text-align">center</xsl:attribute>
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="preferred-block-style">
+
+
+
+
+
+
+ </xsl:attribute-set><xsl:attribute-set name="preferred-term-style">
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+
+
</xsl:attribute-set><xsl:attribute-set name="domain-style">
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
@@ -1734,10 +1634,40 @@
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
</xsl:attribute-set><xsl:attribute-set name="list-style">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <xsl:attribute name="provisional-distance-between-starts">4mm</xsl:attribute>
+ <xsl:attribute name="margin-left">-8mm</xsl:attribute>
+
+
+ </xsl:attribute-set><xsl:attribute-set name="list-item-style">
+
+
+ </xsl:attribute-set><xsl:attribute-set name="list-item-label-style">
+
+
+
+ </xsl:attribute-set><xsl:attribute-set name="list-item-body-style">
+
+
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
<xsl:attribute name="line-height">135%</xsl:attribute>
</xsl:attribute-set><xsl:attribute-set name="fn-reference-style">
<xsl:attribute name="font-size">80%</xsl:attribute>
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
@@ -2016,10 +1946,115 @@
</xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
+ </xsl:attribute-set><xsl:attribute-set name="hljs-doctag">
+ <xsl:attribute name="color">#d73a49</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-keyword">
+ <xsl:attribute name="color">#d73a49</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-meta_hljs-keyword">
+ <xsl:attribute name="color">#d73a49</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-template-tag">
+ <xsl:attribute name="color">#d73a49</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-template-variable">
+ <xsl:attribute name="color">#d73a49</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-type">
+ <xsl:attribute name="color">#d73a49</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-variable_and_language_">
+ <xsl:attribute name="color">#d73a49</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-title">
+ <xsl:attribute name="color">#6f42c1</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-title_and_class_">
+ <xsl:attribute name="color">#6f42c1</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-title_and_class__and_inherited__">
+ <xsl:attribute name="color">#6f42c1</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-title_and_function_">
+ <xsl:attribute name="color">#6f42c1</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-attr">
+ <xsl:attribute name="color">#005cc5</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-attribute">
+ <xsl:attribute name="color">#005cc5</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-literal">
+ <xsl:attribute name="color">#005cc5</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-meta">
+ <xsl:attribute name="color">#005cc5</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-number">
+ <xsl:attribute name="color">#005cc5</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-operator">
+ <xsl:attribute name="color">#005cc5</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-variable">
+ <xsl:attribute name="color">#005cc5</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-selector-attr">
+ <xsl:attribute name="color">#005cc5</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-selector-class">
+ <xsl:attribute name="color">#005cc5</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-selector-id">
+ <xsl:attribute name="color">#005cc5</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-regexp">
+ <xsl:attribute name="color">#032f62</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-string">
+ <xsl:attribute name="color">#032f62</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-meta_hljs-string">
+ <xsl:attribute name="color">#032f62</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-built_in">
+ <xsl:attribute name="color">#e36209</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-symbol">
+ <xsl:attribute name="color">#e36209</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-comment">
+ <xsl:attribute name="color">#6a737d</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-code">
+ <xsl:attribute name="color">#6a737d</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-formula">
+ <xsl:attribute name="color">#6a737d</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-name">
+ <xsl:attribute name="color">#22863a</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-quote">
+ <xsl:attribute name="color">#22863a</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-selector-tag">
+ <xsl:attribute name="color">#22863a</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-selector-pseudo">
+ <xsl:attribute name="color">#22863a</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-subst">
+ <xsl:attribute name="color">#24292e</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-section">
+ <xsl:attribute name="color">#005cc5</xsl:attribute>
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-bullet">
+ <xsl:attribute name="color">#735c0f</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-emphasis">
+ <xsl:attribute name="color">#24292e</xsl:attribute>
+ <xsl:attribute name="font-style">italic</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-strong">
+ <xsl:attribute name="color">#24292e</xsl:attribute>
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-addition">
+ <xsl:attribute name="color">#22863a</xsl:attribute>
+ <xsl:attribute name="background-color">#f0fff4</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-deletion">
+ <xsl:attribute name="color">#b31d28</xsl:attribute>
+ <xsl:attribute name="background-color">#ffeef0</xsl:attribute>
+ </xsl:attribute-set><xsl:attribute-set name="hljs-char_and_escape_">
+ </xsl:attribute-set><xsl:attribute-set name="hljs-link">
+ </xsl:attribute-set><xsl:attribute-set name="hljs-params">
+ </xsl:attribute-set><xsl:attribute-set name="hljs-property">
+ </xsl:attribute-set><xsl:attribute-set name="hljs-punctuation">
+ </xsl:attribute-set><xsl:attribute-set name="hljs-tag">
+ </xsl:attribute-set><xsl:attribute-set name="indexsect-title-style">
+ <xsl:attribute name="role">H1</xsl:attribute>
+
+
+
+
+
+ </xsl:attribute-set><xsl:attribute-set name="indexsect-clause-title-style">
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
+
+
+
+
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
<xsl:for-each select="/*/*[local-name()='preface']/*">
<xsl:sort select="@displayorder" data-type="number"/>
<xsl:apply-templates select="." mode="contents"/>
</xsl:for-each>
@@ -2102,13 +2137,16 @@
<!-- process in the template 'title' -->
<xsl:call-template name="title"/>
</xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
+ <xsl:param name="margin"/>
<!-- process in the template 'paragraph' -->
- <xsl:call-template name="paragraph"/>
+ <xsl:call-template name="paragraph">
+ <xsl:with-param name="margin" select="$margin"/>
+ </xsl:call-template>
</xsl:template><xsl:template match="*[local-name()='feedback-statement']">
<fo:block xsl:use-attribute-sets="feedback-statement-style">
<xsl:apply-templates/>
</fo:block>
@@ -2116,13 +2154,16 @@
<!-- process in the template 'title' -->
<xsl:call-template name="title"/>
</xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
+ <xsl:param name="margin"/>
<!-- process in the template 'paragraph' -->
- <xsl:call-template name="paragraph"/>
+ <xsl:call-template name="paragraph">
+ <xsl:with-param name="margin" select="$margin"/>
+ </xsl:call-template>
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
<!-- <xsl:call-template name="add-zero-spaces"/> -->
<xsl:call-template name="add-zero-spaces-java"/>
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
@@ -2466,12 +2507,11 @@
<xsl:with-param name="curr-col" select="$curr-col +1"/>
<xsl:with-param name="table" select="$table"/>
</xsl:call-template>
</xsl:if>
</xsl:template><xsl:template match="text()" mode="td_text">
- <xsl:variable name="zero-space"></xsl:variable>
- <xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
+ <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
</xsl:template><xsl:template match="*[local-name()='termsource']" mode="td_text">
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
<xsl:value-of select="@target"/>
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
@@ -3445,24 +3485,48 @@
</fo:inline>
</xsl:template><xsl:template match="*[local-name()='underline']">
<fo:inline text-decoration="underline">
<xsl:apply-templates/>
</fo:inline>
- </xsl:template><xsl:template match="*[local-name()='add']">
+ </xsl:template><xsl:template match="*[local-name()='add']" name="tag_add">
<xsl:param name="skip">true</xsl:param>
+ <xsl:param name="block">false</xsl:param>
+ <xsl:param name="type"/>
+ <xsl:param name="text-align"/>
<xsl:choose>
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
<xsl:choose>
- <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab'])) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
+ <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab']) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
<xsl:otherwise>
- <fo:inline>
+ <xsl:variable name="tag">
<xsl:call-template name="insertTag">
- <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
+ <xsl:with-param name="type">
+ <xsl:choose>
+ <xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
+ <xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
<xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
<xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
</xsl:call-template>
- </fo:inline>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$block = 'false'">
+ <fo:inline>
+ <xsl:copy-of select="$tag"/>
+ </fo:inline>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block> <!-- for around figures -->
+ <xsl:if test="$text-align != ''">
+ <xsl:attribute name="text-align"><xsl:value-of select="$text-align"/></xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$tag"/>
+ </fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
+
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="@amendment">
<fo:inline>
@@ -3817,21 +3881,25 @@
<xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
<xsl:with-param name="previousRow" select="$newRow"/>
</xsl:apply-templates>
</xsl:template><xsl:template name="getLang">
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
- <xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
<xsl:variable name="language">
<xsl:choose>
<xsl:when test="$language_current != ''">
<xsl:value-of select="$language_current"/>
</xsl:when>
- <xsl:when test="$language_current_2 != ''">
- <xsl:value-of select="$language_current_2"/>
- </xsl:when>
<xsl:otherwise>
- <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
+ <xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
+ <xsl:choose>
+ <xsl:when test="$language_current_2 != ''">
+ <xsl:value-of select="$language_current_2"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
@@ -4044,12 +4112,12 @@
</xsl:choose>
</xsl:attribute>
</xsl:if>
<fo:block-container margin-left="0mm">
- <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
- <xsl:apply-templates/>
+ <fo:block id="{@id}">
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
</fo:block>
</fo:block-container>
</fo:block-container>
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
<fo:inline>
@@ -4057,14 +4125,52 @@
</fo:inline>
</xsl:template><xsl:template match="*[local-name() = 'admitted']/*[local-name() = 'stem']">
<fo:inline>
<xsl:apply-templates/>
</fo:inline>
- </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="formula_number"> <!-- show by demand -->
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"> <!-- show in 'stem' template -->
<xsl:if test="normalize-space() != ''">
<xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
</xsl:if>
+ </xsl:template><xsl:template match="*[local-name() = 'formula'][*[local-name() = 'name']]/*[local-name() = 'stem']">
+ <fo:block xsl:use-attribute-sets="formula-style">
+
+
+
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="95%"/>
+ <fo:table-column column-width="5%"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell display-align="center">
+ <fo:block xsl:use-attribute-sets="formula-stem-block-style">
+
+
+ <xsl:if test="ancestor::*[local-name() ='annex']">
+ <xsl:attribute name="text-align">left</xsl:attribute>
+ <xsl:attribute name="margin-left">7mm</xsl:attribute>
+ </xsl:if>
+
+
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell display-align="center">
+ <fo:block xsl:use-attribute-sets="formula-stem-number-style">
+ <xsl:apply-templates select="../*[local-name() = 'name']"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'formula'][not(*[local-name() = 'name'])]/*[local-name() = 'stem']">
+ <fo:block xsl:use-attribute-sets="formula-style">
+ <fo:block xsl:use-attribute-sets="formula-stem-block-style">
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:block>
</xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
@@ -5019,16 +5125,144 @@
</fo:block-container>
</fo:block-container>
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
- <xsl:variable name="text">
+ <xsl:choose>
+ <xsl:when test="normalize-space($syntax-highlight) = 'true' and normalize-space(../@lang) != ''"> <!-- condition for turn on of highlighting -->
+ <xsl:variable name="syntax" select="java:org.metanorma.fop.Util.syntaxHighlight(., ../@lang)"/>
+ <xsl:choose>
+ <xsl:when test="normalize-space($syntax) != ''"><!-- if there is highlighted result -->
+ <xsl:apply-templates select="xalan:nodeset($syntax)" mode="syntax_highlight"/> <!-- process span tags -->
+ </xsl:when>
+ <xsl:otherwise> <!-- if case of non-succesfull syntax highlight (for instance, unknown lang), process without highlighting -->
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:template><xsl:template name="add_spaces_to_sourcecode">
+ <xsl:variable name="text_step1">
<xsl:call-template name="add-zero-spaces-equal"/>
</xsl:variable>
- <xsl:call-template name="add-zero-spaces-java">
- <xsl:with-param name="text" select="$text"/>
- </xsl:call-template>
+ <xsl:variable name="text_step2">
+ <xsl:call-template name="add-zero-spaces-java">
+ <xsl:with-param name="text" select="$text_step1"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="$text_step2"/>
+ </xsl:template><xsl:template match="*" mode="syntax_highlight">
+ <xsl:apply-templates mode="syntax_highlight"/>
+ </xsl:template><xsl:variable name="syntax_highlight_styles_">
+ <style class="hljs-addition" xsl:use-attribute-sets="hljs-addition"/>
+ <style class="hljs-attr" xsl:use-attribute-sets="hljs-attr"/>
+ <style class="hljs-attribute" xsl:use-attribute-sets="hljs-attribute"/>
+ <style class="hljs-built_in" xsl:use-attribute-sets="hljs-built_in"/>
+ <style class="hljs-bullet" xsl:use-attribute-sets="hljs-bullet"/>
+ <style class="hljs-char_and_escape_" xsl:use-attribute-sets="hljs-char_and_escape_"/>
+ <style class="hljs-code" xsl:use-attribute-sets="hljs-code"/>
+ <style class="hljs-comment" xsl:use-attribute-sets="hljs-comment"/>
+ <style class="hljs-deletion" xsl:use-attribute-sets="hljs-deletion"/>
+ <style class="hljs-doctag" xsl:use-attribute-sets="hljs-doctag"/>
+ <style class="hljs-emphasis" xsl:use-attribute-sets="hljs-emphasis"/>
+ <style class="hljs-formula" xsl:use-attribute-sets="hljs-formula"/>
+ <style class="hljs-keyword" xsl:use-attribute-sets="hljs-keyword"/>
+ <style class="hljs-link" xsl:use-attribute-sets="hljs-link"/>
+ <style class="hljs-literal" xsl:use-attribute-sets="hljs-literal"/>
+ <style class="hljs-meta" xsl:use-attribute-sets="hljs-meta"/>
+ <style class="hljs-meta_hljs-string" xsl:use-attribute-sets="hljs-meta_hljs-string"/>
+ <style class="hljs-meta_hljs-keyword" xsl:use-attribute-sets="hljs-meta_hljs-keyword"/>
+ <style class="hljs-name" xsl:use-attribute-sets="hljs-name"/>
+ <style class="hljs-number" xsl:use-attribute-sets="hljs-number"/>
+ <style class="hljs-operator" xsl:use-attribute-sets="hljs-operator"/>
+ <style class="hljs-params" xsl:use-attribute-sets="hljs-params"/>
+ <style class="hljs-property" xsl:use-attribute-sets="hljs-property"/>
+ <style class="hljs-punctuation" xsl:use-attribute-sets="hljs-punctuation"/>
+ <style class="hljs-quote" xsl:use-attribute-sets="hljs-quote"/>
+ <style class="hljs-regexp" xsl:use-attribute-sets="hljs-regexp"/>
+ <style class="hljs-section" xsl:use-attribute-sets="hljs-section"/>
+ <style class="hljs-selector-attr" xsl:use-attribute-sets="hljs-selector-attr"/>
+ <style class="hljs-selector-class" xsl:use-attribute-sets="hljs-selector-class"/>
+ <style class="hljs-selector-id" xsl:use-attribute-sets="hljs-selector-id"/>
+ <style class="hljs-selector-pseudo" xsl:use-attribute-sets="hljs-selector-pseudo"/>
+ <style class="hljs-selector-tag" xsl:use-attribute-sets="hljs-selector-tag"/>
+ <style class="hljs-string" xsl:use-attribute-sets="hljs-string"/>
+ <style class="hljs-strong" xsl:use-attribute-sets="hljs-strong"/>
+ <style class="hljs-subst" xsl:use-attribute-sets="hljs-subst"/>
+ <style class="hljs-symbol" xsl:use-attribute-sets="hljs-symbol"/>
+ <style class="hljs-tag" xsl:use-attribute-sets="hljs-tag"/>
+ <!-- <style class="hljs-tag_hljs-attr" xsl:use-attribute-sets="hljs-tag_hljs-attr"></style> -->
+ <!-- <style class="hljs-tag_hljs-name" xsl:use-attribute-sets="hljs-tag_hljs-name"></style> -->
+ <style class="hljs-template-tag" xsl:use-attribute-sets="hljs-template-tag"/>
+ <style class="hljs-template-variable" xsl:use-attribute-sets="hljs-template-variable"/>
+ <style class="hljs-title" xsl:use-attribute-sets="hljs-title"/>
+ <style class="hljs-title_and_class_" xsl:use-attribute-sets="hljs-title_and_class_"/>
+ <style class="hljs-title_and_class__and_inherited__" xsl:use-attribute-sets="hljs-title_and_class__and_inherited__"/>
+ <style class="hljs-title_and_function_" xsl:use-attribute-sets="hljs-title_and_function_"/>
+ <style class="hljs-type" xsl:use-attribute-sets="hljs-type"/>
+ <style class="hljs-variable" xsl:use-attribute-sets="hljs-variable"/>
+ <style class="hljs-variable_and_language_" xsl:use-attribute-sets="hljs-variable_and_language_"/>
+ </xsl:variable><xsl:variable name="syntax_highlight_styles" select="xalan:nodeset($syntax_highlight_styles_)"/><xsl:template match="span" mode="syntax_highlight" priority="2">
+ <!-- <fo:inline color="green" font-style="italic"><xsl:apply-templates mode="syntax_highlight"/></fo:inline> -->
+ <fo:inline>
+ <xsl:variable name="classes_">
+ <xsl:call-template name="split">
+ <xsl:with-param name="pText" select="@class"/>
+ <xsl:with-param name="sep" select="' '"/>
+ </xsl:call-template>
+ <!-- a few classes together (_and_ suffix) -->
+ <xsl:if test="contains(@class, 'hljs-char') and contains(@class, 'escape_')">
+ <item>hljs-char_and_escape_</item>
+ </xsl:if>
+ <xsl:if test="contains(@class, 'hljs-title') and contains(@class, 'class_')">
+ <item>hljs-title_and_class_</item>
+ </xsl:if>
+ <xsl:if test="contains(@class, 'hljs-title') and contains(@class, 'class_') and contains(@class, 'inherited__')">
+ <item>hljs-title_and_class__and_inherited__</item>
+ </xsl:if>
+ <xsl:if test="contains(@class, 'hljs-title') and contains(@class, 'function_')">
+ <item>hljs-title_and_function_</item>
+ </xsl:if>
+ <xsl:if test="contains(@class, 'hljs-variable') and contains(@class, 'language_')">
+ <item>hljs-variable_and_language_</item>
+ </xsl:if>
+ <!-- with parent classes (_ suffix) -->
+ <xsl:if test="contains(@class, 'hljs-keyword') and contains(ancestor::*/@class, 'hljs-meta')">
+ <item>hljs-meta_hljs-keyword</item>
+ </xsl:if>
+ <xsl:if test="contains(@class, 'hljs-string') and contains(ancestor::*/@class, 'hljs-meta')">
+ <item>hljs-meta_hljs-string</item>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="classes" select="xalan:nodeset($classes_)"/>
+
+ <xsl:for-each select="$classes/item">
+ <xsl:variable name="class_name" select="."/>
+ <xsl:for-each select="$syntax_highlight_styles/style[@class = $class_name]/@*[not(local-name() = 'class')]">
+ <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
+ </xsl:for-each>
+ </xsl:for-each>
+
+ <!-- <xsl:variable name="class_name">
+ <xsl:choose>
+ <xsl:when test="@class = 'hljs-attr' and ancestor::*/@class = 'hljs-tag'">hljs-tag_hljs-attr</xsl:when>
+ <xsl:when test="@class = 'hljs-name' and ancestor::*/@class = 'hljs-tag'">hljs-tag_hljs-name</xsl:when>
+ <xsl:when test="@class = 'hljs-string' and ancestor::*/@class = 'hljs-meta'">hljs-meta_hljs-string</xsl:when>
+ <xsl:otherwise><xsl:value-of select="@class"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:for-each select="$syntax_highlight_styles/style[@class = $class_name]/@*[not(local-name() = 'class')]">
+ <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
+ </xsl:for-each> -->
+
+ <xsl:apply-templates mode="syntax_highlight"/></fo:inline>
+ </xsl:template><xsl:template match="text()" mode="syntax_highlight" priority="2">
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']">
<xsl:if test="normalize-space() != ''">
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
<xsl:apply-templates/>
</fo:block>
@@ -5399,15 +5633,18 @@
</xsl:if>
</xsl:if>
<fo:block-container margin-left="0mm">
-
- <fo:block xsl:use-attribute-sets="quote-style">
+ <fo:block-container xsl:use-attribute-sets="quote-style">
- <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
- </fo:block>
+ <fo:block-container margin-left="0mm" margin-right="0mm">
+ <fo:block role="BlockQuote">
+ <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
+ </fo:block>
+ </fo:block-container>
+ </fo:block-container>
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
<fo:block xsl:use-attribute-sets="quote-source-style">
<!-- — ISO, ISO 7301:2011, Clause 1 -->
<xsl:apply-templates select="*[local-name() = 'author']"/>
<xsl:apply-templates select="*[local-name() = 'source']"/>
@@ -5550,10 +5787,35 @@
<xsl:text> </xsl:text>
<xsl:call-template name="insertNonBreakSpaces">
<xsl:with-param name="count" select="$count - 1"/>
</xsl:call-template>
</xsl:if>
+ </xsl:template><xsl:template match="*[local-name() = 'preferred']">
+ <xsl:variable name="level">
+ <xsl:call-template name="getLevel"/>
+ </xsl:variable>
+ <xsl:variable name="font-size">
+ inherit
+ </xsl:variable>
+ <xsl:variable name="levelTerm">
+ <xsl:call-template name="getLevelTermName"/>
+ </xsl:variable>
+ <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
+
+
+
+ <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
+ <fo:block xsl:use-attribute-sets="term-name-style">
+ <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
+ </fo:block>
+ </xsl:if>
+
+ <fo:block xsl:use-attribute-sets="preferred-term-style">
+ <xsl:call-template name="setStyle_preferred"/>
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:block>
</xsl:template><xsl:template match="*[local-name() = 'domain']">
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
<xsl:text> </xsl:text>
</xsl:template><xsl:template match="*[local-name() = 'admitted']">
<fo:block xsl:use-attribute-sets="admitted-style">
@@ -5643,28 +5905,12 @@
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
<!-- 0xA0 to space replacement -->
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
</xsl:template><xsl:variable name="ul_labels_">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <label>•</label>
-
-
+ <label>•</label>
+
</xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
<xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
<xsl:variable name="list_level">
<xsl:choose>
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
@@ -5686,10 +5932,95 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template><xsl:template match="label" mode="ul_labels">
<xsl:copy-of select="@*[not(local-name() = 'level')]"/>
<xsl:value-of select="."/>
+ </xsl:template><xsl:template name="getListItemFormat">
+ <!-- Example: for BSI <?list-type loweralpha?> -->
+ <xsl:variable name="processing_instruction_type" select="normalize-space(../preceding-sibling::*[1]/processing-instruction('list-type'))"/>
+ <xsl:choose>
+ <xsl:when test="local-name(..) = 'ul'">
+ <xsl:choose>
+ <xsl:when test="normalize-space($processing_instruction_type) = 'simple'"/>
+ <xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise> <!-- for ordered lists 'ol' -->
+
+ <!-- Example: for BSI <?list-start 2?> -->
+ <xsl:variable name="processing_instruction_start" select="normalize-space(../preceding-sibling::*[1]/processing-instruction('list-start'))"/>
+
+ <xsl:variable name="start_value">
+ <xsl:choose>
+ <xsl:when test="normalize-space($processing_instruction_start) != ''">
+ <xsl:value-of select="number($processing_instruction_start) - 1"/><!-- if start="3" then start_value=2 + xsl:number(1) = 3 -->
+ </xsl:when>
+ <xsl:when test="normalize-space(../@start) != ''">
+ <xsl:value-of select="number(../@start) - 1"/><!-- if start="3" then start_value=2 + xsl:number(1) = 3 -->
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="curr_value"><xsl:number/></xsl:variable>
+
+ <xsl:variable name="type">
+ <xsl:choose>
+ <xsl:when test="normalize-space($processing_instruction_type) != ''"><xsl:value-of select="$processing_instruction_type"/></xsl:when>
+ <xsl:when test="normalize-space(../@type) != ''"><xsl:value-of select="../@type"/></xsl:when>
+
+ <xsl:otherwise> <!-- if no @type or @class = 'steps' -->
+
+ <xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
+ <xsl:variable name="list_level">
+ <xsl:choose>
+ <xsl:when test="$list_level_ <= 5"><xsl:value-of select="$list_level_"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="$list_level_ mod 5"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$list_level mod 5 = 0">roman_upper</xsl:when> <!-- level 5 -->
+ <xsl:when test="$list_level mod 4 = 0">alphabet_upper</xsl:when> <!-- level 4 -->
+ <xsl:when test="$list_level mod 3 = 0">roman</xsl:when> <!-- level 3 -->
+ <xsl:when test="$list_level mod 2 = 0 and ancestor::*/@class = 'steps'">alphabet</xsl:when> <!-- level 2 and @class = 'steps'-->
+ <xsl:when test="$list_level mod 2 = 0">arabic</xsl:when> <!-- level 2 -->
+ <xsl:otherwise> <!-- level 1 -->
+ <xsl:choose>
+ <xsl:when test="ancestor::*/@class = 'steps'">arabic</xsl:when>
+ <xsl:otherwise>alphabet</xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="format">
+ <xsl:choose>
+ <xsl:when test="$type = 'arabic'">
+ 1.
+ </xsl:when>
+ <xsl:when test="$type = 'alphabet'">
+ a)
+ </xsl:when>
+ <xsl:when test="$type = 'alphabet_upper'">
+ A.
+ </xsl:when>
+ <xsl:when test="$type = 'roman'">
+ i)
+ </xsl:when>
+ <xsl:when test="$type = 'roman_upper'">I.</xsl:when>
+ <xsl:otherwise>1.</xsl:otherwise> <!-- for any case, if $type has non-determined value, not using -->
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:number value="$start_value + $curr_value" format="{normalize-space($format)}" lang="en"/>
+
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
<xsl:choose>
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
<fo:block-container>
<xsl:attribute name="margin-left">
@@ -5701,22 +6032,70 @@
<fo:block-container margin-left="0mm">
<fo:block>
- <xsl:apply-templates select="." mode="ul_ol"/>
+ <xsl:apply-templates select="." mode="list"/>
</fo:block>
</fo:block-container>
</fo:block-container>
</xsl:when>
<xsl:otherwise>
<fo:block>
- <xsl:apply-templates select="." mode="ul_ol"/>
+ <xsl:apply-templates select="." mode="list"/>
</fo:block>
</xsl:otherwise>
</xsl:choose>
- </xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="dash" select="'–'"/><xsl:variable name="bookmark_in_fn">
+ </xsl:template><xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
+ <fo:list-block xsl:use-attribute-sets="list-style">
+
+
+
+
+
+
+
+
+
+ <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
+ </fo:list-block>
+ <!-- <xsl:for-each select="./iho:note">
+ <xsl:call-template name="note"/>
+ </xsl:for-each> -->
+ <xsl:apply-templates select="./*[local-name() = 'note']"/>
+ </xsl:template><xsl:template match="*[local-name()='li']">
+ <fo:list-item xsl:use-attribute-sets="list-item-style">
+ <xsl:copy-of select="@id"/>
+
+
+
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block xsl:use-attribute-sets="list-item-label-style">
+
+
+
+ <xsl:call-template name="getListItemFormat"/>
+ </fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
+ <fo:block>
+
+
+
+
+
+ <xsl:apply-templates/>
+
+ <!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
+
+ <xsl:for-each select="./bsi:note">
+ <xsl:call-template name="note"/>
+ </xsl:for-each> -->
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="bookmark_in_fn">
<xsl:for-each select="//*[local-name() = 'bookmark'][ancestor::*[local-name() = 'fn']]">
<bookmark><xsl:value-of select="@id"/></bookmark>
</xsl:for-each>
</xsl:variable><xsl:template match="@*|node()" mode="index_add_id">
<xsl:copy>
@@ -5734,11 +6113,11 @@
<xsl:apply-templates mode="index_add_id"/>
</xsl:copy>
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
<xsl:if test="@to">
- <xsl:value-of select="$dash"/>
+ <xsl:value-of select="$en_dash"/>
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
<xsl:attribute name="id">
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
@@ -5759,11 +6138,11 @@
<xsl:param name="element"/>
<xsl:param name="remove" select="'false'"/>
<xsl:param name="target"/>
<!-- <node></node> -->
<xsl:choose>
- <xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $dash) and $remove = 'true'">
+ <xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $en_dash) and $remove = 'true'">
<!-- skip text (i.e. remove it) and process next element -->
<!-- [removed_<xsl:value-of select="."/>] -->
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
<xsl:with-param name="target"><xsl:value-of select="$target"/></xsl:with-param>
</xsl:apply-templates>
@@ -5843,25 +6222,38 @@
<xsl:variable name="item_number">
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
</xsl:variable>
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
<xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'title']" priority="4">
+ <fo:block xsl:use-attribute-sets="indexsect-title-style">
+ <!-- Index -->
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']/*[local-name() = 'title']" priority="4">
+ <!-- Letter A, B, C, ... -->
+ <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
+ <xsl:apply-templates/>
+ </fo:block>
</xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']" priority="4">
<xsl:apply-templates/>
<fo:block>
- <xsl:if test="following-sibling::*[local-name() = 'clause']">
- <fo:block> </fo:block>
- </xsl:if>
+ <xsl:if test="following-sibling::*[local-name() = 'clause']">
+ <fo:block> </fo:block>
+ </xsl:if>
</fo:block>
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'ul']" priority="4">
<xsl:apply-templates/>
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
<xsl:apply-templates/>
</fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/text()">
+ <!-- to split by '_' and other chars -->
+ <xsl:call-template name="add-zero-spaces-java"/>
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
<fo:inline id="{@id}" font-size="1pt"/>
</xsl:template><xsl:template match="*[local-name() = 'errata']">
<!-- <row>
<date>05-07-2013</date>
@@ -6160,11 +6552,11 @@
<fo:table-body>
<xsl:apply-templates/>
</fo:table-body>
</fo:table>
</fo:block>
- </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']" priority="2">
<fo:table-row min-height="5mm">
<xsl:apply-templates/>
</fo:table-row>
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
<xsl:apply-templates/>
@@ -6396,13 +6788,10 @@
<xsl:choose>
<xsl:when test="position() != last()"><xsl:value-of select="$charDelim"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
</xsl:choose>
</xsl:template><xsl:template name="addPDFUAmeta">
- <xsl:variable name="lang">
- <xsl:call-template name="getLang"/>
- </xsl:variable>
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
<pdf:dictionary type="normal" key="ViewerPreferences">
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
</pdf:dictionary>
</pdf:catalog>
@@ -6626,14 +7015,16 @@
</xsl:if>
</xsl:template><xsl:template name="getLocalizedString">
<xsl:param name="key"/>
<xsl:param name="formatted">false</xsl:param>
<xsl:param name="lang"/>
+ <xsl:param name="returnEmptyIfNotFound">false</xsl:param>
<xsl:variable name="curr_lang">
<xsl:choose>
<xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
+ <xsl:when test="$returnEmptyIfNotFound = 'true'"/>
<xsl:otherwise>
<xsl:call-template name="getLang"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
@@ -6664,9 +7055,10 @@
<xsl:otherwise>
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
+ <xsl:when test="$returnEmptyIfNotFound = 'true'"/>
<xsl:otherwise>
<xsl:variable name="key_">
<xsl:call-template name="capitalize">
<xsl:with-param name="str" select="translate($key, '_', ' ')"/>
</xsl:call-template>
\ No newline at end of file