You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Quinn Taylor <qu...@mac.com> on 2008/08/13 15:19:39 UTC
Working with svnindex.xsl
I've been reading documentation on using XSLT to make browsing SVN
repos hosted from Apache, and found several mentions of "the default
svnindex.xsl", but it's not on my system. I'm running Mac OS X 10.5.4
with SVN 1.4.4 built-in. I'd be happy to download it from wherever it
may be available.
However, even more important, where can I find documentation of or an
example XML file that would be passed to the XSL stylesheet for
transformation? I imagine it's a simple format, but I'd like to know
what I'm dealing with, not have to reconstruct it from someone else's
XSL.
(The SVN book only has one occurrence of svnindex.xsl, and it's in the
section on configuring for Apache.)
Thanks,
- Quinn
Re: Working with svnindex.xsl
Posted by Quinn Taylor <qu...@mac.com>.
> You might want to take a look at what this project has done:
>
> http://insurrection.tigris.org/
>
> Some pretty cool stuff. They go beyond the XSLT, but there was a time
> that is how it started.
>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspot.com/
That is indeed pretty cool. Some similarities to ViewVC as well. Some
people might opt for Trac, depending on their purpose. I have no
experience with real-time processor loads of any of the 3.
Certainly, pure XSL using the XML output of mod_dav_svn will never
have so much functionality. I'm just trying to make the bare minimum a
little less minimal. :-)
- Quinn
Re: Working with svnindex.xsl
Posted by Mark Phippard <ma...@gmail.com>.
On Tue, Aug 19, 2008 at 7:53 PM, Quinn Taylor <qu...@mac.com> wrote:
> On Aug 13, 2008, at 1:25 PM, Ryan Schmidt wrote:
>
>> On Aug 13, 2008, at 12:06, Quinn Taylor wrote:
>>
>>>
>> What you see at http://svn.collab.net/repos/svn/ is mod_dav_svn's built-in
>> HTML view of the repository, not its XML/XSLT view. If you specify an XSLT
>> stylesheet to use in the Apache conf, then mod_dav_svn outputs XML instead
>> of HTML and includes your XSLT stylesheet. So to see the type of XML that is
>> output, set an XSLT stylesheet, then look at the source of the page.
>>
>> The MacPorts repository currently uses the default XSLT styles so you
>> could also look at that repository in a web browser:
>>
>> http://svn.macosforge.org/repository/macports/
>>
>>>
>>> http://svn.collab.net/viewvc/svn/trunk/tools/xslt/ has XSL and CSS files
>>> matching the correct name. Are these "the default files" that everyone
>>> refers to?
>>
>> Yes.
>
> Excellent, duly noted. Since I found out that these were the default XSL
> transforms, I set about to create a ... more aesthetically pleasing
> alternative. :-)
>
> http://dysart.cs.byu.edu/svn/cs628/code/
>
> I'm working with people on an XSL list to debug a problem with transforming
> the path into a series of links. Once that's complete, I'd be happy to
> submit this as a patch. What are general opinions about what I have so far?
> (Please compare to http://svn.macosforge.org/repository/macports/ or another
> similar page.)
>
> By the way, can someone explain what exactly the repository's basename is,
> and how it is to be used? (By all means, feel free to direct me to an
> earlier thread, as I have a feeling this may have been discussed
> previously.)
You might want to take a look at what this project has done:
http://insurrection.tigris.org/
Some pretty cool stuff. They go beyond the XSLT, but there was a time
that is how it started.
--
Thanks
Mark Phippard
http://markphip.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Working with svnindex.xsl
Posted by da...@jpmorgan.com.
Hi,
As an addendum to this thread ... when we deployed the
SVNIndexXSLTparameter to our Apache config we ran into problems with our
internal Google appliance scanning of the Subversion repositories.
This was because Google did not understand the XML being presented and was
not capable of downloading and parsing the XSLT style translation.
I thought it would somehow be possible to detect the User-Agent being
reported by the client and return the XSLT page only for browsers which
were capable of understanding it (Firefox, Mozilla, Internet Explorer,
etc).
I found documentation at
http://gentoo-wiki.com/HOWTO_Apache2_with_subversion_SVN_and_DAV#Pretty_formatting
talking about a similar problem with Opera being unable to parse the XML.
Their solution was to use xsltproc to pre-process the produced XML and
produce HTML content for browsers which don't understand XSLT XML headers.
BrowserMatch "Opera" xsltfilter
ExtFilterDefine xslt mode=output enableenv=xsltfilter \
intype=text/xml outtype=text/html \
cmd="/usr/bin/xsltproc /path/to/svnindex.xsl -"
Then within the <Location> section defining the Subversion repositories
add an output filter:
SetOutputFilter xslt
AddDefaultCharset utf-8
Cheers,
Dg.
--
David Grierson
JPMorgan - IB Architecture - Source Code Management Consultant
GDP 228-5574 / DDI +44 141 228 5574 / Email david.x.grierson@jpmorgan.com
Alhambra House 6th floor, 45 Waterloo Street, Glasgow G2 6HS
Generally, this communication is for informational purposes only
and it is not intended as an offer or solicitation for the purchase
or sale of any financial instrument or as an official confirmation
of any transaction. In the event you are receiving the offering
materials attached below related to your interest in hedge funds or
private equity, this communication may be intended as an offer or
solicitation for the purchase or sale of such fund(s). All market
prices, data and other information are not warranted as to
completeness or accuracy and are subject to change without notice.
Any comments or statements made herein do not necessarily reflect
those of JPMorgan Chase & Co., its subsidiaries and affiliates.
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase &
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.
Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to UK legal entities.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Working with svnindex.xsl
Posted by Quinn Taylor <qu...@mac.com>.
On Aug 19, 2008, at 11:25 PM, John Niven wrote:
>> Anyone in charge of the repository, what would it take to get
>> this cleaned up and submitted as a patch?
>
> Kind-of thinking aloud here...
>
> Are you thinking "instead of" or "as well as" the current stylesheet?
> The current stylesheet is useful, in a utilitarian sort of way, as a
> get-you-started template for people wanting to roll-their-own, and it
> would almost be a shame to lose it. I'm speaking as someone (a rank
> amateur) who did roll-their-own at one point.
>
> However... After seeing your stylesheet I doubt I'll be bothering to
> get
> my hands dirty in XSL anytime soon ;-) You've just created my new SVN
> stylesheet!
>
> Thanks Quinn, your efforts are appreciated.
> John
John -
First off, thank you, it's good to feel appreciated. :-)
I had been thinking replacement, since having multiple copies floating
around can be confusing. I tried to stay as true to the original as
possible, and actually simplified a few things. Basically, the only
things I added to the XSL was functionality to print the path with
links to each directory, and that all comes at the end of the file.
Where it differs most is that the CSS is a bit more fancy, and I
figured that's where Subversion administrators are least likely to
spend their time.
Also, in contrast with the other tools that have been mentioned, this
approach doesn't require any extra setup or modifying the files—
they're just drop-in replacements for the defaults. (You do need to
add the folder for images, however.) My stylesheet is intended to stay
true to the simplicity of XSL output, with minimal processing
overhead, and accordingly minimal functionality. ;-)
- Quinn
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: Re: Working with svnindex.xsl
Posted by John Niven <jn...@bravurasolutions.com>.
> -----Original Message-----
> From: Quinn Taylor [mailto:quinntaylor@mac.com]
> Sent: Wednesday, 20 August 2008 16:53
> To: users@subversion.tigris.org
> Subject: Re: Working with svnindex.xsl
>
> Just wanted to inform everyone that I've ironed out the XSL
> bug, and now my transform stylesheet is printing the path
> with links to each parent directory, making it that much more
> friendly to use. Please give it a shot an let me know what
> you think. (I'm especially keen to know what browsers, if
> any, may have trouble rendering it. Of course, if you're
> using svnindex.xsl, your audience probably has browsers
> capable of processing XSL.)
Looks great to me (Firefox 3.0.1, Windows XP SP2). Better than great.
>
> Anyone in charge of the repository, what would it take to get
> this cleaned up and submitted as a patch?
Kind-of thinking aloud here...
Are you thinking "instead of" or "as well as" the current stylesheet?
The current stylesheet is useful, in a utilitarian sort of way, as a
get-you-started template for people wanting to roll-their-own, and it
would almost be a shame to lose it. I'm speaking as someone (a rank
amateur) who did roll-their-own at one point.
However... After seeing your stylesheet I doubt I'll be bothering to get
my hands dirty in XSL anytime soon ;-) You've just created my new SVN
stylesheet!
Thanks Quinn, your efforts are appreciated.
John
>
> - Quinn
>
> http://dysart.cs.byu.edu/svn/cs628/code/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Working with svnindex.xsl
Posted by Quinn Taylor <qu...@mac.com>.
> [Since I discovered] the default XSL transforms, I set about to
> create a ... more aesthetically pleasing alternative. :-)
>
> I'm working with people on an XSL list to debug a problem with
> transforming the path into a series of links. Once that's complete,
> I'd be happy to submit this as a patch. What are general opinions
> about what I have so far? (Please compare to http://svn.macosforge.org/repository/macports/
> or another similar page.)
Just wanted to inform everyone that I've ironed out the XSL bug, and
now my transform stylesheet is printing the path with links to each
parent directory, making it that much more friendly to use. Please
give it a shot an let me know what you think. (I'm especially keen to
know what browsers, if any, may have trouble rendering it. Of course,
if you're using svnindex.xsl, your audience probably has browsers
capable of processing XSL.)
Anyone in charge of the repository, what would it take to get this
cleaned up and submitted as a patch?
- Quinn
http://dysart.cs.byu.edu/svn/cs628/code/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Working with svnindex.xsl
Posted by km...@rockwellcollins.com.
You might also want to checkout this: http://reposstyle.com/
Kevin R.
Quinn Taylor <qu...@mac.com> wrote on 08/19/2008 06:53:26 PM:
> On Aug 13, 2008, at 1:25 PM, Ryan Schmidt wrote:
>
> > On Aug 13, 2008, at 12:06, Quinn Taylor wrote:
> >
> >>
> > What you see at http://svn.collab.net/repos/svn/ is mod_dav_svn's
> > built-in HTML view of the repository, not its XML/XSLT view. If you
> > specify an XSLT stylesheet to use in the Apache conf, then
> > mod_dav_svn outputs XML instead of HTML and includes your XSLT
> > stylesheet. So to see the type of XML that is output, set an XSLT
> > stylesheet, then look at the source of the page.
> >
> > The MacPorts repository currently uses the default XSLT styles so
> > you could also look at that repository in a web browser:
> >
> > http://svn.macosforge.org/repository/macports/
> >
> >>
> >> http://svn.collab.net/viewvc/svn/trunk/tools/xslt/ has XSL and CSS
> >> files matching the correct name. Are these "the default files" that
> >> everyone refers to?
> >
> > Yes.
>
> Excellent, duly noted. Since I found out that these were the default
> XSL transforms, I set about to create a ... more aesthetically
> pleasing alternative. :-)
>
> http://dysart.cs.byu.edu/svn/cs628/code/
>
> I'm working with people on an XSL list to debug a problem with
> transforming the path into a series of links. Once that's complete,
> I'd be happy to submit this as a patch. What are general opinions
> about what I have so far? (Please compare to http://svn.macosforge.
> org/repository/macports/
> or another similar page.)
>
> By the way, can someone explain what exactly the repository's basename
> is, and how it is to be used? (By all means, feel free to direct me to
> an earlier thread, as I have a feeling this may have been discussed
> previously.)
>
> Thanks,
> - Quinn
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Working with svnindex.xsl
Posted by Quinn Taylor <qu...@mac.com>.
On Aug 13, 2008, at 1:25 PM, Ryan Schmidt wrote:
> On Aug 13, 2008, at 12:06, Quinn Taylor wrote:
>
>>
> What you see at http://svn.collab.net/repos/svn/ is mod_dav_svn's
> built-in HTML view of the repository, not its XML/XSLT view. If you
> specify an XSLT stylesheet to use in the Apache conf, then
> mod_dav_svn outputs XML instead of HTML and includes your XSLT
> stylesheet. So to see the type of XML that is output, set an XSLT
> stylesheet, then look at the source of the page.
>
> The MacPorts repository currently uses the default XSLT styles so
> you could also look at that repository in a web browser:
>
> http://svn.macosforge.org/repository/macports/
>
>>
>> http://svn.collab.net/viewvc/svn/trunk/tools/xslt/ has XSL and CSS
>> files matching the correct name. Are these "the default files" that
>> everyone refers to?
>
> Yes.
Excellent, duly noted. Since I found out that these were the default
XSL transforms, I set about to create a ... more aesthetically
pleasing alternative. :-)
http://dysart.cs.byu.edu/svn/cs628/code/
I'm working with people on an XSL list to debug a problem with
transforming the path into a series of links. Once that's complete,
I'd be happy to submit this as a patch. What are general opinions
about what I have so far? (Please compare to http://svn.macosforge.org/repository/macports/
or another similar page.)
By the way, can someone explain what exactly the repository's basename
is, and how it is to be used? (By all means, feel free to direct me to
an earlier thread, as I have a feeling this may have been discussed
previously.)
Thanks,
- Quinn
Re: Working with svnindex.xsl
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 13, 2008, at 12:06, Quinn Taylor wrote:
> No replies yet, so I'll post what I've found.
>
> http://svn.collab.net/viewvc/svn/trunk/tools/xslt/?pathrev=32455
>
> This repository directory has XSL and CSS files matching the
> correct name. Previously, this was located at /trunk/notes/xslt/
> and there have only been 2 revisions to each file since it was moved.
>
> Are these styles the ones that create pages like https://
> svn.collab.net/repos/svn/trunk/tools/xslt/ or is that just the
> Apache default? (I'm guessing the latter.)
What you see at http://svn.collab.net/repos/svn/ is mod_dav_svn's
built-in HTML view of the repository, not its XML/XSLT view. If you
specify an XSLT stylesheet to use in the Apache conf, then
mod_dav_svn outputs XML instead of HTML and includes your XSLT
stylesheet. So to see the type of XML that is output, set an XSLT
stylesheet, then look at the source of the page.
The MacPorts repository currently uses the default XSLT styles so you
could also look at that repository in a web browser:
http://svn.macosforge.org/repository/macports/
> Are these "the default files" that everyone refers to?
Yes.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Working with svnindex.xsl
Posted by Quinn Taylor <qu...@mac.com>.
No replies yet, so I'll post what I've found.
http://svn.collab.net/viewvc/svn/trunk/tools/xslt/?pathrev=32455
This repository directory has XSL and CSS files matching the correct
name. Previously, this was located at /trunk/notes/xslt/ and there
have only been 2 revisions to each file since it was moved.
Are these styles the ones that create pages like https://svn.collab.net/repos/svn/trunk/tools/xslt/
or is that just the Apache default? (I'm guessing the latter.)
Are these "the default files" that everyone refers to?
- Quinn
On Aug 13, 2008, at 9:19 AM, Quinn Taylor wrote:
> I've been reading documentation on using XSLT to make browsing SVN
> repos hosted from Apache, and found several mentions of "the default
> svnindex.xsl", but it's not on my system. I'm running Mac OS X
> 10.5.4 with SVN 1.4.4 built-in. I'd be happy to download it from
> wherever it may be available.
>
> However, even more important, where can I find documentation of or
> an example XML file that would be passed to the XSL stylesheet for
> transformation? I imagine it's a simple format, but I'd like to know
> what I'm dealing with, not have to reconstruct it from someone
> else's XSL.
>
> (The SVN book only has one occurrence of svnindex.xsl, and it's in
> the section on configuring for Apache.)
>
> Thanks,
> - Quinn