aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ventoo/VentooModule.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ventoo/VentooModule.py b/src/ventoo/VentooModule.py
index e320766..86ec9c5 100644
--- a/src/ventoo/VentooModule.py
+++ b/src/ventoo/VentooModule.py
@@ -69,6 +69,14 @@ class VentooModule:
pass
return None
+ def getValidationScript(self, xPath):
+ try:
+ elem = self.xmlTree.xpath(osp.join(xPath))
+ if len(elem) >= 1 and not elem[0].get("validate") == None:
+ return osp.abspath(osp.join(self.docRoot, augeas_utils.stripBothSlashes(elem[0].get("validate"))))
+ except etree.XPathEvalError:
+ pass
+ return None
"""
Returns true if a comes before b