I know how to set up the parser to not download entities. But I have not
found a way to stop XMLCatalog from downloading other xsd's than the root
xsd.

from lxml import etree
parser = etree.XMLParser(no_network=True)
xsddoc = etree.parse('schemas/ler/2.0_ler.xsd',parser=parser)
xsd = etree.XMLSchema(xsddoc)

The above code will recursively download the XSD's imported in 2.0_ler.xsd.

I played around with xmllint and I believe that if XML_PARSE_NONET is True,
if will not download those. But how do I set that option for the context in
which XMLSchema runs?

Sincerely, Thomas
_______________________________________________
lxml - The Python XML Toolkit mailing list -- lxml@python.org
To unsubscribe send an email to lxml-le...@python.org
https://mail.python.org/mailman3/lists/lxml.python.org/
Member address: arch...@mail-archive.com

Reply via email to