A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/1168 below:

[core] xml renderer schema definitions (#538) break included xslt files · Issue #1168 · pmd/pmd · GitHub

Affects PMD Version:
6.4.0

Description:
In 079fc1c (for issue #538) an xml schema was added to the xml renderer reports. Unfortunately, that means the xpaths in the xslt files (in pmd-core/etc/xslt) no longer match, resulting in just broken text output. The fix is to either:

Code Sample demonstrating the issue:
Eg, using the saxon packaged with 6.4.0 and the current master xslt file on an xml report (the warning can be ignored):

$ java -jar ~/pmd-bin-6.4.0/lib/saxon-9.1.0.8.jar pmd.xml ~/src/pmd/pmd-core/etc/xslt/only-prio1.xslt > p1.html
Warning: at xsl:stylesheet on line 3 column 80 of only-prio1.xslt:
  Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
$ more p1.html
<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">



Each class should declare at least one constructor


Header comments are required


Comment is too large: Line too long

...(etc)

If we update the stylesheet to v2.0 and add xpath-default-namespace:

$ vi ~/src/pmd/pmd-core/etc/xslt/only-prio1.xslt
$ java -jar ~/pmd-bin-6.4.0/lib/saxon-9.1.0.8.jar pmd.xml ~/src/pmd/pmd-core/etc/xslt/only-prio1.xslt > p1-fixed.html
$ more p1-fixed.html
<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>PMD 6.4.0 Report</title><script type="text/javascript" src="fcoltable.js"></script><style type="text/css">
		@import "fcoltable.css";
(etc)

Running PMD through: CLI or Ant (probably anywhere though)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4