ASCII output from XML

Egon Willighagen egonw at subdimension.com
Sun Mar 11 18:50:52 CET 2001


Ok, it may sound stupid since the original output format was ASCII, but 
here it is...

I uploaded to CVS a XSLT stylesheet that converts the XML to ASCII. The
result looks like this:

=======================================
www Sun Mar 11 17:30:00 CET 2001

requests per clienthost, top 10

  some.machine.net.au 121
  a.second.machine.nl 82
  matamata.excite.com 77
  ...

requested pages per clienthost, top 30, top 5 pages

  proxy01.ade.iprimus.net.au
    /woc/gui/styles/woc.css 3
    /woc/gui/pictures/static_azijnzuur.gif 3
    ....
  proxy04.wxs.nl
    /woc/gui/items/aminozuren.shtml 2
    ....
=======================================

You can figure out how the rest is...
Note that the stylesheet does not yet add the dots you're used to
from the 'normal' ASCII format... I have not figures out how this can
be done in XSLT...

If you like it nice, take the DocBook stylesheet and make a PDF.

Again, you can take an arbitrary XSLT processor like Xalan
(see http://xml.apache.org/). E.g:

lr_run lr_log2report -x www apache common < apache.log > woc.xml

java -cp ~/lib/java/xerces-1.3.0.jar:~/lib/java/xalan-1.2.2.jar \
   org.apache.xalan.xslt.Process -IN woc.xml -XSL \
   ~/bin/logreport/lib/xml/stylesheet/xsl/logreport/ascii.xsl > woc.txt

Ideally, there will be some script to do this with:
lr_run lr_log2report -x www apache common < apache.log | lr_generate_ascii

But this script would have to figure out where the Xalan/Xerces jar files 
are... or other programs in case of other XSLT processors... Thus: a TODO 
item.

Egon

-- 
To UNSUBSCRIBE, email to development-request at logreport.org with a subject of 
"unsubscribe". Trouble? Send an email with subject "help" to 
development-request at logreport.org



More information about the Development mailing list