- From: Eliot Graff via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 01 Mar 2011 23:20:04 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/html-xhtml-author-guide In directory hutz:/tmp/cvs-serv26630 Modified Files: html-xhtml-authoring-guide.html Log Message: Added sentence prohibiting newlines in attributes & note explaining whitespace differences in attributes; changed Example Document so that SVG sample has no newlines. All per bug 10152. Index: html-xhtml-authoring-guide.html =================================================================== RCS file: /sources/public/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- html-xhtml-authoring-guide.html 14 Feb 2011 21:18:11 -0000 1.57 +++ html-xhtml-authoring-guide.html 1 Mar 2011 23:20:02 -0000 1.58 @@ -14,7 +14,7 @@ <a href="http://www.w3.org/"><img height="48" width="72" alt="W3C" src="http://www.w3.org/Icons/w3c_home"/></a> </p> <h1 class="title" id="title">Polyglot Markup: HTML-Compatible XHTML Documents</h1> - <h2 id="w3c-editor-s-draft-05-january-2011">W3C Editor's Draft 14 February 2011</h2> + <h2 id="w3c-editor-s-draft-05-january-2011">W3C Editor's Draft 1 March 2011</h2> <dl> <dt>This version:</dt> <dd><a href="http://dev.w3.org/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html">http://dev.w3.org/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html</a></dd> @@ -668,6 +668,13 @@ <div id="attributes" class="section"> <!--OddPage--><h2><span class="secno">7. </span>Attributes</h2> <p> + <a class="internalDFN" href="#dfn-polyglot-markup" title="polyglot markup">Polyglot markup</a> surrounds all attribute values with quotation marks. + <a class="internalDFN" href="#dfn-polyglot-markup" title="polyglot markup">Polyglot markup</a> surrounds attribute values by either single quotation marks or by double quotation marks. +</p> +<p> + <a class="internalDFN" href="#dfn-polyglot-markup" title="polyglot markup">Polyglot markup</a> does not use newline characters within an attribute. +</p> +<p> Within an attribute's value, <a class="internalDFN" href="#dfn-polyglot-markup">polyglot markup</a> represents tabs, line feeds, and carriage returns as numeric character references rather than by using literal characters. For example, within an attribute's value, <a class="internalDFN" href="#dfn-polyglot-markup">polyglot markup</a> uses <code>&#x9;</code> for a tab @@ -676,11 +683,17 @@ The following example uses numeric character references (escaped characters) for the line feed and tab within a <code>srcdoc</code> attribute. </p> <pre class="example"><iframe srcdoc="<p>Hello &#x0A; &#x09; world!</p>" src="demo_iframe_srcdoc.htm"></iframe></pre> - -<p> - <a class="internalDFN" href="#dfn-polyglot-markup" title="polyglot markup">Polyglot markup</a> surrounds all attribute values with quotation marks. - <a class="internalDFN" href="#dfn-polyglot-markup" title="polyglot markup">Polyglot markup</a> surrounds attribute values by either single quotation marks or by double quotation marks. +<p class="note"> + Because of attribute-value normalization in XML [<cite><a href="#bib-XML10" rel="biblioentry" class="bibref">XML10</a></cite>], <a class="internalDFN" href="#dfn-polyglot-markup">polyglot markup</a> + does not use newline characters within an attribute. + Practically speaking, for source code with newlines within attributes, +DOMs generated via XML and HTML will be different; + however, whitespace differences have no behavioral impact on the page +unless explicitly examined by JavaScript, rendering the differences of +small consequence. + Note that newlines are overtly not allowed in the <code>title</code> attribute or in any attribute containing a URI. </p> + <p> See also <a href="#attribute-values">Attribute Values</a>. </p> @@ -891,20 +904,8 @@ <ellipse cx="50%" cy="50%" rx="50%" ry="42%" style="fill:url(#myGradient)"/> <rect x="0" y="0" width="100" height="100" style="fill: yellow; stroke: black;"/> <a xlink:href="http://www.w3schools.com/svg/tryit.asp?filename=path2&type=svg"> - <path transform="translate(60, -175)" d="M153 334 - C153 334 151 334 151 334 - C151 339 153 344 156 344 - C164 344 171 339 171 334 - C171 322 164 314 156 314 - C142 314 131 322 131 334 - C131 350 142 364 156 364 - C175 364 191 350 191 334 - C191 311 175 294 156 294 - C131 294 111 311 111 334 - C111 361 131 384 156 384 - C186 384 211 361 211 334 - C211 300 186 274 156 274" - style="fill:white;stroke:red;stroke-width:2"/> + <!-- Note that the following attribute contains no newlines. --> + <path transform="translate(60, -175)" d="M153 334 C153 334 151 334 151 334 C151 339 153 344 156 344 C164 344 171 339 171 334 C171 322 164 314 156 314 C142 314 131 322 131 334 C131 350 142 364 156 364 C175 364 191 350 191 334 C191 311 175 294 156 294 C131 294 111 311 111 334 C111 361 131 384 156 384 C186 384 211 361 211 334 C211 300 186 274 156 274" style="fill:white;stroke:red;stroke-width:2"/> </a> </g> </svg>
Received on Tuesday, 1 March 2011 23:20:06 UTC