[whatwg] parsing: bogus comments - PIs

On Mon, 17 Jul 2006, Shadow2531 wrote:
>
> <? is a parse error and causes a switch to the bogus comment state.
> 
> So, <?xml-stylesheet type="text/css" href=""?> is a bogus comment.
> <http://whatwg.org/specs/web-apps/current-work/#bogus>
> 
> "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=""?-->

Correct.


> 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?

I've tried to clarify the spec. Let me know if it's still ambiguous.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 18 July 2006 16:45:31 UTC