X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfatables%2Fruntime.py;h=f9263fb1261cb5b621505ac95770b00d45c3066b;hb=a7a01a6a19f91fccb0bda1c60454ebe2cc848d2d;hp=b76ec0a8dda631b20081a977dd01e70cbfcb98e8;hpb=73b163a7ea35209e0675a7c7cef367946928a96f;p=sfa.git diff --git a/sfatables/runtime.py b/sfatables/runtime.py index b76ec0a8..f9263fb1 100644 --- a/sfatables/runtime.py +++ b/sfatables/runtime.py @@ -50,7 +50,9 @@ class SFATablesRules: childNode = self.create_xml_node(k, context_dict[k]) node.addChild(childNode) else: - node.addContent(context_dict[k]) + childNode = libxml2.newNode(k) + childNode.addContent(context_dict[k]) + node.addChild(childNode) return node def add_request_context_to_rspec(self, doc): @@ -74,8 +76,8 @@ class SFATablesRules: intermediate_rspec = doc for rule in self.sorted_rule_list: - intermediate_rspec = rule.apply_interpreted(intermediate_rspec) - if (rule.terminal): + (matched,intermediate_rspec) = rule.apply_interpreted(intermediate_rspec) + if (rule.terminal and matched): break final_rspec = self.wrap_up(intermediate_rspec)