|
@@ -43,24 +43,30 @@ class XmlWalker:
|
|
|
|
|
|
|
|
def getPath(self, attr):
|
|
def getPath(self, attr):
|
|
|
path = self.root.getAttribute(attr)
|
|
path = self.root.getAttribute(attr)
|
|
|
|
|
+
|
|
|
if path.startswith("./") or path.startswith(".\\"):
|
|
if path.startswith("./") or path.startswith(".\\"):
|
|
|
return self.xml_folder + path[2:len(path)]
|
|
return self.xml_folder + path[2:len(path)]
|
|
|
|
|
|
|
|
|
|
+ if path == ".":
|
|
|
|
|
+ return self.xml_folder
|
|
|
|
|
+
|
|
|
return self.path + path
|
|
return self.path + path
|
|
|
|
|
|
|
|
def setSrcFullPath(self, path):
|
|
def setSrcFullPath(self, path):
|
|
|
return self.src + path
|
|
return self.src + path
|
|
|
|
|
|
|
|
|
|
+
|
|
|
def checkSetAttributes(self):
|
|
def checkSetAttributes(self):
|
|
|
self._checkSetAttributes(self.root)
|
|
self._checkSetAttributes(self.root)
|
|
|
|
|
|
|
|
def _checkSetAttributes(self, node):
|
|
def _checkSetAttributes(self, node):
|
|
|
path = node.getAttribute("path")
|
|
path = node.getAttribute("path")
|
|
|
if path:
|
|
if path:
|
|
|
- if 0:
|
|
|
|
|
- path = ""
|
|
|
|
|
if path.startswith("./") or path.startswith(".\\"):
|
|
if path.startswith("./") or path.startswith(".\\"):
|
|
|
path = self.xml_folder + path[2:len(path)]
|
|
path = self.xml_folder + path[2:len(path)]
|
|
|
|
|
+ elif path == ".":
|
|
|
|
|
+ path = self.xml_folder
|
|
|
|
|
+
|
|
|
self.path = path + "/"
|
|
self.path = path + "/"
|
|
|
|
|
|
|
|
scale_factor = node.getAttribute("scale_factor")
|
|
scale_factor = node.getAttribute("scale_factor")
|