Last active
August 10, 2016 16:33
-
-
Save siliconmeadow/0dc7d01d6b61b427983f29d0e7caa300 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='UTF-8'?> | |
<!-- | |
Transform the term frequency reports to html tables. | |
--> | |
<xsl:stylesheet version='1.0' | |
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' | |
> | |
<xsl:output media-type="text/html; charset=UTF-8" encoding="UTF-8"/> | |
<xsl:template match="/"> | |
<html> | |
<head> | |
<title>Title goes here</title> | |
<style> | |
table, th, td {border: 1px solid black} | |
</style> | |
</head> | |
<body> | |
<table> | |
<tr> | |
<th>Term</th> | |
<th>Frequency</th> | |
</tr> | |
<xsl:apply-templates/> | |
</table> | |
</body> | |
</html> | |
</xsl:template> | |
<xsl:template match="lst[@name='tm_title']/int[@name]" name="termfreq"> | |
<tr> | |
<td><xsl:value-of select="@name"/></td> | |
<td><xsl:value-of select="."/></td> | |
</tr> | |
</xsl:template> | |
<xsl:template match="lst[@name='responseHeader']/int[@name='QTime']"></xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment