A real XHTML document should come out more or less the same as it went in.
(self)
| 124 | self.assertDoctypeHandled('xsl:stylesheet PUBLIC "htmlent.dtd"') |
| 125 | |
| 126 | def test_real_xhtml_document(self): |
| 127 | """A real XHTML document should come out more or less the same as it went in.""" |
| 128 | markup = b"""<?xml version="1.0" encoding="utf-8"?> |
| 129 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> |
| 130 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 131 | <head><title>Hello.</title></head> |
| 132 | <body>Goodbye.</body> |
| 133 | </html>""" |
| 134 | soup = self.soup(markup) |
| 135 | self.assertEqual( |
| 136 | soup.encode("utf-8").replace(b"\n", b""), |
| 137 | markup.replace(b"\n", b"")) |
| 138 | |
| 139 | def test_processing_instruction(self): |
| 140 | markup = b"""<?PITarget PIContent?>""" |