Lines Matching refs:self
45 def __init__ (self, name): argument
46 self.name = name
47 self.tokens = []
48 self.vars = {}
52 def __init__ (self): argument
53 self.children = []
55 def appendChild (self, childnode): argument
56 self.children.append(childnode)
57 childnode.parent = self
59 def getChildren (self): argument
60 return self.children
64 def __init__ (self): argument
65 Node.__init__(self)
67 def dump (self): argument
69 for child in self.getChildren():
78 def __init__ (self, name, rid = None): argument
79 Node.__init__(self)
80 self.name = name
81 self.parent = None
85 self.rid = rid
86 self.attrs = {}
88 def dump (self, level = 0): argument
91 chars += '<%s'%self.name
93 if self.rid != None:
94 self.setAttr("rid", self.rid)
96 chars += self.__dumpAttrs()
98 if len(self.children) == 0:
102 for child in self.getChildren():
106 chars += "</%s>"%self.name
110 def hasAttr (self, name): argument
111 return name in self.attrs
113 def getAttr (self, name): argument
114 return self.attrs[name]
116 def setAttr (self, name, value): argument
119 self.attrs[name] = removeQuote(value)
123 def clone (self, elem): argument
126 self.attrs[key] = elem.attrs[key]
127 self.rid = elem.rid
129 def __dumpAttrs (self): argument
131 keys = sorted(self.attrs.keys())
133 value = self.attrs[key]