jakarta-site-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r391867 - /jakarta/site/xdocs/stylesheets/site.xsl
Date Thu, 06 Apr 2006 00:42:27 GMT
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


Mime
View raw message