You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ævar Arnfjörð Bjarmason <av...@simnet.is> on 2004/02/11 17:26:37 UTC

[PATCH] tools/xslt/svnindex.xsl and tools/xslt/svnindex.css

I've sent this one in before, however it seems some people mi-understood its 
purpise, i was pointed to this article: 
http://a.mongers.org/clueful/1999-phk-bikeshed becouse people just thought i 
re-formatted the XML output to my liking.

Thats not what this is, The reason i modified this file is that its hard to 
apply a style to it that doesnt look like the original one, this re-formats the 
  XML output, but not just for the sake of re-formatting, its all done to make 
it easier to apply CSS styles to the document. Particularly it now generates 
more correct <ul>+<li> that are properly nested, having the nice side-affect of 
it looking even better if there exists no stylesheet at all.

I do hope somone applies this unlike the old one because it will make it a lot 
easier to make a "cute" index page (belive me, i tried) and since thats the 
main function of this document that makes this a pretty important patch;)

Also, im sending in a patch to the provided css document, this makes it look 
just like the original one but was changed because of subsiquent changes in the 
XSL doc.

Again, this is not just a XSL reformat, rest assured that if i just didnt like 
the coding style i would be sending in something generated by a for-loop 
containing 'indent' ;)

Re: [PATCH] tools/xslt/svnindex.xsl and tools/xslt/svnindex.css

Posted by "C. Michael Pilato" <cm...@collab.net>.
Ben Collins-Sussman <su...@collab.net> writes:

> On Thu, 2004-02-12 at 10:34, Julian Foad wrote:
> > Ævar Arnfjörð Bjarmason wrote:
> > > 
> > > It was pointed out to me that the patch was kinda crappy regarding 
> > > indent , so i fixed that, use this instead.
> > > Oh, and one minor css error fixed
> > 
> > This patch is not in my area of expertise, but I just want to point
> > out that people will like it better if you also provide a log message
> > as described in the 'HACKING' file.
> 
> Heh, who *is* qualified to review this patch?  Who wrote the original
> .xsl and .css sheets?  Time for 'svn log'...

Brane, IIRC.  And I probably *could* review it, but I just don't feel
like doing so today.  :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: [PATCH] tools/xslt/svnindex.xsl and tools/xslt/svnindex.css

Posted by kf...@collab.net.
Ben Collins-Sussman <su...@collab.net> writes:
> Heh, who *is* qualified to review this patch?  Who wrote the original
> .xsl and .css sheets?  Time for 'svn log'...

By the way, it's useful for *anyone* here who has XML/XSL expertise
(committer or not) to review this change and post their comments.
Sure, eventually some committer has to decide whether it goes in, but
that doesn't mean they have to be all alone in making that decision...

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tools/xslt/svnindex.xsl and tools/xslt/svnindex.css

Posted by Branko Čibej <br...@xbc.nu>.
Ben Collins-Sussman wrote:

>On Thu, 2004-02-12 at 10:34, Julian Foad wrote:
>  
>
>>Ævar Arnfjörð Bjarmason wrote:
>>    
>>
>>>It was pointed out to me that the patch was kinda crappy regarding 
>>>indent , so i fixed that, use this instead.
>>>Oh, and one minor css error fixed
>>>      
>>>
>>This patch is not in my area of expertise, but I just want to point
>>out that people will like it better if you also provide a log message
>>as described in the 'HACKING' file.
>>    
>>
>
>Heh, who *is* qualified to review this patch?  Who wrote the original
>.xsl and .css sheets?  Time for 'svn log'...
>  
>
I am, probably a few others. I just don't see it as terribly
high-priority, so I didn't even put it on my todo list yet. However,
since I'm writing this reply anyway...

>--- /home/share/software/src/subversion/tools/xslt/svnindex.xsl	2004-01-24 17:10:06.000000000 +0000
>+++ /home/jeedo/www/projects/svn_style/svnindex.xsl	2004-02-12 20:22:33.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="/projects/svn_style/svnindex.css"/>


This change is not necessary. I understand that you made it in order
that you can test on your system, but it has no place in the patch itself.

>@@ -48,29 +48,30 @@
>         <xsl:text>Revision </xsl:text>
>         <xsl:value-of select="@rev"/>
>       </xsl:if>
>-    </div>
>-    <div class="path">
>-      <xsl:value-of select="@path"/>
>-    </div>
>-    <xsl:apply-templates select="updir"/>
>-    <xsl:apply-templates select="dir"/>
>-    <xsl:apply-templates select="file"/>
>+    </h1>
>+    <ul id="list">
>+      <li>
>+        <div class="pathname"><xsl:value-of select="@path"/></div>
>+        <ul>
>+          <xsl:apply-templates select="updir"/>
>+          <xsl:apply-templates select="dir"/>
>+          <xsl:apply-templates select="file"/>
>+        </ul>
>+      </li>
>+    </ul>
>   </xsl:template>
>  
>
I disagree. The list title is not part of the list.


>-        <xsl:text>Parent Directory</xsl:text>
>+        <xsl:text>..</xsl:text>
>  
>
Oh really, this is so totally a bikeshed, it doesn't seem worth changing.


And, how about a patch for the CSS file, too? We want to keep both in sync.


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tools/xslt/svnindex.xsl and tools/xslt/svnindex.css

Posted by Ben Collins-Sussman <su...@collab.net>.
On Thu, 2004-02-12 at 10:34, Julian Foad wrote:
> Ævar Arnfjörð Bjarmason wrote:
> > 
> > It was pointed out to me that the patch was kinda crappy regarding 
> > indent , so i fixed that, use this instead.
> > Oh, and one minor css error fixed
> 
> This patch is not in my area of expertise, but I just want to point
> out that people will like it better if you also provide a log message
> as described in the 'HACKING' file.

Heh, who *is* qualified to review this patch?  Who wrote the original
.xsl and .css sheets?  Time for 'svn log'...




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tools/xslt/svnindex.xsl and tools/xslt/svnindex.css

Posted by Ævar Arnfjörð Bjarmason <av...@simnet.is>.
svnindex.xsl:
* All-round change of the output to make it easier to style using CSS
* Changed <div class="footer"> to <address class="footer">, <div class="rev"> 
to <h1 class="rev">, this is to follow w3.org standards more closely, (they 
reccomend agains invending div's for things when specified tags exist, for 
better viewing without stylesheets).

Properly put the output in a <ul>, now looks like:
<ul id="list">
   <li><div class="pathname">Path</div>
     <ul>
       <li class="updir"></li>
       <li class="dir"></li>
       <li class="file"></li>
     </ul>
   </li>
</ul>

This is much more logical than the previus output, and looks great in text-only 
browsers, plus it's easy to style it.

svnindex.css:
* Small changes to apply to the new output generated by svnindex.xsl, added a 
few new styles such as pathname, but it looks exactly the same from a viewers 
standpoint.

Julian Foad wrote:
> Ævar Arnfjörð Bjarmason wrote:
>  
>>
>> It was pointed out to me that the patch was kinda crappy regarding 
>> indent , so i fixed that, use this instead.
>> Oh, and one minor css error fixed
> 
> 
> This patch is not in my area of expertise, but I just want to point out 
> that people will like it better if you also provide a log message as 
> described in the 'HACKING' file.
> 
> - Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tools/xslt/svnindex.xsl and tools/xslt/svnindex.css

Posted by Julian Foad <ju...@btopenworld.com>.
Ævar Arnfjörð Bjarmason wrote:
> 
> It was pointed out to me that the patch was kinda crappy regarding 
> indent , so i fixed that, use this instead.
> Oh, and one minor css error fixed

This patch is not in my area of expertise, but I just want to point out that people will like it better if you also provide a log message as described in the 'HACKING' file.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tools/xslt/svnindex.xsl and tools/xslt/svnindex.css

Posted by Robert Spier <rs...@pobox.com>.
> The reason I am curious is that I cannot see any difference
> between the '-' and the '+' line in the first hunk, which may
> indicate that you found a bug in your "diff"ing tool.
> 
> Call me stupid, blind and paranoid, otherwise :).

I noticed that too.  It's probably a whitespace change.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tools/xslt/svnindex.xsl and tools/xslt/svnindex.css

Posted by ?var.
Really doesnt matter, just apply it, should work..
>>>>>>"AB" == ?var Arnfjo"r? Bjarmason <av...@simnet.is> writes:
> 
> 
> Could you tell us how this diff was produced?  I.e. with which
> tool?
> 
> The reason I am curious is that I cannot see any difference
> between the '-' and the '+' line in the first hunk, which may
> indicate that you found a bug in your "diff"ing tool.
> 
> Call me stupid, blind and paranoid, otherwise :).
> 
> AB> --- /home/share/software/src/subversion/tools/xslt/svnindex.xsl	2004-01-24 17:10:06.000000000 +0000
> AB> +++ /home/jeedo/www/projects/svn_style/svnindex.xsl	2004-02-12 04:54:49.000000000 +0000
> AB> @@ -15,13 +15,13 @@
> AB>            </xsl:if>
> AB>            <xsl:value-of select="index/@path"/>
> AB>          </title>
> AB> -        <link rel="stylesheet" type="text/css" href="/svnindex.css"/>
> AB> +        <link rel="stylesheet" type="text/css" href="/svnindex.css"/>
> AB>        </head>
>   ...
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tools/xslt/svnindex.xsl and tools/xslt/svnindex.css

Posted by Junio C Hamano <ju...@cox.net>.
>>>>> "AB" == Ævar Arnfjörð Bjarmason <av...@simnet.is> writes:

Could you tell us how this diff was produced?  I.e. with which
tool?

The reason I am curious is that I cannot see any difference
between the '-' and the '+' line in the first hunk, which may
indicate that you found a bug in your "diff"ing tool.

Call me stupid, blind and paranoid, otherwise :).

AB> --- /home/share/software/src/subversion/tools/xslt/svnindex.xsl	2004-01-24 17:10:06.000000000 +0000
AB> +++ /home/jeedo/www/projects/svn_style/svnindex.xsl	2004-02-12 04:54:49.000000000 +0000
AB> @@ -15,13 +15,13 @@
AB>            </xsl:if>
AB>            <xsl:value-of select="index/@path"/>
AB>          </title>
AB> -        <link rel="stylesheet" type="text/css" href="/svnindex.css"/>
AB> +        <link rel="stylesheet" type="text/css" href="/svnindex.css"/>
AB>        </head>
  ...


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tools/xslt/svnindex.xsl and tools/xslt/svnindex.css

Posted by Ævar Arnfjörð Bjarmason <av...@simnet.is>.
Vésgu

Lübbe Onken wrote:
> Ævar Arnfjörð Bjarmason wrote:
> 
>> Got a pointer from Jonathan (the great mailing list lurker) that my 
>> indend was still a bit off, here is one last fix for that.
>>
>>
>> ------------------------------------------------------------------------
>>
>> --- /home/share/software/src/subversion/tools/xslt/svnindex.xsl    
>> 2004-01-24 17:10:06.000000000 +0000
>> +++ /home/jeedo/www/projects/svn_style/svnindex.xsl    2004-02-12 
>> 20:22:33.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="/projects/svn_style/svnindex.css"/>
>>        </head>
> 
> 
> One thing I don't like about yout patch is that it contains you local 
> path settings. Apart from that I can't apply it against svnindex.xsl 
> from trunk, but maybe that's just me being stupid.
> 
> Cheers
> -Lübbe
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 
> 

Re: [PATCH] tools/xslt/svnindex.xsl and tools/xslt/svnindex.css

Posted by Lübbe Onken <l....@rac.de>.
Ævar Arnfjörð Bjarmason wrote:

> Got a pointer from Jonathan (the great mailing list lurker) that my 
> indend was still a bit off, here is one last fix for that.
> 
> 
> ------------------------------------------------------------------------
> 
> --- /home/share/software/src/subversion/tools/xslt/svnindex.xsl	2004-01-24 17:10:06.000000000 +0000
> +++ /home/jeedo/www/projects/svn_style/svnindex.xsl	2004-02-12 20:22:33.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="/projects/svn_style/svnindex.css"/>
>        </head>

One thing I don't like about yout patch is that it contains you local 
path settings. Apart from that I can't apply it against svnindex.xsl 
from trunk, but maybe that's just me being stupid.

Cheers
-Lübbe


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tools/xslt/svnindex.xsl and tools/xslt/svnindex.css

Posted by Ævar Arnfjörð Bjarmason <av...@simnet.is>.

Ævar Arnfjörð Bjarmason wrote:
>> I've sent this one in before, however it seems some people 
>> mi-understood its purpise, i was pointed to this article: 
>> http://a.mongers.org/clueful/1999-phk-bikeshed becouse people just 
>> thought i re-formatted the XML output to my liking.
>>
>> Thats not what this is, The reason i modified this file is that its 
>> hard to apply a style to it that doesnt look like the original one, 
>> this re-formats the  XML output, but not just for the sake of 
>> re-formatting, its all done to make it easier to apply CSS styles to 
>> the document. Particularly it now generates more correct <ul>+<li> 
>> that are properly nested, having the nice side-affect of it looking 
>> even better if there exists no stylesheet at all.
>>
>> I do hope somone applies this unlike the old one because it will make 
>> it a lot easier to make a "cute" index page (belive me, i tried) and 
>> since thats the main function of this document that makes this a 
>> pretty important patch;)
>>
>> Also, im sending in a patch to the provided css document, this makes 
>> it look just like the original one but was changed because of 
>> subsiquent changes in the XSL doc.
>>
>> Again, this is not just a XSL reformat, rest assured that if i just 
>> didnt like the coding style i would be sending in something generated 
>> by a for-loop containing 'indent' ;)
> 
> 
> It was pointed out to me that the patch was kinda crappy regarding 
> indent , so i fixed that, use this instead.
> Oh, and one minor css error fixed
> 

Got a pointer from Jonathan (the great mailing list lurker) that my indend was 
still a bit off, here is one last fix for that.

Re: [PATCH] tools/xslt/svnindex.xsl and tools/xslt/svnindex.css

Posted by Ævar Arnfjörð Bjarmason <av...@simnet.is>.
> I've sent this one in before, however it seems some people mi-understood 
> its purpise, i was pointed to this article: 
> http://a.mongers.org/clueful/1999-phk-bikeshed becouse people just 
> thought i re-formatted the XML output to my liking.
> 
> Thats not what this is, The reason i modified this file is that its hard 
> to apply a style to it that doesnt look like the original one, this 
> re-formats the  XML output, but not just for the sake of re-formatting, 
> its all done to make it easier to apply CSS styles to the document. 
> Particularly it now generates more correct <ul>+<li> that are properly 
> nested, having the nice side-affect of it looking even better if there 
> exists no stylesheet at all.
> 
> I do hope somone applies this unlike the old one because it will make it 
> a lot easier to make a "cute" index page (belive me, i tried) and since 
> thats the main function of this document that makes this a pretty 
> important patch;)
> 
> Also, im sending in a patch to the provided css document, this makes it 
> look just like the original one but was changed because of subsiquent 
> changes in the XSL doc.
> 
> Again, this is not just a XSL reformat, rest assured that if i just 
> didnt like the coding style i would be sending in something generated by 
> a for-loop containing 'indent' ;)

It was pointed out to me that the patch was kinda crappy regarding indent , so 
i fixed that, use this instead.
Oh, and one minor css error fixed