From 8ffa6e6e714a560d17e13f909625f143338e785b Mon Sep 17 00:00:00 2001 From: mike Date: Mon, 12 Oct 2009 21:16:08 +0000 Subject: LP 439980 : Renaming nodes for XMLSerializer, Moving properties tests to /tmp, Removing commented code in filters --- (limited to 'tutorius/bundler.py') diff --git a/tutorius/bundler.py b/tutorius/bundler.py index 9cbd917..56bbf3e 100644 --- a/tutorius/bundler.py +++ b/tutorius/bundler.py @@ -48,8 +48,8 @@ INI_XML_FSM_PROPERTY = "FSM_FILENAME" INI_FILENAME = "meta.ini" TUTORIAL_FILENAME = "tutorial.xml" NODE_COMPONENT = "Component" -NODE_SUBCOMPONENT = "SubComponent" -NODE_SUBCOMPONENTLIST = "SubComponentList" +NODE_SUBCOMPONENT = "property" +NODE_SUBCOMPONENTLIST = "listproperty" class TutorialStore(object): @@ -159,9 +159,9 @@ class XMLSerializer(Serializer): e.g. - + - + When reloading this node, we should look up the property name for the parent @@ -177,7 +177,7 @@ class XMLSerializer(Serializer): that represents another component. """ subCompNode = doc.createElement(NODE_SUBCOMPONENT) - subCompNode.setAttribute("property", parent_attr_name) + subCompNode.setAttribute("name", parent_attr_name) subNode = self._create_component_node(comp, doc) @@ -193,10 +193,10 @@ class XMLSerializer(Serializer): e.g. - + - + When reloading this node, we should look up the property name for the parent @@ -209,7 +209,7 @@ class XMLSerializer(Serializer): @returns A NODE_SUBCOMPONENTLIST node with the property attribute """ subCompListNode = doc.createElement(NODE_SUBCOMPONENTLIST) - subCompListNode.setAttribute("property", parent_attr_name) + subCompListNode.setAttribute("name", parent_attr_name) for comp in comp_list: compNode = self._create_component_node(comp, doc) @@ -402,7 +402,7 @@ class XMLSerializer(Serializer): Loads all the subcomponent node below the given node and inserts them with the right property name inside the properties dictionnary. - @param node The parent node that contains one or many SubComponent nodes. + @param node The parent node that contains one or many property nodes. @param properties A dictionnary where the subcomponent property names and the instantiated components will be stored @returns Nothing. The properties dict will contain the property->comp mapping. @@ -410,7 +410,7 @@ class XMLSerializer(Serializer): subCompList = self._get_direct_descendants_by_tag_name(node, NODE_SUBCOMPONENT) for subComp in subCompList: - property_name = subComp.getAttribute("property") + property_name = subComp.getAttribute("name") internal_comp_node = self._get_direct_descendants_by_tag_name(subComp, NODE_COMPONENT)[0] internal_comp = self._load_xml_component(internal_comp_node) properties[str(property_name)] = internal_comp @@ -426,7 +426,7 @@ class XMLSerializer(Serializer): """ listOf_subCompListNode = self._get_direct_descendants_by_tag_name(node, NODE_SUBCOMPONENTLIST) for subCompListNode in listOf_subCompListNode: - property_name = subCompListNode.getAttribute("property") + property_name = subCompListNode.getAttribute("name") subCompList = [] for subCompNode in self._get_direct_descendants_by_tag_name(subCompListNode, NODE_COMPONENT): subComp = self._load_xml_component(subCompNode) -- cgit v0.9.1