unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: <tomas@tuxteam.de>
To: Jan Synacek <jsynacek@redhat.com>
Cc: 41320@debbugs.gnu.org
Subject: bug#41320: sxml attributes of some elements are in reverse order
Date: Sat, 16 May 2020 13:02:07 +0200	[thread overview]
Message-ID: <20200516110207.GC30977@tuxteam.de> (raw)
In-Reply-To: <m6fimgw6ul9.fsf@jsynacek-ntb.brq.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 971 bytes --]

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2020-05-16 11:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-16 10:29 bug#41320: sxml attributes of some elements are in reverse order Jan Synacek
2020-05-16 11:02 ` tomas [this message]
2020-05-16 12:27   ` Jan Synacek
2020-05-16 12:30     ` Linus Björnstam
2020-05-16 12:50       ` Jan Synacek
2020-05-16 14:21     ` tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200516110207.GC30977@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=41320@debbugs.gnu.org \
    --cc=jsynacek@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).