Re: checkstyle-frame.xsl

Klaus-Peter Berg <[email protected]> Wed, 17 Dec 2008 15:08:33 +0100
Newsgroups gmane.comp.java.audit.checkstyle.user
Organization http://freemail.web.de/
Message-ID <[email protected]>
Hi,

you can either use the "checkstyle-noframes.xsl" as with:

<xslt in="reports/checkstyle-report.xml" 
  style="checkstyle-noframes.xsl"
  out="reports/checkstyle-report.html"/>

or

use a modified version of "checkstyle-frames.xsl" according to http://osdir.com/ml/java.audit.checkstyle.user/2005-09/msg00001.html
"The solution, at least for Java 1.5 and 1.6, is to replace the offending namespace 
declaration in the stylesheet.
In addition, to get the output files generated in a directory of your choice -- and not in the working dir --  it's 
necessary adding a Xalan library (+ helper libs) to your Ant class/library path, e.g. in <ant>/lib.

So do the following replacement:

xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"

with

xmlns:redirect="http://xml.apache.org/xalan/redirect";"

and you will will end up with:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
    xmlns:lxslt="http://xml.apache.org/xslt"
    xmlns:redirect="http://xml.apache.org/xalan/redirect"
    extension-element-prefixes="redirect">


Anyhow, I find the Ant generated output quite poor compared to what is possible if you use Checkstyle with Maven2, where you can create a cross-reference for your findings to the corresponding source code lines...

--Klaus


_______________________________________________________________________
Täglich 1.000.000 Euro gewinnen! Jetzt kostenlos WEB.DE MillionenKlick 
spielen! https://millionenklick.web.de/[email protected]@home


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/