diff options
author | 2010-09-12 16:10:44 -0700 | |
---|---|---|
committer | 2010-09-12 16:10:44 -0700 | |
commit | a924e4aa2b6f573823f37b3276c66a2fdeadd0b6 (patch) | |
tree | 964985b5d3bd0e06d372a71aa8b162b2cb5f33a4 | |
parent | Split disclaimer template into disclaimer.xsl (diff) | |
download | www-redesign-a924e4aa2b6f573823f37b3276c66a2fdeadd0b6.tar.gz www-redesign-a924e4aa2b6f573823f37b3276c66a2fdeadd0b6.tar.bz2 www-redesign-a924e4aa2b6f573823f37b3276c66a2fdeadd0b6.zip |
Fix xsl for disclaimer.xsl to be proper xsl.
Fix indenting.
-rw-r--r-- | xml/htdocs/xsl/disclaimer.xsl | 70 |
1 files changed, 37 insertions, 33 deletions
diff --git a/xml/htdocs/xsl/disclaimer.xsl b/xml/htdocs/xsl/disclaimer.xsl index 901857c0..e77dd949 100644 --- a/xml/htdocs/xsl/disclaimer.xsl +++ b/xml/htdocs/xsl/disclaimer.xsl @@ -1,34 +1,38 @@ -<!-- -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> +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <!-- + 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> - <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> + <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> +</xsl:stylesheet> |