Discussion:
Issue 153 in html5lib: preserve order of attributes on serialization
h***@public.gmane.org
2011-05-22 19:22:44 UTC
Permalink
Updates:
Cc: ja...-***@public.gmane.org

Comment #2 on issue 153 by geoffers: preserve order of attributes on
serialization
http://code.google.com/p/html5lib/issues/detail?id=153

There's no real way to fix this without relying upon
defined-to-be-undefined behaviour in CPython/lxml, and as such I'm
reluctant to do so. lxml says attributes are given in an arbitrary order,
and they are stored in a dict which CPython makes no guarantee of the order
of. (lxml does always insert attributes in document order into the dict,
and dicts are ordered by insertion order, so it does actually work… for
now, at least).

Yes, we could go against both the lxml/CPython documentation and rely upon
the ordering, but if either ever changes their behaviour, it could mean
html5lib could potentially start serializing the same lxml parse-tree in
random ways, and I'd much rather go for the definitely-consistent route we
have now.
--
You received this message because you are subscribed to the Google Groups "html5lib-discuss" group.
To post to this group, send an email to html5lib-discuss-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to html5lib-discuss+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/html5lib-discuss?hl=en-GB.
h***@public.gmane.org
2013-05-04 12:22:11 UTC
Permalink
Updates:
Status: GitHub

Comment #4 on issue 153 by geoffers: preserve order of attributes on
serialization
http://code.google.com/p/html5lib/issues/detail?id=153

https://github.com/html5lib/html5lib-python/issues/37
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups "html5lib-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to html5lib-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send an email to html5lib-discuss-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/html5lib-discuss?hl=en-GB.
For more options, visit https://groups.google.com/groups/opt_out.
Loading...