From: Rajarshi G. <rx...@ps...> - 2006-05-01 15:38:25
|
On Mon, 2006-05-01 at 15:46 +0200, Egon Willighagen wrote: > On Monday 01 May 2006 15:04, Rajarshi Guha wrote: > > On Mon, 2006-05-01 at 11:28 +0200, Egon Willighagen wrote: > > > - in cdk/doc/website you can find a pmdReport2HTML.xsl, so that > > > you can have pmd.xml spit XML again > > > > Can this be used in an ant XSLT task? Something like > > > > <xslt in="somefile.xml" > > style="pmdReport2HTML.xsl" > > out="somefile.html" /> > OK. On my local copy of pmd.xml I'm using the following: <target id="test-module" name="test-module" description="Performs a PMD checks for the given CDK module."> <echo message="Running PMD checks for CDK's ${module} module." /> <mkdir dir="${reports.tests}/pmd"/> <pmd shortFilenames="true" rulesetfiles="pmd/${pmd.test}.xml"> <formatter type="xml" toFile="${reports.tests}/pmd/${module}.xml"/> <fileset dir="${src}"> <includesfile name="${src}/${module}.javafiles"/> </fileset> </pmd> <xslt in="${reports.tests}/pmd/${module}.xml" style="doc/website/pmdReport2HTML.xsl" out="${reports.tests}/pmd/${module}.html" /> </target> Then doing ant -f pmd.xml -Dmodule=qsar gives me an error (below). As a result I'd like to keep HTML output for PMD at the moment until we can get this approach working. Do you have any ideas why this might be happening? test-module: [echo] Running PMD checks for CDK's qsar module. [xslt] Processing /home/rajarshi/src/java/cdk-nightly/cdk/reports/pmd/qsar.xml to /home/rajarshi/src/java/cdk-nightly/cdk/reports/pmd/qsar.html [xslt] Loading stylesheet /home/rajarshi/src/java/cdk-nightly/cdk/doc/website/pmdReport2HTML.xsl [xslt] java.lang.NullPointerException [xslt] at gnu.xml.aelfred2.SAXDriver.getLineNumber(SAXDriver.java:1165) [xslt] at com.sun.org.apache.xalan.internal.xsltc.compiler.Parser.parseTopLevel(Parser.java:1077) [xslt] at com.sun.org.apache.xalan.internal.xsltc.compiler.Parser.parsePattern(Parser.java:1067) [xslt] at com.sun.org.apache.xalan.internal.xsltc.compiler.Template.parseContents(Template.java:213) [xslt] at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.parseOwnChildren(Stylesheet.java:590) [xslt] at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.parseContents(Stylesheet.java:562) [xslt] at com.sun.org.apache.xalan.internal.xsltc.compiler.Parser.createAST(Parser.java:380) [xslt] at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:325) [xslt] at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:410) [xslt] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:791) [xslt] at org.apache.tools.ant.taskdefs.optional.TraXLiaison.readTemplates(TraXLiaison.java:207) [xslt] at org.apache.tools.ant.taskdefs.optional.TraXLiaison.createTransformer(TraXLiaison.java:225) [xslt] at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:123) [xslt] at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:541) [xslt] at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:238) [xslt] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [xslt] at org.apache.tools.ant.Task.perform(Task.java:364) [xslt] at org.apache.tools.ant.Target.execute(Target.java:341) [xslt] at org.apache.tools.ant.Target.performTasks(Target.java:369) [xslt] at org.apache.tools.ant.Project.executeTarget(Project.java:1214) [xslt] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386) [xslt] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:106) [xslt] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [xslt] at org.apache.tools.ant.Task.perform(Task.java:364) [xslt] at org.apache.tools.ant.Target.execute(Target.java:341) [xslt] at org.apache.tools.ant.Target.performTasks(Target.java:369) [xslt] at org.apache.tools.ant.Project.executeTarget(Project.java:1214) [xslt] at org.apache.tools.ant.Project.executeTargets(Project.java:1062) [xslt] at org.apache.tools.ant.Main.runBuild(Main.java:673) [xslt] at org.apache.tools.ant.Main.startAnt(Main.java:188) [xslt] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196) [xslt] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55) [xslt] : Error! null [xslt] : Fatal Error! Could not compile stylesheet [xslt] Failed to process /home/rajarshi/src/java/cdk-nightly/cdk/reports/pmd/qsar.xml BUILD FAILED /home/rajarshi/src/java/cdk-nightly/cdk/pmd.xml:29: The following error occurred while executing this line: /home/rajarshi/src/java/cdk-nightly/cdk/pmd.xml:79: Fatal error during transformation ------------------------------------------------------------------- Rajarshi Guha <rx...@ps...> <http://jijo.cjb.net> GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE ------------------------------------------------------------------- A man is known by the company he organizes. -- Ambrose Bierce |