def gen_plain_page(title,content=''):
return """
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>@TITLE</title>
</head>
<body>
<h1>@TITLE</h1>
<p>
@CONTENT
</p>
</body>
</html>
""".replace('@TITLE',title).replace('@CONTENT',content)
default_404_text = gen_plain_page('404 - File not found','Sorry, the resource you were looking for could not be found')