Author: gmcdonald
Date: Fri May 22 05:58:34 2009
New Revision: 777388
URL: http://svn.apache.org/viewvc?rev=777388&view=rev
Log:
Enable class usage for body element, due to Sina Heshmati. Fix for skins part
of FOR-1167
Modified:
forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl
forrest/trunk/main/webapp/skins/common/xslt/html/site-to-xhtml.xsl
forrest/trunk/main/webapp/skins/pelt/xslt/html/document-to-html.xsl
forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl
Modified: forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl?rev=777388&r1=777387&r2=777388&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl
(original)
+++ forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl Fri
May 22 05:58:34 2009
@@ -376,4 +376,12 @@
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
+ <xsl:template match="body" mode="carry-body-attribs">
+ <xsl:apply-templates select="@*" mode="carry-body-attribs"/>
+ </xsl:template>
+ <xsl:template match="@class" mode="carry-body-attribs">
+ <xsl:attribute name="class">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
</xsl:stylesheet>
Modified: forrest/trunk/main/webapp/skins/common/xslt/html/site-to-xhtml.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/main/webapp/skins/common/xslt/html/site-to-xhtml.xsl?rev=777388&r1=777387&r2=777388&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/common/xslt/html/site-to-xhtml.xsl
(original)
+++ forrest/trunk/main/webapp/skins/common/xslt/html/site-to-xhtml.xsl Fri May
22 05:58:34 2009
@@ -396,4 +396,18 @@
</xsl:if>
</xsl:if>
</xsl:template>
+ <xsl:template name="carry-body-attribs">
+ <!-- <div id="content"/> is used to carry attribs from XDocs to
+ final HTML -->
+ <xsl:apply-templates
+ select="//d...@id='content']/@*" mode="carry-body-attribs"/>
+ </xsl:template>
+ <xsl:template match="@id" mode="carry-body-attribs">
+ <!-- Ignore @id -->
+ </xsl:template>
+ <xsl:template match="@class" mode="carry-body-attribs">
+ <xsl:attribute name="class">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
</xsl:stylesheet>
Modified: forrest/trunk/main/webapp/skins/pelt/xslt/html/document-to-html.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/main/webapp/skins/pelt/xslt/html/document-to-html.xsl?rev=777388&r1=777387&r2=777388&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/pelt/xslt/html/document-to-html.xsl
(original)
+++ forrest/trunk/main/webapp/skins/pelt/xslt/html/document-to-html.xsl Fri May
22 05:58:34 2009
@@ -27,6 +27,7 @@
<xsl:apply-templates select="header/link"/>
</meta-data>
<div id="content">
+ <xsl:apply-templates select="body" mode="carry-body-attribs"/>
<div id="skinconf-printlink"/>
<div id="skinconf-xmllink"/>
<div id="skinconf-podlink"/>
Modified: forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl?rev=777388&r1=777387&r2=777388&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl (original)
+++ forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl Fri May 22
05:58:34 2009
@@ -111,6 +111,7 @@
|HTML-body
+-->
<body onload="init()">
+ <xsl:call-template name="carry-body-attribs"/>
<script type="text/javascript">ndeSetTextSize();</script>
<!--+Site structure
+++++++++++++++++++++++++++