1 |
wakaba |
1.1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
2 |
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
3 |
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
4 |
|
|
<head> |
5 |
|
|
<title>Known HTML Character Entity Reference, |
6 |
|
|
with XHTML 1.0 Strict DOCTYPE Declaration</title> |
7 |
|
|
</head> |
8 |
|
|
<body> |
9 |
|
|
<h1>Known HTML Character Entity Reference, with XHTML 1.0 Strict |
10 |
|
|
<code>DOCTYPE</code> Declaration</h1> |
11 |
|
|
|
12 |
|
|
|
13 |
|
|
<h2>Test</h2> |
14 |
|
|
|
15 |
|
|
<dl id="test-list"> |
16 |
|
|
<dt><code>&copy;</code> is rendered as</dt><dd>©</dd> |
17 |
|
|
<dt><code>&#xA9;</code> is rendered as</dt><dd>©</dd> |
18 |
|
|
</dl> |
19 |
|
|
|
20 |
|
|
<p>The <code>innerHTML</code> of the list above is:</p> |
21 |
|
|
<pre id="test-source"></pre> |
22 |
|
|
<script type="text/javascript"> |
23 |
|
|
document.getElementById ('test-source').appendChild |
24 |
|
|
(document.createTextNode (document.getElementById ('test-list').innerHTML)); |
25 |
|
|
</script> |
26 |
|
|
|
27 |
|
|
<h2>Expected Result</h2> |
28 |
|
|
|
29 |
|
|
<dl> |
30 |
|
|
<dt><a href="http://www.w3.org/TR/2002/REC-xhtml1-20020801/#uaconf">Conforming XHTML 1.0 User Agent</a></dt> |
31 |
|
|
<dd>Both references are treated as <code>COPYRIGHT SIGN</code>s.</dd> |
32 |
|
|
<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> |
33 |
|
|
<dd>The character reference (later) is treated as a |
34 |
|
|
<code>COPYRIGHT SIGN</code>.</dd> |
35 |
|
|
<dd>A user agent that reads external entities (or that has |
36 |
|
|
builtin knowledge on the XHTML 1.0 document type) 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 |
|
|
(nor have any builtin knowledge on the document type) |
41 |
|
|
will render it as a sequence of six characters: |
42 |
|
|
<code>&copy;</code>.</dd> |
43 |
|
|
</dl> |
44 |
|
|
|
45 |
|
|
<h2>Discussion</h2> |
46 |
|
|
|
47 |
|
|
<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> |
48 |
|
|
|
49 |
|
|
</body> |
50 |
|
|
</html> |