Added some new priority filtering XSLT from David Corley. This should at the very least be handy as example code, and maybe folks will find this directly useful.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4398 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2006-06-01 13:26:51 +00:00
parent 14b55c377a
commit 1347e37d92
8 changed files with 114 additions and 0 deletions

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml"/>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="pmd/file/violation[@priority='2']"/>
<xsl:template match="pmd/file/violation[@priority='3']"/>
<xsl:template match="pmd/file/violation[@priority='4']"/>
<xsl:template match="pmd/file/violation[@priority='5']"/>
</xsl:stylesheet>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml"/>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="pmd/file/violation[@priority='1']"/>
<xsl:template match="pmd/file/violation[@priority='3']"/>
<xsl:template match="pmd/file/violation[@priority='4']"/>
<xsl:template match="pmd/file/violation[@priority='5']"/>
</xsl:stylesheet>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml"/>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="pmd/file/violation[@priority='1']"/>
<xsl:template match="pmd/file/violation[@priority='2']"/>
<xsl:template match="pmd/file/violation[@priority='4']"/>
<xsl:template match="pmd/file/violation[@priority='5']"/>
</xsl:stylesheet>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml"/>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="pmd/file/violation[@priority='1']"/>
<xsl:template match="pmd/file/violation[@priority='2']"/>
<xsl:template match="pmd/file/violation[@priority='3']"/>
<xsl:template match="pmd/file/violation[@priority='5']"/>
</xsl:stylesheet>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml"/>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="pmd/file/violation[@priority='1']"/>
<xsl:template match="pmd/file/violation[@priority='2']"/>
<xsl:template match="pmd/file/violation[@priority='3']"/>
<xsl:template match="pmd/file/violation[@priority='4']"/>
</xsl:stylesheet>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml"/>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="pmd/file/violation[@priority='3']"/>
<xsl:template match="pmd/file/violation[@priority='4']"/>
<xsl:template match="pmd/file/violation[@priority='5']"/>
</xsl:stylesheet>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml"/>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="pmd/file/violation[@priority='4']"/>
<xsl:template match="pmd/file/violation[@priority='5']"/>
</xsl:stylesheet>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml"/>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="pmd/file/violation[@priority='5']"/>
</xsl:stylesheet>