W3C home > Mailing lists > Public > www-amaya@w3.org > January to March 2010

Re: Placement of comments

From: Helder Magalh„es <helder.magalhaes@gmail.com>
Date: Mon, 18 Jan 2010 13:05:03 +0000
Message-ID: <2a1ddf8a1001180505t3288ee61v2ed0abd27fe9ebc4@mail.gmail.com>
To: Martin J. DŁrst <duerst@it.aoyama.ac.jp>
Cc: www-amaya@w3.org
Hi Martin,


> <h1>document title</h1>
> <p>bla bla bla</p>
>
> <!-- very big table -->
> <table>
> ....
> </table>
>
> Amaya keeps comments, but it insists on moving them from immediately before
> the next construct to immediately after the previous construct. The above
> example turns into:
>
> <h1>document title</h1>
> <p>bla bla bla</p>
> <!-- very big table -->
>
> <table>
> ....
> </table>

Humm, this really sounds like buggy behavior. I didn't double check
for sure, but it means that Amaya isn't preserving the text nodes as
it should. Although hard to understand at first, in your first example
what you have is something like:

<h1>document title</h1>
#text (line break between "h1" and "p")
<p>bla bla bla</p>
#text (two line breaks between "p" and comment)
<!-- very big table -->
#text (break between comment and table)
<table>

This is counter-intuitive, I know, but what's happening under the hood.


> This looks rather inappropriate when looking at the source again. If there's
> some frequent use of comments after (rather than before) a construct, I'd
> like to know. Otherwise, it'd be really nice if this were fixed, thanks!

I'm guessing that Amaya is having trouble in parsing/representing such
construct. If so, then it's a bug and should, in my opinion, be given
priority given that parsing/serializing issues have strong
implications and can explain a number of issues.


> Regards, † Martin.

Cheers,
 Helder
Received on Monday, 18 January 2010 13:05:55 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:53:42 UTC