[elbe-devel] [PATCH] validate: improve error message if xinclude is used

Manuel Traut manut at linutronix.de
Wed Aug 23 17:33:06 CEST 2017


and elbe preprocess was not called

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/validate.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/elbepack/validate.py b/elbepack/validate.py
index 7574cb91..2e0a59a5 100644
--- a/elbepack/validate.py
+++ b/elbepack/validate.py
@@ -38,8 +38,15 @@ def validate_xml(fname):
 
     # We have errors, return them in string form...
     errors = []
+    uses_xinclude = False
+
     for err in schema.error_log:
         errors.append ("%s:%d error %s" % (err.filename, err.line, err.message))
+        if "http://www.w3.org/2003/XInclude" in err.message:
+            uses_xinclude = True
+
+    if uses_xinclude:
+        errors.append ("\nThere are XIncludes in the XML file. Run 'elbe preprocess' first!\n")
 
     return errors
 
-- 
2.14.1




More information about the elbe-devel mailing list