|
@@ -57,7 +57,8 @@ class ModelVisitor(Visitor):
|
|
|
if len(children) == 2 or len(children) == 4:
|
|
|
element_name = children[1].get_text()
|
|
|
else:
|
|
|
- element_name = ""
|
|
|
+ element_name = "__%s" % self.free_id
|
|
|
+ self.free_id += 1
|
|
|
|
|
|
if len(children) > 2:
|
|
|
# So we have a source and target; but aren't sure which is which, because the name is optional!
|
|
@@ -85,4 +86,4 @@ class ModelVisitor(Visitor):
|
|
|
# is assign
|
|
|
attr_name = children[0].get_text()
|
|
|
attr_value = tree.get_children("value")[0]
|
|
|
- self.constructors.extend(['"instantiate_attribute"', jsonstr(self.current_element), jsonstr(attr_name), jsonstr(attr_value.get_text()) if attr_value.head == "STRVALUE" else attr_value.get_text()])
|
|
|
+ self.constructors.extend(['"instantiate_attribute"', jsonstr(self.current_model), jsonstr(self.current_element), jsonstr(attr_name), jsonstr(attr_value.get_text()) if attr_value.head == "STRVALUE" else attr_value.get_text()])
|