Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
R# commandlines dupfinder.xsl
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="" version="1.0">
<xsl:output method="html" indent="yes" doctype-system="about:legacy-compat"/>
<xsl:template match="/">
<p>Total codebase size: <xsl:value-of select="//CodebaseCost"/></p>
<p>Code to analyze: <xsl:value-of select="//TotalDuplicatesCost"/></p>
<p>Total size of duplicated fragments: <xsl:value-of select="//CodebaseCost" /></p>
<h1>Detected Duplicates</h1>
<xsl:for-each select="//Duplicates/Duplicate">
<h3>Cost: <xsl:value-of select="@Cost"/></h3>
<xsl:for-each select="Fragment">
<xsl:variable name="i" select="position()"/>
<summary>Fragment <xsl:value-of select="$i"/> in file <xsl:value-of select="FileName"/> (lines <xsl:value-of select="LineRange/@Start"/> - <xsl:value-of select="LineRange/@End"/>)</summary>
<pre><xsl:value-of select="Text"/></pre>

This comment has been minimized.

Copy link

@giusepe giusepe commented Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment