diff options
author | 2010-09-12 16:07:40 -0700 | |
---|---|---|
committer | 2010-09-12 16:07:40 -0700 | |
commit | 2188edf0eef56f96a5196c7911a0844235fcf458 (patch) | |
tree | 7de8a6e278d1bf88bc9964b329235f22c906155c | |
parent | Massive XSL changes. (diff) | |
download | www-redesign-2188edf0eef56f96a5196c7911a0844235fcf458.tar.gz www-redesign-2188edf0eef56f96a5196c7911a0844235fcf458.tar.bz2 www-redesign-2188edf0eef56f96a5196c7911a0844235fcf458.zip |
Split disclaimer template into disclaimer.xsl
Recorder xsl imports to be alpha order
-rw-r--r-- | xml/htdocs/xsl/disclaimer.xsl | 34 | ||||
-rw-r--r-- | xml/htdocs/xsl/guide.xsl | 39 |
2 files changed, 39 insertions, 34 deletions
diff --git a/xml/htdocs/xsl/disclaimer.xsl b/xml/htdocs/xsl/disclaimer.xsl new file mode 100644 index 00000000..901857c0 --- /dev/null +++ b/xml/htdocs/xsl/disclaimer.xsl @@ -0,0 +1,34 @@ +<!-- +call-template show-disclaimer +This prints an obsolete disclaimer on documents that have this field +Typically this is used to note obsolete documents (see @disclaimed='obsolete') +Optionally offer a redirect link to a new page fir @redirect +--> +<xsl:template name="show-disclaimer"> + <!-- Disclaimer stuff --> + <xsl:if test="/*[1][@disclaimer] or /*[1][@redirect]"> + <table class="ncontent" align="center" width="90%" border="2px" cellspacing="0" cellpadding="4px"> + <xsl:if test="/*[1]/@disclaimer='obsolete'"> + <xsl:attribute name="style">margin-top:40px;margin-bottom:30px</xsl:attribute> + </xsl:if> + <tr> + <td bgcolor="#ddddff"> + <p class="note"> + <xsl:if test="/*[1][@disclaimer]"> + <xsl:if test="/*[1]/@disclaimer='obsolete'"> + <xsl:attribute name="style">font-size:1.3em</xsl:attribute> + </xsl:if> + <b><xsl:value-of select="func:gettext('disclaimer')"/>: </b> + <xsl:apply-templates select="func:gettext(/*[1]/@disclaimer)"/> + </xsl:if> + <xsl:if test="/*[1][@redirect]"> + <xsl:apply-templates select="func:gettext('redirect')"> + <xsl:with-param name="paramlink" select="/*[1]/@redirect"/> + </xsl:apply-templates> + </xsl:if> + </p> + </td> + </tr> + </table> + </xsl:if> +</xsl:template> diff --git a/xml/htdocs/xsl/guide.xsl b/xml/htdocs/xsl/guide.xsl index 44d8da52..06707a74 100644 --- a/xml/htdocs/xsl/guide.xsl +++ b/xml/htdocs/xsl/guide.xsl @@ -19,15 +19,16 @@ doctype-system="http://www.w3.org/TR/html4/loose.dtd"/> <!-- Include external stylesheets --> +<xsl:include href="/xsl/ads.xsl" /> <xsl:include href="/xsl/content.xsl" /> +<xsl:include href="/xsl/devmap.xsl" /> +<xsl:include href="/xsl/disclaimer.xsl" /> +<xsl:include href="/xsl/doc-struct.xsl" /> <xsl:include href="/xsl/handbook.xsl" /> -<xsl:include href="/xsl/util.xsl"/> <xsl:include href="/xsl/inserts.xsl" /> <xsl:include href="/xsl/mail.xsl" /> <xsl:include href="/xsl/menu.xsl" /> -<xsl:include href="/xsl/devmap.xsl" /> -<xsl:include href="/xsl/doc-struct.xsl" /> -<xsl:include href="/xsl/ads.xsl" /> +<xsl:include href="/xsl/util.xsl"/> <!-- When using <pre>, whitespaces should be preserved --> <xsl:preserve-space elements="pre script"/> @@ -64,36 +65,6 @@ <img src="{@src}" alt=""/> </xsl:template> -<xsl:template name="show-disclaimer"> - <!-- Disclaimer stuff --> - <xsl:if test="/*[1][@disclaimer] or /*[1][@redirect]"> - <table class="ncontent" align="center" width="90%" border="2px" cellspacing="0" cellpadding="4px"> - <xsl:if test="/*[1]/@disclaimer='obsolete'"> - <xsl:attribute name="style">margin-top:40px;margin-bottom:30px</xsl:attribute> - </xsl:if> - <tr> - <td bgcolor="#ddddff"> - <p class="note"> - <xsl:if test="/*[1][@disclaimer]"> - <xsl:if test="/*[1]/@disclaimer='obsolete'"> - <xsl:attribute name="style">font-size:1.3em</xsl:attribute> - </xsl:if> - <b><xsl:value-of select="func:gettext('disclaimer')"/>: </b> - <xsl:apply-templates select="func:gettext(/*[1]/@disclaimer)"/> - </xsl:if> - <xsl:if test="/*[1][@redirect]"> - <xsl:apply-templates select="func:gettext('redirect')"> - <xsl:with-param name="paramlink" select="/*[1]/@redirect"/> - </xsl:apply-templates> - </xsl:if> - </p> - </td> - </tr> - </table> - </xsl:if> -</xsl:template> - - <!-- Content of /guide --> <xsl:template name="guidecontent"> <xsl:if test="$style != 'printable'"> |