| 1 |
wakaba |
1.1 |
<!DOCTYPE html [ |
| 2 |
|
|
<!ENTITY copy "©"> |
| 3 |
|
|
]> |
| 4 |
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 5 |
|
|
<head> |
| 6 |
|
|
<title>Known HTML Character Entity Reference, |
| 7 |
|
|
with Internal Subset</title> |
| 8 |
|
|
</head> |
| 9 |
|
|
<body> |
| 10 |
|
|
<h1>Known HTML Character Entity Reference, with Internal Subset</h1> |
| 11 |
|
|
|
| 12 |
|
|
<p>Note: The internal subset declares the <code>copy</code> |
| 13 |
|
|
general entity.</p> |
| 14 |
|
|
|
| 15 |
|
|
<h2>Test</h2> |
| 16 |
|
|
|
| 17 |
|
|
<dl id="test-list"> |
| 18 |
|
|
<dt><code>&copy;</code> is rendered as</dt><dd>©</dd> |
| 19 |
|
|
<dt><code>&#xA9;</code> is rendered as</dt><dd>©</dd> |
| 20 |
|
|
</dl> |
| 21 |
|
|
|
| 22 |
|
|
<p>The <code>innerHTML</code> of the list above is:</p> |
| 23 |
|
|
<pre id="test-source"></pre> |
| 24 |
|
|
<script type="text/javascript"> |
| 25 |
|
|
document.getElementById ('test-source').appendChild |
| 26 |
|
|
(document.createTextNode (document.getElementById ('test-list').innerHTML)); |
| 27 |
|
|
</script> |
| 28 |
|
|
|
| 29 |
|
|
<h2>Expected Result</h2> |
| 30 |
|
|
|
| 31 |
|
|
<dl> |
| 32 |
|
|
<dt><a href="http://www.w3.org/TR/2002/REC-xhtml1-20020801/#uaconf">Conforming XHTML 1.0 User Agent</a></dt> |
| 33 |
|
|
<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> |
| 34 |
|
|
<dd>Both references are treated as <code>COPYRIGHT SIGN</code>s.</dd> |
| 35 |
|
|
</dl> |
| 36 |
|
|
|
| 37 |
|
|
<h2>Discussion</h2> |
| 38 |
|
|
|
| 39 |
|
|
<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> |
| 40 |
|
|
|
| 41 |
|
|
</body> |
| 42 |
|
|
</html> |