Re: Cannot <include> from a network location
On Friday, June 25, 2021 5:10:47 AM EDT Holger.Joukl@LBBW.de wrote:
parser=etree.XMLParser(load_dtd=True, no_network=False, huge_tree=True, resolve_entities=True)
Huh? You should set no_network=True!
I think you're mistaken here.
See https://lxml.de/apidoc/lxml.etree.html#lxml.etree.XMLParser: "[...] no_network - prevent network access for related files (default: True) [...]"
So to the contrary I'd say that the OP is correct in assuming one needs to set no_network=False iff he indeed wants to load from the network. (From what I understand proper use of xml catalogs is the recommended way, though, so maybe that's what you meant?)
However according to https://bugs.launchpad.net/lxml/+bug/1234114 this doesn't currently govern XML Schema xs:include/xs:import, at all. So this setting seems not make a difference currently, anyway.
Best regards, H.
Landesbank Baden-Wuerttemberg Anstalt des oeffentlichen Rechts Hauptsitze: Stuttgart, Karlsruhe, Mannheim, Mainz HRA 12704 Amtsgericht Stuttgart HRA 4356, HRA 104 440 Amtsgericht Mannheim HRA 40687 Amtsgericht Mainz
Die LBBW verarbeitet gemaess Erfordernissen der DSGVO Ihre personenbezogenen Daten. Informationen finden Sie unter https://www.lbbw.de/datenschutz.