<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE funny [ <!ENTITY pound "&#163;"> ] >
<?xml-stylesheet type="text/xsl" href="page.xml"?>
<page name="characters">
	<title>
		Owen Rees: Experiment with characters outside Basic Latin
	</title>
	<h2>The experiment.</h2>
	<p>
		Characters such as 'pound sign' are outside the Basic Latin set
		that is common to UTF-8 and ISO-8859-1 so this page is to test
		what happens if you try to represent them in various ways.
	</p>
	<p>
		First, a UTF-8 character in the source XML - £. The
		<a href="characters.html">HTML version</a>
		of this page will have been run through XSLT with output to
		HTML/ISO-8859-1 so that character should have been converted
		before upload - but is it the ISO-8859-1 character code, is it a
		character reference? No, it seems to have been converted to an
		entity reference! In the
		<a href="characters.xml">XML version</a>
		it should still be UTF-8 so does it get through safely in the
		XML version of the page?
	</p>
	<p>
		Second, a character reference (&amp;#163;) in the source XML -
		&#163;. In the HTML version the reference should have been
		handled by the XSLT before upload so the result should be as
		above. In the XML version, the character reference should be
		untouched and so handled by the browser's XML parser.
	</p>
	<p>
		Attempting to use the entity reference &amp;pound; should fail
		on both routes -
		&pound;
		- except that I put an entity declaration in the file. My local
		XSLT processor would otherwise complain when I try to generate
		HTML and the browser's XML parser should complain for the
		version served as XML (Firefox did when I tried it).
	</p>
</page>
