From 3a11c9b8a4c647d8635b4fce8eb249c5cf4fb4ce Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Mon, 14 Sep 2009 02:36:27 +0000 Subject: [PATCH] Added a new attribute to targets -- 'terminal', which indicates that the current request should not be processed further. --- sfatables/xmlextension.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sfatables/xmlextension.py b/sfatables/xmlextension.py index 1e27e762..77219eb2 100644 --- a/sfatables/xmlextension.py +++ b/sfatables/xmlextension.py @@ -12,6 +12,7 @@ class Xmlextension: processor = "" operand = "VALUE" arguments = [] + terminal = 0 def __init__(self, dir, component_name): filename = dir+"/"+component_name+".xml" @@ -34,6 +35,9 @@ class Xmlextension: help = p.xpathEval('//rule/argument/help') target = p.xpathEval('//rule/argument/operand') + context = p.xpathEval('//attributes/attribute[@terminal="yes"]') + self.terminal = (context != []) + self.arguments = map(lambda (name,help,target):{'name':name.content,'help':help.content,'target':target.content}, zip(name,help,target)) p.xpathFreeContext() -- 2.47.0