How to check for the XML document constraint

During a recent newsgroup exchange, we discussed how to constrain an untyped XML data type to be a document. Kent recapped my statement and Darshan provides an attempt at writing the constraint. Unfortunately, it is not quite correct.

Continue to see what he wrote and what are correct versions...