- From: <bugzilla@jessica.w3.org>
- Date: Wed, 26 Mar 2014 21:44:32 +0000
- To: public-html-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24451 Eliot Graff <eliotgra@microsoft.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED --- Comment #12 from Eliot Graff <eliotgra@microsoft.com> --- I believe that I understand both of your positions here, so I have made the following changes to section 4.6.2.2.1: **************************************** General rules: • The CDATA section is subject to HTML’s restrictions on <script> and <style>. • There can be only one CDATA section per raw text element. • A CDATA section must appear at the start of its containing element, and hence be the first child of that element. ◦ Before the CDATA section there can only be content that creates one node - preferably only one line of code - which may consist of whitespace, an XML comment, or a construct of the scripting/styling language (usually a comment of the scripting/styling language). ◦ After the CDATA section there can only be content that creates one node - preferably only one line of code - which may consist of whitespace, an XML comment, or a construct of the scripting/styling language (usually a comment of the scripting/styling language). Note The statement that a "CDATA section must appear at the start of its containing element, and hence be the first child of that element," is due to how parsers may create DOM nodes based on characters and whitespace. The following script element, because it contains no whitespace outside the CDATA node, has one node, whether parsed as HTML or as XML: <script><![CDATA[foo]]>/<script> Because an author may need to comment out the CDATA "start tag" and "end tag," polyglot markup allows for one node before and after the CDATA section. The following example has three nodes: one text node before the CDATA section, one for the CDATA section, itself, and one after the CDATA section: Fig. 5 CDATA section that is commented out, resulting in a total of three DOM nodes. Example 12 <script>/*<![CDATA[*/ foo /*]]>*/</script> Thus, for polyglot markup, a CDATA section must appear at the start of its containing element, and hence be the first child of that element. **************************************** I'll resolve this as fixed, but please let me know if this text needs to be modified in any way. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Wednesday, 26 March 2014 21:44:33 UTC