[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] (Almost) rewrite of tools tools/xslt/svnindex.xsl

From: Ævar Arnfjörð Bjarmason <jeedo_at_users.sourceforge.net>
Date: 2004-01-31 20:16:19 CET

-------- Original Message --------
Subject: [PATCH] (Almost) rewrite of tools tools/xslt/svnindex.xsl
Date: Sat, 31 Jan 2004 13:39:32 +0000
From: Ævar Arnfjörð Bjarmason <jeedo@users.sourceforge.net>
To: dev@subversion.tigris.org

Please CC: me any replies, i'm not subscribed

Changes in tools/xslt/svnindex.xsl
   * Removed the "[" and "]" before "Parent Directory since i consider them part
     of the look, this was the only part of the look that was in xsl not css,
corrected.
   * Stopped using stuff like <div> alltogather, instead im using <h1> for
     Revision, <ul> and <li> for the list, since its list data, and <address>
     for the "Powered by" line, this is all done according to w3.org
     reccommendations. <h1> is supposted to be used for the first heading, <li>
     for list data and <address> for stuff like contact info at the bottom of
     pages, not only is this TheBetterWay(TM) of dealing with the data but has
     the added atvantage of looking great in a none-css-supporing browser, just
try it
* Varius changes to make room for the stuff above, this was my first time
     editing an XSL document so it might be done in a better way, works however.

Attached is a testcase file i used, new.html there i made the initial list
layout to be used

--- /home/share/software/src/subversion/tools/xslt/svnindex.xsl 2004-01-24 17:10:06.000000000 +0000
+++ svnindex.xsl 2004-01-31 04:28:54.000000000 +0000
@@ -15,13 +15,13 @@
           </xsl:if>
           <xsl:value-of select="index/@path"/>
         </title>
- <link rel="stylesheet" type="text/css" href="/svnindex.css"/>
+ <link rel="stylesheet" type="text/css" href="/svn_style/svnindex.css"/>
       </head>
       <body>
         <div class="svn">
           <xsl:apply-templates/>
         </div>
- <div class="footer">
+ <address class="footer">
           <xsl:text>Powered by </xsl:text>
           <xsl:element name="a">
             <xsl:attribute name="href">
@@ -31,13 +31,13 @@
           </xsl:element>
           <xsl:text> </xsl:text>
           <xsl:value-of select="@version"/>
- </div>
+ </address>
       </body>
     </html>
   </xsl:template>
 
   <xsl:template match="index">
- <div class="rev">
+ <h1 class="rev">
       <xsl:if test="string-length(@name) != 0">
         <xsl:value-of select="@name"/>
         <xsl:if test="string-length(@rev) != 0">
@@ -48,29 +48,30 @@
         <xsl:text>Revision </xsl:text>
         <xsl:value-of select="@rev"/>
       </xsl:if>
- </div>
- <div class="path">
+ </h1>
+ <ul id="list">
+ <li class="path">
       <xsl:value-of select="@path"/>
- </div>
+ </li>
+ <ul>
     <xsl:apply-templates select="updir"/>
     <xsl:apply-templates select="dir"/>
     <xsl:apply-templates select="file"/>
+ </ul>
+ </ul>
   </xsl:template>
 
   <xsl:template match="updir">
- <div class="updir">
- <xsl:text>[</xsl:text>
+ <li class="updir">
       <xsl:element name="a">
         <xsl:attribute name="href">..</xsl:attribute>
         <xsl:text>Parent Directory</xsl:text>
       </xsl:element>
- <xsl:text>]</xsl:text>
- </div>
- <!-- xsl:apply-templates/ -->
+ </li>
   </xsl:template>
 
   <xsl:template match="dir">
- <div class="dir">
+ <li class="dir">
       <xsl:element name="a">
         <xsl:attribute name="href">
           <xsl:value-of select="@href"/>
@@ -78,20 +79,18 @@
         <xsl:value-of select="@name"/>
         <xsl:text>/</xsl:text>
       </xsl:element>
- </div>
- <!-- <xsl:apply-templates/ -->
+ </li>
   </xsl:template>
 
   <xsl:template match="file">
- <div class="file">
+ <li class="file">
       <xsl:element name="a">
         <xsl:attribute name="href">
           <xsl:value-of select="@href"/>
         </xsl:attribute>
         <xsl:value-of select="@name"/>
       </xsl:element>
- </div>
- <!-- xsl:apply-templates/ -->
+ </li>
   </xsl:template>
 
 </xsl:stylesheet>

/www/1f

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jan 31 21:08:50 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.