From: Sapan Bhatia Date: Mon, 14 Sep 2009 02:36:27 +0000 (+0000) Subject: Added a new attribute to targets -- 'terminal', which indicates that the current... X-Git-Tag: sfa-0.9-2~31 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=3a11c9b8a4c647d8635b4fce8eb249c5cf4fb4ce;p=sfa.git Added a new attribute to targets -- 'terminal', which indicates that the current request should not be processed further. --- 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()