W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2007

[whatwg] parsing: bogus comments - PIs

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 14 Jun 2007 01:37:09 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.0706140135190.30490@dhalsim.dreamhost.com>
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

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