Home | History | Annotate | Download | only in main

Lines Matching refs:node

43         node = self.spec_node.children
44 while node:
45 if node.type == "element":
46 if node.name == "template":
47 self.tmpl_nodes[node.prop("name")] = node
48 elif node.name == "api":
49 self.api_nodes[node.prop("name")] = node
51 raise SpecError("unexpected node %s in apispec" %
52 node.name)
53 node = node.next
56 for name, node in self.api_nodes.iteritems():
57 if node.prop("implementation") == "true":
58 self.impl_node = node
84 node = api_node.children
85 while node:
86 if node.type == "element":
87 if node.name == "category":
88 cat = node.prop("name")
90 elif node.name == "function":
91 func_nodes.append(node)
93 raise SpecError("unexpected node %s in api" % node.name)
94 node = node.next
123 """Parse and realize a <template> node."""
160 node = proto_node.children
161 while node:
162 if node.type == "element":
163 if node.name == "return":
164 self.return_type = node.prop("type")
165 elif node.name == "param" or node.name == "vector":
166 if self.support_node(node):
167 # make sure the node is not hidden
169 (node.prop("hide_if_expanded") == "true")):
170 param_nodes.append(node)
172 raise SpecError("unexpected node %s in proto" % node.name)
173 node = node.next
220 node = tmpl_node.children
221 while node:
222 if node.type == "element" and node.name == "desc":
223 if self.support_node(node):
225 desc = Description(node, self._categories)
227 node = node.next
231 def support_node(self, node):
232 """Return true if a node is in the supported category."""
233 return (not node.hasProp("category") or
234 node.prop("category") in self._categories)
459 node = desc_node.children
460 while node:
461 if node.type == "element":
462 if node.name in valid_names:
464 if (node.prop("category") and
465 node.prop("category") not in self._categories):
466 node = node.next
469 raise SpecError("unexpected node %s in desc" % node.name)
471 if node.name == "value":
472 val = node.prop("name")
476 elif node.name == "range":
477 first = int(node.prop("from"))
478 last = int(node.prop("to"))
479 base = node.prop("base") or ""
486 dep_nodes.append(node)
487 node = node.next
506 """Search the template parameters for the named node."""
512 for node in param_nodes:
513 if name == node.prop("name"):
514 param_node = node
515 elif node.name == "vector":
516 child = node.children
521 param_node = node
538 node, index = self._search_param_node(param_nodes)
539 if not node:
545 param = func.get_param(node.prop("name"))
547 elif node.name == "vector":
551 expanded_size = func.param_node_size(node)