lib/isodoc/ogc/ogc.best-practice.xsl in metanorma-ogc-1.2.0 vs lib/isodoc/ogc/ogc.best-practice.xsl in metanorma-ogc-1.2.1
- old
+ new
@@ -42,30 +42,36 @@
<xsl:variable name="color" select="'rgb(14, 26, 133)'"/>
<xsl:variable name="contents">
<contents>
- <!-- Abstract, Keywords, Preface, Submitting Organizations, Submitters -->
+ <!-- Abstract, Keywords, Preface, Submitting Organizations, Submitters -->
+ <!-- <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/*" mode="contents"/> -->
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:abstract" mode="contents"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'keyword']" mode="contents"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:foreword" mode="contents"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:introduction" mode="contents"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'submitting_orgs']" mode="contents"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:submitters" mode="contents"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'submitting_orgs') and not(@type = 'keyword')]" mode="contents"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:acknowledgements" mode="contents"/>
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/*" mode="contents"/>
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:clause[@id='_scope']" mode="contents"/>
-
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:clause[@id='conformance' or @id='_conformance']" mode="contents"/>
-
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:clause[@type='scope']" mode="contents"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:clause[@type='conformance']" mode="contents"/>
<!-- Normative references -->
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:bibliography/ogc:references[@id = '_normative_references' or @id = '_references' or @id = 'references']" mode="contents"/>
-
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:bibliography/ogc:references[@normative='true']" mode="contents"/>
<!-- Terms and definitions -->
<xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:terms" mode="contents"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:definitions" mode="contents"/>
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/*[local-name() != 'terms' and not(@id='_scope') and not(@id='conformance') and not(@id='_conformance')]" mode="contents"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:clause[not(@type='scope') and not(@type='conformance')]" mode="contents"/>
<xsl:apply-templates select="/ogc:ogc-standard/ogc:annex" mode="contents"/>
<!-- Bibliography -->
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:bibliography/ogc:references[@id != '_normative_references' and @id != '_references' and @id != 'references']" mode="contents"/> <!-- [position() > 1] -->
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:bibliography/ogc:references[not(@normative='true')]" mode="contents"/>
</contents>
</xsl:variable>
@@ -408,23 +414,26 @@
</fo:basic-link>
</fo:block>
</xsl:for-each>
</xsl:if>
- <xsl:if test="//ogc:permission[@id and ogc:name] or //ogc:recommendation[@id and ogc:name] or //ogc:requirement[@id and ogc:name]">
+ <!-- <xsl:if test="//ogc:permission[@id and ogc:name] or //ogc:recommendation[@id and ogc:name] or //ogc:requirement[@id and ogc:name]"> -->
+ <xsl:if test="//ogc:table[.//ogc:p[@class = 'RecommendationTitle']]">
<fo:block font-size="12pt"> </fo:block>
<fo:block font-size="12pt"> </fo:block>
<xsl:variable name="title-list-recommendations">
<xsl:call-template name="getTitle">
<xsl:with-param name="name" select="'title-list-recommendations'"/>
</xsl:call-template>
</xsl:variable>
<fo:block font-size="14pt" font-weight="bold" space-before="48pt" margin-bottom="15.5pt"><xsl:value-of select="$title-list-recommendations"/></fo:block>
- <xsl:for-each select="//ogc:permission[@id and ogc:name] | //ogc:recommendation[@id and ogc:name] | //ogc:requirement[@id and ogc:name]">
+ <!-- <xsl:for-each select="//ogc:permission[@id and ogc:name] | //ogc:recommendation[@id and ogc:name] | //ogc:requirement[@id and ogc:name]"> -->
+ <xsl:for-each select="//ogc:table[.//ogc:p[@class = 'RecommendationTitle']]">
+ <xsl:variable name="table_id" select="@id"/>
<fo:block text-align-last="justify" margin-top="6pt">
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{ogc:name}">
- <xsl:apply-templates select="ogc:name" mode="contents"/>
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{.//ogc:p[@class = 'RecommendationTitle'][1]/text()}">
+ <xsl:apply-templates select=".//ogc:p[@class = 'RecommendationTitle'][ancestor::ogc:table[1][@id= $table_id]]/node()"/>
<fo:inline keep-together.within-line="always">
<fo:leader leader-pattern="dots"/>
<fo:page-number-citation ref-id="{@id}"/>
</fo:inline>
</fo:basic-link>
@@ -434,12 +443,30 @@
</fo:block-container>
<!-- Abstract, Keywords, Preface, Submitting Organizations, Submitters -->
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/*" mode="preface"/>
-
+ <!-- <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/*" mode="preface"/> -->
+ <xsl:if test="/ogc:ogc-standard/ogc:preface/ogc:abstract">
+ <fo:block break-after="page"/>
+ </xsl:if>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:abstract"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'keyword']"/>
+ <xsl:if test="/ogc:ogc-standard/ogc:preface/ogc:foreword">
+ <fo:block break-after="page"/>
+ </xsl:if>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:foreword"/>
+ <xsl:if test="/ogc:ogc-standard/ogc:preface/ogc:introduction">
+ <fo:block break-after="page"/>
+ </xsl:if>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:introduction"/>
+
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'submitting_orgs']"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:submitters"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'submitting_orgs') and not(@type = 'keyword')]"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:acknowledgements"/>
+
</fo:flow>
</fo:page-sequence>
<!-- Document Pages -->
@@ -457,26 +484,27 @@
<xsl:value-of select="$doctitle"/>
</fo:block>
<fo:block line-height="125%">
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:clause[@id='_scope']"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:clause[@type='scope']"/>
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:clause[@id='conformance' or @id='_conformance']"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:clause[@type='conformance']"/>
<!-- Normative references -->
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:bibliography/ogc:references[@id = '_normative_references' or @id = '_references' or @id = 'references']"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:bibliography/ogc:references[@normative='true']"/>
<!-- Terms and definitions -->
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:terms"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:terms"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:definitions"/>
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/*[local-name() != 'terms' and not(@id='_scope') and not(@id='conformance') and not(@id='_conformance')]"/>
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:clause[not(@type='scope') and not(@type='conformance')]"/>
<xsl:apply-templates select="/ogc:ogc-standard/ogc:annex"/>
<!-- Bibliography -->
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:bibliography/ogc:references[@id != '_normative_references' and @id != '_references' and @id != 'references']"/> <!-- [position() > 1] -->
+ <xsl:apply-templates select="/ogc:ogc-standard/ogc:bibliography/ogc:references[not(@normative='true')]"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
@@ -636,21 +664,11 @@
<xsl:call-template name="setId"/>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
- <xsl:template match="ogc:ogc-standard/ogc:preface/*" mode="preface">
- <xsl:if test="local-name() = 'introduction' or local-name() = 'abstract' or local-name() = 'foreword'">
- <fo:block break-after="page"/>
- </xsl:if>
- <xsl:apply-templates select="current()"/>
- </xsl:template>
-
-
-
-
<!-- ====== -->
<!-- title -->
<!-- ====== -->
<xsl:template match="ogc:annex/ogc:title">
@@ -854,11 +872,11 @@
</xsl:template>
<xsl:template match="ogc:ul | ogc:ol">
- <fo:list-block provisional-distance-between-starts="6.5mm" margin-bottom="12pt" line-height="115%">
+ <fo:list-block provisional-distance-between-starts="6.5mm" space-after="12pt" line-height="115%">
<xsl:if test="ancestor::ogc:ul | ancestor::ogc:ol">
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
</xsl:if>
<xsl:if test="following-sibling::*[1][local-name() = 'ul' or local-name() = 'ol']">
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
@@ -936,16 +954,13 @@
<xsl:apply-templates/>
</fo:block>
</fo:block>
</xsl:template>
-
-
-
<!-- [position() > 1] -->
- <xsl:template match="ogc:references[@id != '_normative_references' and @id != '_references' and @id != 'references']">
+ <xsl:template match="ogc:references[not(@normative='true')]">
<fo:block break-after="page"/>
<fo:block id="{@id}" line-height="120%">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
@@ -956,11 +971,11 @@
</fo:block>
</xsl:template>
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
<!-- <xsl:template match="ogc:references[@id = '_bibliography']/ogc:bibitem"> [position() > 1] -->
- <xsl:template match="ogc:references[@id != '_normative_references' and @id != '_references' and @id != 'references']/ogc:bibitem">
+ <xsl:template match="ogc:references[not(@normative='true')]/ogc:bibitem">
<fo:list-block id="{@id}" margin-bottom="12pt" provisional-distance-between-starts="12mm">
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block>
<fo:inline>
@@ -1029,14 +1044,14 @@
</fo:list-item>
</fo:list-block>
</xsl:template>
<!-- <xsl:template match="ogc:references[@id = '_bibliography']/ogc:bibitem" mode="contents"/> [position() > 1] -->
- <xsl:template match="ogc:references[@id != '_normative_references' and @id != '_references' and @id != 'references']/ogc:bibitem" mode="contents"/>
+ <xsl:template match="ogc:references[not(@normative='true')]/ogc:bibitem" mode="contents"/>
<!-- <xsl:template match="ogc:references[@id = '_bibliography']/ogc:bibitem/ogc:title"> [position() > 1]-->
- <xsl:template match="ogc:references[@id != '_normative_references' and @id != '_references' and @id != 'references']/ogc:bibitem/ogc:title">
+ <xsl:template match="ogc:references[not(@normative='true')]/ogc:bibitem/ogc:title">
<fo:inline font-style="italic">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
@@ -1374,10 +1389,11 @@
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
+
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
@@ -1395,12 +1411,14 @@
<xsl:attribute name="keep-with-next">always</xsl:attribute>
+
+
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
@@ -1411,10 +1429,12 @@
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
+
+
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
<xsl:attribute name="padding-right">10mm</xsl:attribute>
@@ -1435,10 +1455,11 @@
<xsl:attribute name="font-size">11pt</xsl:attribute>
+
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
<xsl:attribute name="font-size">12pt</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
<xsl:attribute name="margin-top">12pt</xsl:attribute>
@@ -1583,11 +1604,11 @@
-
+
</xsl:attribute-set><xsl:attribute-set name="formula-style">
</xsl:attribute-set><xsl:attribute-set name="image-style">
<xsl:attribute name="text-align">center</xsl:attribute>
@@ -1633,11 +1654,47 @@
</xsl:attribute-set><xsl:attribute-set name="definition-style">
<xsl:attribute name="space-after">6pt</xsl:attribute>
- </xsl:attribute-set><xsl:template match="text()">
+ </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
+ </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
+
+ <!-- Normative references -->
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
+ <!-- Terms and definitions -->
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
+ <!-- Another main sections -->
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
+ <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
+ <!-- Bibliography -->
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault">
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
+ </xsl:template><xsl:template name="processMainSectionsDefault">
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
+
+ <!-- Normative references -->
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
+ <!-- Terms and definitions -->
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
+ <!-- Another main sections -->
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
+ <xsl:apply-templates select="/*/*[local-name()='annex']"/>
+ <!-- Bibliography -->
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
+ </xsl:template><xsl:template match="text()">
<xsl:value-of select="."/>
</xsl:template><xsl:template match="*[local-name()='br']">
<xsl:value-of select="$linebreak"/>
</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"/> -->
@@ -1716,10 +1773,11 @@
<xsl:attribute name="margin-right">0mm</xsl:attribute>
<xsl:attribute name="space-after">12pt</xsl:attribute>
+
<fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
@@ -1733,10 +1791,11 @@
<xsl:attribute name="font-size">10pt</xsl:attribute>
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
<xsl:choose>
<xsl:when test=". = 1 or . = 0">
<fo:table-column column-width="proportional-column-width(2)"/>
</xsl:when>
@@ -1983,18 +2042,27 @@
<xsl:apply-templates/>
</fo:table-row>
</xsl:template><xsl:template match="*[local-name()='th']">
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
+ <xsl:attribute name="text-align">
+ <xsl:choose>
+ <xsl:when test="@align">
+ <xsl:value-of select="@align"/>
+ </xsl:when>
+ <xsl:otherwise>center</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+
<xsl:if test="@colspan">
<xsl:attribute name="number-columns-spanned">
<xsl:value-of select="@colspan"/>
</xsl:attribute>
</xsl:if>
@@ -2007,10 +2075,18 @@
<xsl:apply-templates/>
</fo:block>
</fo:table-cell>
</xsl:template><xsl:template match="*[local-name()='td']">
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
+ <xsl:attribute name="text-align">
+ <xsl:choose>
+ <xsl:when test="@align">
+ <xsl:value-of select="@align"/>
+ </xsl:when>
+ <xsl:otherwise>left</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
@@ -3230,10 +3306,121 @@
</xsl:if>
</xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']">
<fo:block xsl:use-attribute-sets="recommendation-label-style">
<xsl:apply-templates/>
</fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
+ <fo:block-container margin-left="0mm" margin-right="0mm">
+ <fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
+ <xsl:variable name="simple-table">
+ <xsl:call-template name="getSimpleTable"/>
+ </xsl:variable>
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
+ <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
+ <fo:table-column column-width="35mm"/>
+ <fo:table-column column-width="115mm"/>
+ </xsl:if>
+ <xsl:apply-templates mode="requirement"/>
+ </fo:table>
+ <!-- fn processing -->
+ <xsl:if test=".//*[local-name() = 'fn']">
+ <xsl:for-each select="*[local-name() = 'tbody']">
+ <fo:block font-size="90%" border-bottom="1.pt solid black">
+ <xsl:call-template name="fn_display"/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ </fo:block-container>
+ </fo:block-container>
+ </xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
+ <fo:table-header>
+ <xsl:apply-templates mode="requirement"/>
+ </fo:table-header>
+ </xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
+ <fo:table-body>
+ <xsl:apply-templates mode="requirement"/>
+ </fo:table-body>
+ </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
+ <fo:table-row>
+ <xsl:apply-templates mode="requirement"/>
+ </fo:table-row>
+ </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
+ <fo:table-cell text-align="{@align}">
+ <xsl:attribute name="text-align">
+ <xsl:choose>
+ <xsl:when test="@align">
+ <xsl:value-of select="@align"/>
+ </xsl:when>
+ <xsl:otherwise>center</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:if test="@colspan">
+ <xsl:attribute name="number-columns-spanned">
+ <xsl:value-of select="@colspan"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@rowspan">
+ <xsl:attribute name="number-rows-spanned">
+ <xsl:value-of select="@rowspan"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
+ <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
+ </xsl:if>
+ <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
+ <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
+ </xsl:if>
+
+ <fo:block>
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:table-cell>
+ </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
+ <fo:table-cell text-align="{@align}">
+ <xsl:attribute name="text-align">
+ <xsl:choose>
+ <xsl:when test="@align">
+ <xsl:value-of select="@align"/>
+ </xsl:when>
+ <xsl:otherwise>left</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:if test="@colspan">
+ <xsl:attribute name="number-columns-spanned">
+ <xsl:value-of select="@colspan"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@rowspan">
+ <xsl:attribute name="number-rows-spanned">
+ <xsl:value-of select="@rowspan"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
+ <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
+ <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
+ <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
+ </xsl:if>
+ </xsl:if>
+
+ <fo:block>
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:table-cell>
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
+ <fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
+ <fo:block margin-bottom="10pt">
+ <xsl:apply-templates/>
+ </fo:block>
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
<xsl:apply-templates/>
</fo:block>
@@ -3491,11 +3678,11 @@
- <xsl:variable name="pos"><xsl:number count="ogc:sections/ogc:clause[not(@id='_scope') and not(@id='conformance') and not(@id='_conformance')]"/></xsl:variable> <!-- | ogc:sections/ogc:terms -->
+ <xsl:variable name="pos"><xsl:number count="ogc:sections/ogc:clause[not(@type='scope') and not(@type='conformance')]"/></xsl:variable> <!-- | ogc:sections/ogc:terms -->
<xsl:if test="$pos >= 2">
<xsl:attribute name="space-before">18pt</xsl:attribute>
</xsl:if>
@@ -3519,11 +3706,11 @@
</fo:block>
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
<fo:block id="{@id}">
<xsl:apply-templates/>
</fo:block>
- </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@id = '_normative_references' or @id = '_references']">
+ </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
<fo:block id="{@id}">
<xsl:apply-templates/>
</fo:block>
</xsl:template><xsl:template match="*[local-name() = 'annex']">
@@ -3771,10 +3958,11 @@
-
+
+
</xsl:variable>
<xsl:if test="$documentNS != $XSLNS">
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
</xsl:if>
</xsl:template><xsl:template name="getLanguage">
\ No newline at end of file