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="wswitch" select="//RSpec//target-context/argument[name='whitelist-switch']/value"/>
13 <xsl:variable name="wtpsrc" select="//RSpec//target-context/argument[name='whitelist-tpsrc']/value"/>
14 <xsl:variable name="wtpdst" select="//RSpec//target-context/argument[name='whitelist-tpdst']/value"/>
15 <xsl:variable name="wipsrc" select="//RSpec//target-context/argument[name='whitelist-ipsrc']/value"/>
16 <xsl:variable name="wipdst" select="//RSpec//target-context/argument[name='whitelist-ipdst']/value"/>
18 <!-- Drop nodes that are not in the whitelist -->
19 <xsl:template match="//switchEntry">
21 <xsl:when test="(nodeId==$wswitch) and
22 (interfaceEntry/flowSpaceEntry/tp_src==$wtpsrc) and
23 (interfaceEntry/flowSpaceEntry/tp_dst==$wtpdst)">
24 <xsl:copy-of select="."/>