You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@jakarta.apache.org by se...@apache.org on 2006/04/06 02:42:27 UTC
svn commit: r391867 - /jakarta/site/xdocs/stylesheets/site.xsl
Author: sebb
Date: Wed Apr 5 17:42:25 2006
New Revision: 391867
URL: http://svn.apache.org/viewcvs?rev=391867&view=rev
Log:
Enable encoding to be specified in document properties
Modified:
jakarta/site/xdocs/stylesheets/site.xsl
Modified: jakarta/site/xdocs/stylesheets/site.xsl
URL: http://svn.apache.org/viewcvs/jakarta/site/xdocs/stylesheets/site.xsl?rev=391867&r1=391866&r2=391867&view=diff
==============================================================================
--- jakarta/site/xdocs/stylesheets/site.xsl (original)
+++ jakarta/site/xdocs/stylesheets/site.xsl Wed Apr 5 17:42:25 2006
@@ -31,10 +31,18 @@
<!-- Process an entire document into an HTML page -->
<xsl:template match="document">
<xsl:variable name="site" select="document('site.xml')/site"/>
+ <xsl:variable name="encoding" select="properties/encoding"/>
<html>
<head>
<meta http-equiv="Content-Type">
- <xsl:attribute name="content">text/html; charset=iso-8859-1</xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="$encoding">
+ <xsl:attribute name="content">text/html; charset=<xsl:value-of select="$encoding"/></xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="content">text/html; charset=iso-8859-1</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
</meta>
<xsl:apply-templates select="meta"/>
<title><xsl:value-of select="$site/title"/> - <xsl:value-of select="properties/title"/></title>
---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: site-cvs-help@jakarta.apache.org