Whitespace appearing in the input document is not appearing in the expected result.
I think the expected result is correct. The whitespace should be stripped from the source document because the DTD defines the relevant elements with an element-only content model.
Marking this as works-for-me. Please reopen if you still think the test is wrong.