[lxml-dev] etree.cleanup_namespaces() removes namespaces that are used in ns-prefixed attribute values

Hi, would that be a bug or is it just not supported/sanely supportable?
Note how the XML Schema namespace as used in xsd:integer has been removed.
print etree.__version__ # oldschool ;-) 3.7.2
Holger 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.

Holger Joukl schrieb am 02.05.19 um 17:02:
A missing feature, I'd say. C14N (2.0, will be in lxml 4.4) allows defining a set of elements and attributes where qualified tag names should be detected (and adapted) in their text. That might be a good approach here, too. https://github.com/lxml/lxml/blob/3f0db5d57940eebd418fe86bcbdad39ffe23211d/s...
print etree.__version__ # oldschool 3.7.2
Sorry, new feature, new release. :) Stefan

Holger Joukl schrieb am 02.05.19 um 17:02:
A missing feature, I'd say. C14N (2.0, will be in lxml 4.4) allows defining a set of elements and attributes where qualified tag names should be detected (and adapted) in their text. That might be a good approach here, too. https://github.com/lxml/lxml/blob/3f0db5d57940eebd418fe86bcbdad39ffe23211d/s...
print etree.__version__ # oldschool 3.7.2
Sorry, new feature, new release. :) Stefan
participants (3)
-
Dirk Rothe
-
Holger Joukl
-
Stefan Behnel