cvs2cl.pl - XML output

Anderson Lizardo andersonlizardo at yahoo.com.br
Sat Aug 9 20:57:33 PDT 2003


Jeroen Coumans wrote:
> >>Secondly, I should probably use XSLT stylesheets to transform the
> >> XML into XHTML. However, I'm a complete newbe regarding XML and
> >> XSLT, can anybody help me with this? I need to extract the
> >> following information in this format:
> >>
> >><li>
> >><h4>Date - Author</h4>
> >><p>File(s): commit log</p>
> >></li>

I wrote a XSL stylesheet that can do the job easily (with the output of 
cvs2cl's --xml output). But I have some points:

- This format is different from that on 
http://test.linuxfromscratch.org/website.html#todo. I've assumed that 
you want the format above.

- By appending the filenames to the commit message, some logs become 
_really_ big. Are you sure you want them on the log?

- What date format do you want? Is it supposed to have timestamps?

> > I became interested in writing a Perl script for it. I'd like to
> > exercise my Perl (and learn a lot, too), and it seems a good task.
> > But I'm afraid that I cannot write the script on time (maybe you
> > will receive a response from cvs2cl.pl developers before this).

After some scripting, I've realized that I was doing duplicated efforts. 
The cvs2cl.pl developers made a great job, and I don't like to 
"reinvent the wheel" when it's not absolutely needed. And, as you said, 
use XSL is the right thing to do.

The stylesheet is attached. Also, is attached a patch that has to be 
applied to cvs2cl.pl to fix some bugs in XML output. To create the 
(X)HTML output, just use:

xsltproc cvs2html.xsl cvslog.xml > output.html

where "cvslog.xml" is the output of cvs2cl --xml.
-- 
Anderson Lizardo


_______________________________________________________________________
Conheça o novo Cadê? - Mais rápido, mais fácil e mais preciso.
Toda a web, 42 milhões de páginas brasileiras e nova busca por imagens!
http://www.cade.com.br
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cvs2html.xsl
URL: <http://lists.linuxfromscratch.org/pipermail/website/attachments/20030810/06740005/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cvs2cl-xmlfix.patch
URL: <http://lists.linuxfromscratch.org/pipermail/website/attachments/20030810/06740005/attachment-0001.ksh>


More information about the website mailing list