| 1 |
wakaba |
1.1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
| 2 |
|
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 3 |
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 4 |
|
|
<head> |
| 5 |
|
|
<title>Unknown HTML Character Entity Reference, |
| 6 |
|
|
with XHTML 1.1 DOCTYPE Declaration</title> |
| 7 |
|
|
</head> |
| 8 |
|
|
<body> |
| 9 |
|
|
<h1>Unknown HTML Character Entity Reference, with XHTML 1.1 |
| 10 |
|
|
<code>DOCTYPE</code> Declaration</h1> |
| 11 |
|
|
|
| 12 |
|
|
<h2>Test</h2> |
| 13 |
|
|
|
| 14 |
|
|
<dl id="test-list"> |
| 15 |
|
|
<dt><code>&unknown;</code> is rendered as</dt><dd>&unknown;</dd> |
| 16 |
|
|
<dt><code>&#xA9;</code> is rendered as</dt><dd>©</dd> |
| 17 |
|
|
</dl> |
| 18 |
|
|
|
| 19 |
|
|
<p>The <code>innerHTML</code> of the list above is:</p> |
| 20 |
|
|
<pre id="test-source"></pre> |
| 21 |
|
|
<script type="text/javascript"> |
| 22 |
|
|
document.getElementById ('test-source').appendChild |
| 23 |
|
|
(document.createTextNode (document.getElementById ('test-list').innerHTML)); |
| 24 |
|
|
</script> |
| 25 |
|
|
|
| 26 |
|
|
<h2>Expected Result</h2> |
| 27 |
|
|
|
| 28 |
|
|
<dl> |
| 29 |
|
|
<dt><a href="http://www.w3.org/TR/2002/REC-xhtml1-20020801/#uaconf">Conforming XHTML 1.0 User Agent</a></dt> |
| 30 |
|
|
<dt><a href="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/conformance.html#s_conform_user_agent">Conforming XHTML Family User Agent</a></dt> |
| 31 |
|
|
<dd>The character reference (later) is treated as a |
| 32 |
|
|
<code>COPYRIGHT SIGN</code>.</dd> |
| 33 |
|
|
<dd>A validating user agent will report a validity error |
| 34 |
|
|
since the <code>unknown</code> entity is not declared.</dd> |
| 35 |
|
|
<dd>A non-validating user agent will render the general |
| 36 |
|
|
entity reference (former) as a sequence of nine characters: |
| 37 |
|
|
<code>&unknown;</code>.</dd> |
| 38 |
|
|
</dl> |
| 39 |
|
|
|
| 40 |
|
|
<h2>Discussion</h2> |
| 41 |
|
|
|
| 42 |
|
|
<p>See a <a href="http://suika.fam.cx/gate/2005/sw/">SuikaWiki</a> article on <a href="http://suika.fam.cx/gate/2005/sw/XHTML/%E5%AE%9F%E4%BD%93%E5%8F%82%E7%85%A7">entity references in XHTML documents</a>.</p> |
| 43 |
|
|
|
| 44 |
|
|
</body> |
| 45 |
|
|
</html> |