[whatwg] parsing: bogus comments - PIs

Ian Hickson ian at hixie.ch
Wed Jun 13 18:37:09 PDT 2007


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.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list