[whatwg] parsing: bogus comments - PIs

On Wed, 26 Jul 2006, Shadow2531 wrote:
> > >
> > > So, <?xml-stylesheet type="text/css" href=""?> is a bogus comment.
> > >
> > > I *was* 100% sure that the PI should be parsed into:
> > >
> > > <!--?xml-stylesheet type="text/css" href=""?-->
> > 
> > Correct.
> 
> Thanks Ian. Can you comment on innerHTML for this situation?
> 
> If <?xml-stylesheet type="text/css" href=""?> is parsed into
> <!--?xml-stylesheet type="text/css" href=""?--> , what should
> innerHTML show?

Assuming you mean the .innerHTML of a parent element, it would show the 
comment as you've written it above. See the innerHTML definition in the 
spec:

   http://www.whatwg.org/specs/web-apps/current-work/#innerhtml0

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

Received on Wednesday, 13 June 2007 18:37:09 UTC