| 1 |
wakaba |
1.1 |
<!DOCTYPE html SYSTEM "copy-external-subset-dtd.dtd"> |
| 2 |
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 3 |
|
|
<head> |
| 4 |
|
|
<title>Known HTML Character Entity Reference, |
| 5 |
|
|
with Custom External Subset</title> |
| 6 |
|
|
</head> |
| 7 |
|
|
<body> |
| 8 |
|
|
<h1>Known HTML Character Entity Reference, with Custom External Subset</h1> |
| 9 |
|
|
|
| 10 |
|
|
<p>Note: An external subset entity referenced from this document |
| 11 |
|
|
by <code>SYSTEM</code> identifier declares the <code>copy</code> |
| 12 |
|
|
general entity.</p> |
| 13 |
|
|
|
| 14 |
|
|
<h2>Test</h2> |
| 15 |
|
|
|
| 16 |
|
|
<dl id="test-list"> |
| 17 |
|
|
<dt><code>&copy;</code> is rendered as</dt><dd>©</dd> |
| 18 |
|
|
<dt><code>&#xA9;</code> is rendered as</dt><dd>©</dd> |
| 19 |
|
|
</dl> |
| 20 |
|
|
|
| 21 |
|
|
<p>The <code>innerHTML</code> of the list above is:</p> |
| 22 |
|
|
<pre id="test-source"></pre> |
| 23 |
|
|
<script type="text/javascript"> |
| 24 |
|
|
document.getElementById ('test-source').appendChild |
| 25 |
|
|
(document.createTextNode (document.getElementById ('test-list').innerHTML)); |
| 26 |
|
|
</script> |
| 27 |
|
|
|
| 28 |
|
|
<h2>Expected Result</h2> |
| 29 |
|
|
|
| 30 |
|
|
<dl> |
| 31 |
|
|
<dt><a href="http://www.w3.org/TR/2002/REC-xhtml1-20020801/#uaconf">Conforming XHTML 1.0 User Agent</a></dt> |
| 32 |
|
|
<dd>Both references are treated as <code>COPYRIGHT SIGN</code>s.</dd> |
| 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>The character reference (later) is treated as a |
| 35 |
|
|
<code>COPYRIGHT SIGN</code>.</dd> |
| 36 |
|
|
<dd>A user agent that reads external entities will treat |
| 37 |
|
|
the entity reference (former) as a <code>COPYRIGHT SIGN</code>.</dd> |
| 38 |
|
|
<dd>A user agent that does not read the external entity in which |
| 39 |
|
|
the entity declaration for the general entity <code>copy</code> |
| 40 |
|
|
will render it as a sequence of six characters: |
| 41 |
|
|
<code>&copy;</code>.</dd> |
| 42 |
|
|
</dl> |
| 43 |
|
|
|
| 44 |
|
|
<h2>Discussion</h2> |
| 45 |
|
|
|
| 46 |
|
|
<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> |
| 47 |
|
|
|
| 48 |
|
|
</body> |
| 49 |
|
|
</html> |