lib/isodoc/nist/nist.csts.xsl in metanorma-nist-1.2.15 vs lib/isodoc/nist/nist.csts.xsl in metanorma-nist-1.2.16
- old
+ new
@@ -3,10 +3,11 @@
<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:variable name="pageWidth" select="'8.5in'"/>
@@ -90,11 +91,13 @@
<fo:region-end region-name="right" extent="1in"/>
</fo:simple-page-master>
</fo:layout-master-set>
- <xsl:call-template name="addPDFUAmeta"/>
+ <fo:declarations>
+ <xsl:call-template name="addPDFUAmeta"/>
+ </fo:declarations>
<xsl:call-template name="addBookmarks">
<xsl:with-param name="contents" select="$contents"/>
</xsl:call-template>
@@ -232,69 +235,46 @@
<fo:flow flow-name="xsl-region-body">
<fo:block margin-top="18pt">
<!-- Abstract -->
- <xsl:if test="/nist:nist-standard/nist:preface/nist:abstract">
- <xsl:variable name="title-abstract">
- <xsl:call-template name="getTitle">
- <xsl:with-param name="name" select="'title-abstract'"/>
- </xsl:call-template>
- </xsl:variable>
- <fo:block font-family="Arial" text-align="center" font-weight="bold" color="{$color}" margin-bottom="12pt"><xsl:value-of select="$title-abstract"/></fo:block>
- <xsl:apply-templates select="/nist:nist-standard/nist:preface/nist:abstract"/>
- </xsl:if>
+ <!-- Keywords -->
+ <!-- Acknowledgements -->
+ <xsl:apply-templates select="/nist:nist-standard/nist:preface/*"/>
+
+ <!-- <xsl:apply-templates select="/nist:nist-standard/nist:preface/nist:abstract"/> -->
+ <!-- <xsl:apply-templates select="/nist:nist-standard/nist:preface/nist:acknowledgements"/> -->
+
<!-- Keywords -->
- <xsl:if test="/nist:nist-standard/nist:bibdata/nist:keyword">
+ <!-- <xsl:if test="/nist:nist-standard/nist:bibdata/nist:keyword">
<fo:block font-family="Arial" text-align="center" font-weight="bold" color="{$color}" margin-bottom="12pt">
- <xsl:variable name="title-keywords">
- <xsl:call-template name="getTitle">
- <xsl:with-param name="name" select="'title-keywords'"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="$title-keywords"/>
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">keywords</xsl:with-param>
+ </xsl:call-template>
</fo:block>
<fo:block margin-bottom="12pt" text-align="justify">
<xsl:call-template name="insertKeywords">
- <xsl:with-param name="charAtEnd"/>
+ <xsl:with-param name="charAtEnd"></xsl:with-param>
<xsl:with-param name="charDelim">; </xsl:with-param>
</xsl:call-template>
- <!-- <xsl:for-each select="/nist:nist-standard/nist:bibdata//nist:keyword">
- <xsl:sort data-type="text" order="ascending"/>
- <xsl:apply-templates/>
- <xsl:choose>
- <xsl:when test="position() != last()">; </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
- </xsl:for-each> -->
</fo:block>
- </xsl:if>
-
- <xsl:if test="/nist:nist-standard/nist:preface/nist:acknowledgements">
- <xsl:variable name="title-acknowledgements">
- <xsl:call-template name="getTitle">
- <xsl:with-param name="name" select="'title-acknowledgements'"/>
- </xsl:call-template>
- </xsl:variable>
- <fo:block font-family="Arial" text-align="center" font-weight="bold" color="{$color}" margin-top="18pt" margin-bottom="12pt"><xsl:value-of select="$title-acknowledgements"/></fo:block>
- <xsl:apply-templates select="/nist:nist-standard/nist:preface/nist:acknowledgements"/>
- </xsl:if>
+ </xsl:if> -->
-
<!-- Disclaimer -->
<!-- Additional Information -->
<!-- Comments on this publication may be submitted to -->
<xsl:if test="/nist:nist-standard/nist:boilerplate/nist:legal-statement">
<xsl:apply-templates select="/nist:nist-standard/nist:boilerplate/nist:legal-statement"/>
</xsl:if>
<fo:block font-family="Arial" text-align="center" font-weight="bold" color="{$color}" margin-bottom="12pt">Feedback</fo:block>
<xsl:text>Feedback on this publication is welcome, and can be sent to: code-signing@nist.gov.</xsl:text>
- <xsl:apply-templates select="/nist:nist-standard/nist:preface/nist:clause"/>
-
+ <!-- Keywords -->
+ <!-- <xsl:apply-templates select="/nist:nist-standard/nist:preface/nist:clause"/> -->
+
<fo:block break-after="page"/>
<!-- <xsl:apply-templates select="/nist:nist-standard/nist:preface/nist:foreword"/> -->
<!-- Executive summary -->
@@ -420,11 +400,11 @@
<xsl:apply-templates select="/nist:nist-standard/nist:sections/*"/>
<xsl:apply-templates select="/nist:nist-standard/nist:annex"/>
<!-- Bibliography -->
- <xsl:apply-templates select="/nist:nist-standard/nist:bibliography/nist:references"/>
+ <xsl:apply-templates select="/nist:nist-standard/nist:bibliography"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
@@ -619,29 +599,37 @@
<!-- ====== -->
<!-- title -->
<!-- ====== -->
<xsl:template match="nist:legal-statement//nist:title">
- <fo:block font-family="Arial" font-size="12pt" font-weight="bold" text-align="center" margin-bottom="12pt" color="{$color}">
+ <fo:block font-family="Arial" font-size="12pt" font-weight="bold" text-align="center" margin-bottom="12pt" color="{$color}" keep-with-next="always">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="nist:executivesummary//nist:title">
- <fo:block-container color="white" background-color="black" margin-bottom="12pt">
+ <fo:block-container color="white" background-color="black" margin-bottom="12pt" keep-with-next="always">
<fo:block font-family="Arial" font-size="12pt" font-weight="bold" text-align="left" margin-left="4mm" padding-top="1mm">
<xsl:apply-templates/>
</fo:block>
</fo:block-container>
</xsl:template>
<xsl:template match="nist:preface//nist:title" priority="3">
- <fo:block font-family="Arial" font-size="12pt" font-weight="bold" text-align="center" space-before="12pt" margin-bottom="12pt" color="{$color}">
+ <fo:block font-family="Arial" font-size="12pt" font-weight="bold" text-align="center" space-before="12pt" margin-bottom="12pt" color="{$color}" keep-with-next="always">
+ <xsl:if test="local-name(..) = 'acknowledgements'">
+ <xsl:attribute name="space-before">18pt</xsl:attribute>
+ </xsl:if>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
+ <xsl:template match="/nist:nist-standard/nist:bibliography">
+ <fo:block break-after="page"/>
+ <xsl:apply-templates/>
+ </xsl:template>
+
<xsl:template match="nist:references">
<fo:block id="{@id}">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
@@ -4571,11 +4559,11 @@
</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() = 'bookmark']">
- <fo:inline id="{@id}"/>
+ </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>
<type>Editorial</type>
<change>Changed CA-9 Priority Code from P1 to P2 in <xref target="tabled2"/>.</change>
\ No newline at end of file