/[suikacvs]/www/test/html/entref/copy-xhtml11.xhtml
Suika

Contents of /www/test/html/entref/copy-xhtml11.xhtml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Mon Dec 26 10:27:46 2005 UTC (19 years, 7 months ago) by wakaba
Branch: MAIN
New tests

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>Known HTML Character Entity Reference,
6     with XHTML 1.1 DOCTYPE Declaration</title>
7     </head>
8     <body>
9     <h1>Known 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>&amp;copy;</code> is rendered as</dt><dd>&copy;</dd>
16     <dt><code>&amp;#xA9;</code> is rendered as</dt><dd>&#xA9;</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     <dd>Both references are treated as <code>COPYRIGHT SIGN</code>s.</dd>
31     <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>
32     <dd>The character reference (later) is treated as a
33     <code>COPYRIGHT SIGN</code>.</dd>
34     <dd>A user agent that reads external entities (or that has
35     builtin knowledge on the XHTML 1.1 document type) will treat
36     the entity reference (former) as a <code>COPYRIGHT SIGN</code>.</dd>
37     <dd>A user agent that does not read the external entity in which
38     the entity declaration for the general entity <code>copy</code>
39     (nor have any builtin knowledge on the document type)
40     will render it as a sequence of six characters:
41     <code>&amp;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>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24