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_suffix" select="//RSpec//target-context/argument[name='whitelist-dns-suffix']/value"/>
13 <xsl:variable name="blacklist_suffix" select="//RSpec//target-context/argument[name='blacklist-dns-suffix']/value"/>
15 <!-- Drop nodes that are not in the whitelist. This is the legacy version that works on the current
16 rspec. The current rspec refers to dns names, not sfa names for nodes.-->
17 <xsl:template match="NodeSpec">
19 <xsl:when test="(not($whitelist_suffix) or contains(@name,$whitelist_suffix)) and (not($blacklist_suffix) or not(contains(@name,$blacklist_suffix)))">
20 <xsl:copy-of select="."/>