W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2006

[whatwg] parsing: bogus comments - PIs

From: Shadow2531 <shadow2531@gmail.com>
Date: Mon, 17 Jul 2006 13:35:09 -0400
Message-ID: <6b9c91b20607171035nc60dc7fkd6dffc7c6427b069@mail.gmail.com>
<? is a parse error and causes a switch to the bogus comment state.

So, <?xml-stylesheet type="text/css" href=""?> is a bogus comment.

"Emit a comment token whose data is the concatenation of all the
characters from the character that caused the state machine to switch
into the bogus comment state, up to the last consumed character before
the U+003E character..."

I *was* 100% sure that the PI should be parsed into:

<!--?xml-stylesheet type="text/css" href=""?-->

However, after rereading that section a few more times, I'm not 100%
sure whether the 2 ? are included in the concatenation or not?

I know it says from ? up to ?, but I might be interpreting 'from' and
'up to'  incorrectly.

Can someone clarify?

Received on Monday, 17 July 2006 10:35:09 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:47 UTC