bug#41320: sxml attributes of some elements are in reverse order
| Newsgroups | gmane.lisp.guile.bugs |
|---|---|
| Message-ID | <[email protected]> |
On Sat, May 16, 2020 at 12:29:54PM +0200, Jan Synacek wrote:
> Consider the following code snippet running on Guile-3.0.2:
[...]
> <event name="KeyPress" number="2">
[...]
> (event (@ (number 2) (name KeyPress))
> Attributes 'number' and 'name' are in reverse compared to the original
> xml. On the other hand, 'type' and 'name' of the 'field' element are in
> correct order.
According to the XML spec, attribute order is irrelevant [1]
"Note that the order of attribute specifications in
a start-tag or empty-element tag is not significant."
Now one could argue that we might want to be stricter in the
XML->SXML processor, which would be fine, but OTOH there's a
price to pay. The question is whether we want to go there --
just imagine another XML processor in the middle changing
attribute order. It would be spec compliant. What now?
Tough question.
Cheers
[1] https://www.w3.org/TR/REC-xml/#sec-starttags
-- t
signature.asc
(application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAl6/yC8ACgkQBcgs9XrR2kagfACeND3LyLuUENJ15fXDBMUytOoU GjkAnAjdT0RqI6t8L62orni17WQ5EmZU =F39l -----END PGP SIGNATURE-----