- From: poot <cvsmail@w3.org>
- Date: Tue, 31 Mar 2009 12:40:37 +0900 (JST)
- To: public-html-diffs@w3.org
Discuss overlapping paragraphs. (bug 6507) (whatwg r2930) http://www.w3.org/Bugs/Public/show_bug.cgi?id=6507 3.6 APIs in HTML documents http://people.w3.org/mike/diffs/html5/spec/Overview.1.2095.html#apis-in-html-documents 3.5 Paragraphs http://people.w3.org/mike/diffs/html5/spec/Overview.1.2095.html#paragraphs http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2094&r2=1.2095&f=h http://html5.org/tools/web-apps-tracker?from=2929&to=2930 =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.2094 retrieving revision 1.2095 diff -u -d -r1.2094 -r1.2095 --- Overview.html 31 Mar 2009 01:48:11 -0000 1.2094 +++ Overview.html 31 Mar 2009 03:38:50 -0000 1.2095 @@ -7616,13 +7616,28 @@ what the document looks like without the <code><a href=#the-a-element>a</a></code>, <code><a href=#the-ins-element>ins</a></code> and <code><a href=#the-del-element>del</a></code> elements complicating matters, since those elements, with their hybrid content models, can straddle - paragraph boundaries.<p>Let <var title="">view</var> be a view of the DOM that replaces + paragraph boundaries.<p class=note>Generally, having elements straddle paragraph + boundaries is best avoided. Maintaining such markup can be + difficult.<div class=impl> + + <p>Let <var title="">view</var> be a view of the DOM that replaces all <code><a href=#the-a-element>a</a></code>, <code><a href=#the-ins-element>ins</a></code> and <code><a href=#the-del-element>del</a></code> elements - in the document with their contents. Then, in <var title="">view</var>, for each run of <a href=#phrasing-content-0>phrasing content</a> - uninterrupted by other types of content, in an element that accepts - content other than <a href=#phrasing-content-0>phrasing content</a>, let <var title="">first</var> be the first node of the run, and let <var title="">last</var> be the last node of the run. For each run, a - paragraph exists in the original DOM from immediately before <var title="">first</var> to immediately after <var title="">last</var>. (Paragraphs can thus span across - <code><a href=#the-a-element>a</a></code>, <code><a href=#the-ins-element>ins</a></code> and <code><a href=#the-del-element>del</a></code> elements.)<p>A <a href=#paragraph>paragraph</a> is also formed explicitly by + in the document with their contents. Then, in <var title="">view</var>, for each run of sibling <a href=#phrasing-content-0>phrasing + content</a> nodes uninterrupted by other types of content, in an + element that accepts content other than <a href=#phrasing-content-0>phrasing + content</a>, let <var title="">first</var> be the first node of + the run, and let <var title="">last</var> be the last node of the + run. For each such run that consists of at least one node that is + neither <a href=#embedded-content-2>embedded content</a> nor <a href=#inter-element-whitespace>inter-element + whitespace</a>, a paragraph exists in the original DOM from + immediately before <var title="">first</var> to immediately after + <var title="">last</var>. (Paragraphs can thus span across + <code><a href=#the-a-element>a</a></code>, <code><a href=#the-ins-element>ins</a></code> and <code><a href=#the-del-element>del</a></code> elements.)</p> + + <p>Conformance checkers may warn authors of cases where they have + paragraphs that overlap each other.</p> + + </div><p>A <a href=#paragraph>paragraph</a> is also formed explicitly by <code><a href=#the-p-element>p</a></code> elements.<p class=note>The <code><a href=#the-p-element>p</a></code> element can be used to wrap individual paragraphs when there would otherwise not be any content other than phrasing content to separate the paragraphs from each @@ -7631,7 +7646,7 @@ <p>In the following example, there are two paragraphs in a section. There is also a header, which contains phrasing content that is not a paragraph. Note how the comments and - <span>intra-element whitespace</span> do not form paragraphs.</p> + <a href=#inter-element-whitespace>inter-element whitespace</a> do not form paragraphs.</p> <pre><section> <h1>Example of paragraphs</h1> @@ -7682,9 +7697,56 @@ Falcon's innermost secrets.</p> </aside></pre> - </div><p class=note>Generally, having elements straddle paragraph - boundaries is best avoided. Maintaining such markup can be - difficult.<h3 id=apis-in-html-documents><span class=secno>3.6 </span>APIs in HTML documents</h3><p>For <a href=#html-documents>HTML documents</a>, and for <a href=#html-elements>HTML + </div><div class=example> + + <!-- I don't know if there's a better way to deal with this, but if + there is, let me know... --> + + <p>It is possible for paragraphs to overlap when using certain + elements that define fallback content. For example, in the + following section:</p> + + <pre><section> + <h1>My Cats</h1> + You can play with my cat simulator. + <object data="cats.sim"> + To see the cat simulator, use one of the following links: + <ul> + <li><a href="cats.sim">Download simulator file</a> + <li><a href="http://sims.example.com/watch?v=LYds5xY4INU">Use online simulator</a> + </ul> + Alternatively, upgrade to the Mellblom Browser. + </object> + I'm quite proud of it. +</section></pre> + + <p>There are five paragraphs:</p> + + <ol class=brief><li>The paragraph that says "You can play with my cat + simulator. <i title="">object</i> I'm quite proud of it.", where + <i title="">object</i> is the <code><a href=#the-object-element>object</a></code> element.</li> + + <li>The paragraph that says "To see the cat simulator, use one of + the following links:".</li> + + <li>The paragraph that says "Download simulator file".</li> + + <li>The paragraph that says "Use online simulator".</li> + + <li>The paragraph that says "Alternatively, upgrade to the Mellblom Browser.".</li> + + </ol><p>The first paragraph is overlapped by the other four. A user + agent that supports the "cats.sim" resource will only show the + first one, but a user agent that shows the fallback will + confusingly show the the first sentence of the first paragraph as + if it was in the same paragraph as the second one, and will show + the last paragraph as if it was at the start of the second sentence + of the the first paragraph.</p> + + <p>To avoid this confusion, explicit <code><a href=#the-p-element>p</a></code> elements can be + used.</p> + + </div><h3 id=apis-in-html-documents><span class=secno>3.6 </span>APIs in HTML documents</h3><p>For <a href=#html-documents>HTML documents</a>, and for <a href=#html-elements>HTML elements</a> in <a href=#html-documents>HTML documents</a>, certain APIs defined in DOM3 Core become case-insensitive or case-changing, as sometimes defined in DOM3 Core, and as summarized <span class=impl>or
Received on Tuesday, 31 March 2009 03:41:14 UTC