summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Peveler <matt.peveler@gmail.com>2021-02-06 02:01:01 +0000
committerMatthew Peveler <matt.peveler@gmail.com>2021-02-06 02:01:01 +0000
commit4d3e330fedbf08be369fb5a148966362029137eb (patch)
tree88c095a6dbaeaa86c2a951474526baa3e41bdd56
parent30d33906adf442e79aed3c15979225ef793138b3 (diff)
downloadasciidoc-py3-4d3e330fedbf08be369fb5a148966362029137eb.tar.gz
set --catalogs for xmllint if SGML_CATALOG_FILES env is set
Backport of 289c42d179be0bf665cca9b618fb282384175c4f (#172) Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
-rwxr-xr-xa2x.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/a2x.py b/a2x.py
index 4715b48..2c26a94 100755
--- a/a2x.py
+++ b/a2x.py
@@ -699,7 +699,10 @@ class A2X(AttrDict):
shell('"%s" --backend docbook -a "a2x-format=%s" %s --out-file "%s" "%s"' %
(self.asciidoc, self.format, self.asciidoc_opts, docbook_file, self.asciidoc_file))
if not self.no_xmllint and XMLLINT:
- shell('"%s" --nonet --noout --valid "%s"' % (XMLLINT, docbook_file))
+ xmllint_options = ['--nonet', '--noout', '--valid']
+ if 'SGML_CATALOG_FILES' in os.environ:
+ xmllint_options.append('--catalogs')
+ shell('"%s" %s "%s"' % (XMLLINT, " ".join(xmllint_options), docbook_file))
def to_xhtml(self):
self.to_docbook()