Tweaked the XSLT as suggested in the previous post, and the Sonnet XHTML output documents now have no validation errors. That's removed over 2000 errors from the 1609 :-). The output is still a bit weird -- margins seem to keep incrementing down through the document -- but it'll be easier to track that down and figure it out now.