1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3 <!-- Magic sauce copied from a manual. This fragment basically copies everything except for
4 stuff that explicitly matches with the templates defined below. In the case of such a match,
5 the matched node is treated differently.-->
6 <xsl:template match="@* | node()">
8 <xsl:apply-templates select="@* | node()"/>
12 <xsl:variable name="whitelist_prefix" select="//rspec//rule/argument[name='whitelist']/value"/>
13 <xsl:variable name="blacklist_prefix" select="//rspec//rule/argument[name='blacklist']/value"/>
15 <!-- Drop nodes that are not in the whitelist -->
16 <xsl:template match="node">
18 <xsl:when test="starts-with(@name,$whitelist_prefix) and not($blacklist_prefix and starts-with(@name,$blacklist_prefix))">
19 <xsl:copy-of select="."/>
25 <xsl:template match="sfatables-input"/>