Skip to content

Commit 55719c8

Browse files
committed
No need to always allow xs or xsi
Both should be found by qname_prefixes() if they are in use
1 parent 7a4930a commit 55719c8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/pyff/samlmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def entitiesdescriptor(
521521
# Clean unused namespaces. Prefixes referenced only from QName-valued attributes
522522
# (xsi:type="xsd:string") are invisible to lxml's usage tracking, so collect and
523523
# preserve them explicitly - see issue #333.
524-
keep_ns_prefixes = sorted({'xs', 'xsi'} | qname_prefixes(t))
524+
keep_ns_prefixes = qname_prefixes(t)
525525
etree.cleanup_namespaces(t, keep_ns_prefixes=keep_ns_prefixes)
526526

527527
if config.devel_write_xml_to_file:

0 commit comments

Comments
 (0)