Added separate contexts for matches and targets, instead of having combined contexts...
authorSapan Bhatia <sapanb@cs.princeton.edu>
Mon, 26 Oct 2009 14:52:06 +0000 (14:52 +0000)
committerSapan Bhatia <sapanb@cs.princeton.edu>
Mon, 26 Oct 2009 14:52:06 +0000 (14:52 +0000)
sfatables/processors/hrn.xsl
sfatables/processors/link/restrict_slice.xml
sfatables/processors/max_link_bandwidth.xsl
sfatables/processors/restrict_to_nodes.xsl

index 318739a..a0adff2 100644 (file)
@@ -9,7 +9,7 @@
             <xsl:apply-templates select="@* | node()"/>
     </xsl:template>
 
-    <xsl:template match="user">
+    <xsl:template match="//match-context//user">
                     <xsl:choose>
                     <xsl:when test="starts-with($context-hrn, hrn)">
                         <result verdict="True"/> <!--Match -->
index ee641cc..b3271a6 100644 (file)
@@ -11,7 +11,7 @@
     <!-- End of magic sauce -->
 
     <!-- Read in the value of the argument. See 'example_vini_rspec.xml' for an example of such an argument -->
-    <xsl:variable name="max-link-bandwidth" select="//RSpec//rule-context/argument[name='max-link-bandwidth']/value"/>
+    <xsl:variable name="max-link-bandwidth" select="//rspec//rule-context/argument[name='max-link-bandwidth']/value"/>
 
     <!-- Drop Linkspecs for which bw > max-link-bandwidth -->
     <xsl:template match="LinkSpec">
index ee641cc..42b5711 100644 (file)
@@ -11,7 +11,7 @@
     <!-- End of magic sauce -->
 
     <!-- Read in the value of the argument. See 'example_vini_rspec.xml' for an example of such an argument -->
-    <xsl:variable name="max-link-bandwidth" select="//RSpec//rule-context/argument[name='max-link-bandwidth']/value"/>
+    <xsl:variable name="max-link-bandwidth" select="//rspec//target-context/argument[name='max-link-bandwidth']/value"/>
 
     <!-- Drop Linkspecs for which bw > max-link-bandwidth -->
     <xsl:template match="LinkSpec">
index e9b821f..b6a3eba 100644 (file)
@@ -9,8 +9,8 @@
         </xsl:copy>
     </xsl:template>
 
-    <xsl:variable name="whitelist_prefix" select="//rspec//rule-context/argument[name='whitelist']/value"/>
-    <xsl:variable name="blacklist_prefix" select="//rspec//rule-context/argument[name='blacklist']/value"/>
+    <xsl:variable name="whitelist_prefix" select="//rspec//target-context/argument[name='whitelist']/value"/>
+    <xsl:variable name="blacklist_prefix" select="//rspec//target-context/argument[name='blacklist']/value"/>
 
     <!-- Drop nodes that are not in the whitelist -->
     <xsl:template match="node">