Skip to content

Commit

Permalink
[e] (0) Add an example for CDATA sections.
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8607

git-svn-id: http://svn.whatwg.org/webapps@4536 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 7, 2010
1 parent 69f1e82 commit 61b9ae9
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 1 deletion.
17 changes: 17 additions & 0 deletions complete.html
Expand Up @@ -69196,6 +69196,23 @@ <h4 id=cdata-sections><span class=secno>11.1.5 </span>CDATA sections</h4>
SQUARE BRACKET, U+005D RIGHT SQUARE BRACKET, U+003E GREATER-THAN
SIGN (<code title="">]]&gt;</code>).</p>

<div class=example>

<p>CDATA sections can only be used in foreign content (MathML or
SVG). In this example, a CDATA section is used to escape the
contents of an <code>ms</code> element:</p>

<pre>&lt;p&gt;You can add a string to a number, but this stringifies the number:&lt;/p&gt;
&lt;math&gt;
&lt;ms&gt;&lt;![CDATA[x&lt;y]]&gt;&lt;/ms&gt;
&lt;mo&gt;+&lt;/mo&gt;
&lt;mn&gt;3&lt;/mn&gt;
&lt;mo&gt;=&lt;/mo&gt;
&lt;ms&gt;&lt;![CDATA[x&lt;y3]]&gt;&lt;/ms&gt;
&lt;/math&gt;</pre>

</div>


<h4 id=comments><span class=secno>11.1.6 </span>Comments</h4>

Expand Down
17 changes: 17 additions & 0 deletions index
Expand Up @@ -60823,6 +60823,23 @@ interface <dfn id=messageport>MessagePort</dfn> {
SQUARE BRACKET, U+005D RIGHT SQUARE BRACKET, U+003E GREATER-THAN
SIGN (<code title="">]]&gt;</code>).</p>

<div class=example>

<p>CDATA sections can only be used in foreign content (MathML or
SVG). In this example, a CDATA section is used to escape the
contents of an <code>ms</code> element:</p>

<pre>&lt;p&gt;You can add a string to a number, but this stringifies the number:&lt;/p&gt;
&lt;math&gt;
&lt;ms&gt;&lt;![CDATA[x&lt;y]]&gt;&lt;/ms&gt;
&lt;mo&gt;+&lt;/mo&gt;
&lt;mn&gt;3&lt;/mn&gt;
&lt;mo&gt;=&lt;/mo&gt;
&lt;ms&gt;&lt;![CDATA[x&lt;y3]]&gt;&lt;/ms&gt;
&lt;/math&gt;</pre>

</div>


<h4 id=comments><span class=secno>9.1.6 </span>Comments</h4>

Expand Down
17 changes: 17 additions & 0 deletions source
Expand Up @@ -78901,6 +78901,23 @@ interface <dfn>MessagePort</dfn> {
SQUARE BRACKET, U+005D RIGHT SQUARE BRACKET, U+003E GREATER-THAN
SIGN (<code title="">]]></code>).</p>

<div class="example">

<p>CDATA sections can only be used in foreign content (MathML or
SVG). In this example, a CDATA section is used to escape the
contents of an <code>ms</code> element:</p>

<pre>&lt;p>You can add a string to a number, but this stringifies the number:&lt;/p>
&lt;math>
&lt;ms>&lt;![CDATA[x&lt;y]]>&lt;/ms>
&lt;mo>+&lt;/mo>
&lt;mn>3&lt;/mn>
&lt;mo>=&lt;/mo>
&lt;ms>&lt;![CDATA[x&lt;y3]]>&lt;/ms>
&lt;/math></pre>

</div>


<h4>Comments</h4>

Expand Down
2 changes: 1 addition & 1 deletion vocabs-index
Expand Up @@ -47,7 +47,7 @@

<header class="head"><p><a class="logo" href="http://www.whatwg.org/" rel="home"><img alt="WHATWG" src="/images/logo"></a></p>
<hgroup><h1>Microdata Vocabularies: vCard, vEvent, and works</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 6 January 2010</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 7 January 2010</h2>
</hgroup><p>You can take part in this work. <a href="http://www.whatwg.org/mailing-list">Join the working group's discussion list.</a></p>
<dl><dt>This specification:</dt>
<dd><a href="http://www.whatwg.org/specs/web-apps/current-work/">http://www.whatwg.org/specs/web-apps/current-work/</a></dd>
Expand Down

0 comments on commit 61b9ae9

Please sign in to comment.