Okay it seems the old sigil_bs4 code used "sorted()" when accessing attribute key, value pairs to help keep stability of attribute order before python moved to dictionaries being ordered by default.
Now that python has made that move, removal of the "sorted()" method should help maintain input attribute order as long as the underlying parser (lxml) maintains that order.
I have pushed this change to master. It will appear in the next release.
That said, anything that relies on xml attribute order is very broken according to the spec. We only try to maintain the order so that Checkpoint diffs are not cluttered by meaningless changes.
Last edited by KevinH; 01-27-2023 at 03:51 PM.
|