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 2005/07/14 01:58:25 UTC

svn commit: r216287 - /jakarta/site/xdocs/stylesheets/site.xsl

Author: sebb
Date: Wed Jul 13 16:58:24 2005
New Revision: 216287

URL: http://svn.apache.org/viewcvs?rev=216287&view=rev
Log:
Change to ensure JDK1.4 and 1.5 generate identical output:
- change 2 new multi-attribute tags to use xsl:attribute

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=216287&r1=216286&r2=216287&view=diff
==============================================================================
--- jakarta/site/xdocs/stylesheets/site.xsl (original)
+++ jakarta/site/xdocs/stylesheets/site.xsl Wed Jul 13 16:58:24 2005
@@ -2,9 +2,22 @@
 <!-- Content Stylesheet for "jakarta-site2" Documentation -->
 
 <!--
+	*****************************
+	
 	N.B. any tags with more than one attribute need to be coded using xsl:attribute 
 	for all but the first attribute.
-	This is to ensure that JDK 1.4 and 1.5 generate the attributes in the same order.	
+	
+	This is to ensure that JDK 1.4 and 1.5 generate the attributes in the same order,
+	and thus avoid huge numbers of irrelevant differences when the JDK changes.
+	
+	For example:
+	
+	<img alt="Alt">
+		<xsl:attribute name="border"><xsl:value-of select="'0'"/></xsl:attribute>
+		<xsl:attribute name="src"><xsl:value-of select="'xxx.gif'"/></xsl:attribute>				
+	</img>
+	
+	*****************************
 -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -77,7 +90,15 @@
           </img>
         </a>
         </td><td>
-        <div style="width:135px;height:50px;padding:10px;border:1px solid #666666"><a href="http://www.apachecon.com/2005/EU/"><img alt="Join ApacheCon in Stuttgart!" border="0" src="http://apache.org/images/ac2005eu_135x50.gif"/></a></div>
+        <div style="width:135px;height:50px;padding:10px;border:1px solid #666666">
+			<a href="http://www.apachecon.com/2005/EU/">
+			<img>
+				<xsl:attribute name="alt"><xsl:value-of select="'Join ApacheCon in Stuttgart!'"/></xsl:attribute>
+				<xsl:attribute name="border"><xsl:value-of select="'0'"/></xsl:attribute>
+				<xsl:attribute name="src"><xsl:value-of select="'http://apache.org/images/ac2005eu_135x50.gif'"/></xsl:attribute>				
+			</img>
+			</a>
+		</div>
         <xsl:if test="$site/logo">
           <xsl:variable name="alt">
             <xsl:value-of select="$site/logo"/>
@@ -91,7 +112,11 @@
 
           <xsl:comment>PROJECT LOGO</xsl:comment>
           <a href="{$home}">
-            <img src="{$src}" align="right" alt="{$alt}" border="0"/>
+			<img><!-- Fix this so attributes always occur in same order -->
+				<xsl:attribute name="alt"><xsl:value-of select="$alt"/></xsl:attribute>
+				<xsl:attribute name="border"><xsl:value-of select="'0'"/></xsl:attribute>
+				<xsl:attribute name="src"><xsl:value-of select="$src"/></xsl:attribute>
+			</img>
           </a>
         </xsl:if>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: site-cvs-help@jakarta.apache.org