add a well-formed document for stream