Skip to content

Instantly share code, notes, and snippets.

@lisitsyn
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lisitsyn/8793002 to your computer and use it in GitHub Desktop.
Save lisitsyn/8793002 to your computer and use it in GitHub Desktop.
Dynamic analysis transformer
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="DynamicAnalysis">
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Dynamic analysis</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css"/>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap-theme.min.css"/>
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="panel-group" id="testcases">
<xsl:for-each select="Test">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#testcases" href="#{generate-id()}">
<b><xsl:value-of select="FullName"/><br/></b>
<ul>
<xsl:for-each select="Results/Defect">
<li>
<xsl:value-of select="@type"/>
<xsl:text> (</xsl:text>
<xsl:value-of select="."/>
<xsl:text>)</xsl:text>
</li>
</xsl:for-each>
</ul>
</a>
</h4>
</div>
<div id="{generate-id()}" class="panel-collapse collapse">
<div class="panel-body">
Log:<br/>
<pre>
<xsl:value-of select="Log"/>
</pre>
Full command line to reproduce:<br/>
<kbd>
<xsl:value-of select="FullCommandLine"/>
</kbd>
</div>
</div>
</div>
</xsl:for-each>
</div>
</body>
</html>
<script>
$('#testcases').collapse();
</script>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment