..
/
download
<?xml version='1.0'?>
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- 8/20/11 - kr - Corrected keep with previous problem on wcn paras -->
<!-- From 3031 - Warning, caution, and note text shall be indented on the right and left.-->
<!-- From 3031 - The header WARNING, CAUTION, or NOTE shall be bold and centered above the appropriate text. Headers shall not be numbered. When a warning, caution, or note consists of two or more paragraphs, the header WARNING, CAUTION, or NOTE shall not be repeated above each paragraph.-->
<xsl:template match="warningsAndCautions"/>
<xsl:template match="warning">
<fo:block>
<xsl:call-template name="wcn"/>
<fo:block font-weight="bold" text-align="center" padding-after="2pt" keep-with-next.within-page="always">
<xsl:choose>
<xsl:when test="ancestor::table | ancestor:: checkListItems">
<xsl:attribute name="end-indent">10pt</xsl:attribute>
<xsl:attribute name="start-indent">2pt</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="end-indent">42pt</xsl:attribute>
<xsl:attribute name="start-indent">34pt</xsl:attribute>
<xsl:attribute name="font-size">12pt</xsl:attribute>
<xsl:attribute name="space-before">.25pt</xsl:attribute>
<xsl:attribute name="space-after">.25pt</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:text>WARNING</xsl:text>
</fo:block>
<!-- KR - 3/30/11, Moved selection of symbol so they all appear in the same block -->
<fo:block text-align="center">
<xsl:apply-templates select="symbol"/>
</fo:block>
<xsl:apply-templates select="*[not(self::symbol)]"/>
</fo:block>
</xsl:template>
<xsl:template match="caution">
<fo:block>
<xsl:call-template name="wcn"/>
<fo:block space-before=".25in" space-after=".25in"
font-size="12pt" font-weight="bold"
keep-with-next="always" text-align="center"
padding-before="4pt" padding-after="2pt"
padding-right="3pt" padding-left="4pt">
<xsl:text>CAUTION</xsl:text>
</fo:block>
<!-- KR - 3/30/11 - Moved selection of symbol so they all appear in the same block -->
<fo:block text-align="center">
<xsl:apply-templates select="symbol"/>
</fo:block>
<xsl:apply-templates select="*[not(self::symbol)]"/>
</fo:block>
</xsl:template>
<xsl:template match="note">
<fo:block>
<xsl:call-template name="wcn"/>
<fo:block
font-size="12pt"
font-weight="bold"
text-align="center" keep-with-next="always">
<xsl:if test="@changeMark = 1">
<fo:inline>
<fo:change-bar-begin change-bar-style="solid" change-bar-color="black"
change-bar-offset="8pt" change-bar-placement="left"/>
<fo:change-bar-end/>
</fo:inline>
</xsl:if>
<xsl:text>NOTE</xsl:text>
</fo:block>
<!-- KR - 3/30/11 - Moved selection of symbol so they all appear in the same block -->
<fo:block text-align="center">
<xsl:apply-templates select="symbol"/>
</fo:block>
<xsl:apply-templates select="*[not(self::symbol)]"/>
</fo:block>
</xsl:template>
<!-- 3031: When a warning, caution, or note consists of two or more paragraphs, the header WARNING, CAUTION, or NOTE shall not be repeated above each paragraph. -->
<xsl:template match="note/notePara | warning/warningAndCautionPara | caution/warningAndCautionPara" priority="1">
<xsl:choose>
<xsl:when test="count(../para)>1">
<fo:block text-indent="-6pt" space-before="6pt" text-align="left" keep-with-previous.within-page="always">
<xsl:text>• </xsl:text>
<xsl:apply-templates/>
</fo:block>
</xsl:when>
<xsl:when test="//dmodule/identAndStatusSection/dmAddress/dmIdent/dmCode/@infoCode='200' and //dmodule/identAndStatusSection/dmAddress/dmIdent/dmCode/@infoCodeVariant='B'">
<fo:block space-before="6pt" text-align="left" start-indent="0.25in" end-indent="0.25in">
<xsl:apply-templates/>
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block space-before="6pt" text-align="left" start-indent="1.25in" end-indent="1.25in" keep-with-previous.within-page="always">
<xsl:apply-templates/>
</fo:block>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- From 30301 - Layout shall not result in warnings, cautions, and notes divided so first lines of text or groups of icons appear on one page and remaining lines or groups of icons on another page. -->
<xsl:template name="wcn">
<xsl:attribute name="space-before">10pt</xsl:attribute>
<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
<!--
<xsl:attribute name="margin-left">3em</xsl:attribute>
<xsl:attribute name="margin-right">3em</xsl:attribute>
-->
<xsl:attribute name="start-indent">0pt</xsl:attribute>
<xsl:attribute name="space-after">10pt</xsl:attribute>
<xsl:attribute name="space-after.conditionality">retain</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
gopher://khzae.net/0/s1kd/links/projects/3031/sample/PhunGun/CSDB/FO-3031-A00-S1000DGUN-WCN_001-00_EN-US.xsl