[darcs-users] DARCS changes XSLT stylesheet

Sean Russell ser at germane-software.com
Tue Nov 18 19:15:34 UTC 2003


Hot on the heels of the --xml-output patch, here's a simple stylesheet that 
turns the XML output into HTML.

The XSLT can take three "param"s:

  tag         The name of the darcs tag, if any
  project     The name of the project
  rawdate     If provided, the XSLT will output the raw darcs date;
              otherwise, the date will be formatted "d/m/y h:m:s"

Example usage:

	$ darcs changes --xml-output > changes.xml
	$ xsltproc --stringparam project "MyProject" \
		darcs.xsl changes.xml > changes.html

If you have a relatively recent KDE or Gnome installed, you have xsltproc.  
The XSL isn't very exotic, so Xalan or Saxon will work just fine as well.  In 
fact, if you prepend:

<?xml version='1.0'?>
<?xml-stylesheet href='darcs.xsl' type='text/xsl'?>

to the XML, Internet Explorer will do the transformation by itself.  The 
caveat is that IE's XSLT engine is as buggy as IE itself, and in this case it 
screws up the word wrapping, so you're better off doing the transform by 

David, I don't know if this is the sort of thing you want in the repository, 
so I'm just passing it around by hand.


--- SER
-------------- next part --------------
A non-text attachment was scrubbed...
Name: darcs.xsl
Type: text/xml
Size: 5489 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20031118/777ce8c3/attachment.bin 

More information about the darcs-users mailing list