aboutsummaryrefslogtreecommitdiffstats
path: root/lv2specgen/lv2specgen.py
diff options
context:
space:
mode:
Diffstat (limited to 'lv2specgen/lv2specgen.py')
-rwxr-xr-xlv2specgen/lv2specgen.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index e280b25..1b6400e 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -1386,6 +1386,19 @@ def specgen(specloc, indir, style_uri, docdir, tags, opts, instances=False, root
if index_path is not None:
writeIndex(m, specloc, index_path, root_path, root_uri)
+ # Validate complete output page
+ try:
+ oldcwd = os.getcwd()
+ os.chdir(specgendir)
+ root = etree.fromstring(
+ template.replace('"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"',
+ '"DTD/xhtml-rdfa-1.dtd"').encode('utf-8'),
+ etree.XMLParser(dtd_validation=True, no_network=True))
+ except Exception as e:
+ sys.stderr.write("error: Validation failed for %s: %s" % (specloc, e))
+ finally:
+ os.chdir(oldcwd)
+
return template