The word 'document' invokes too many preconceived notions to be used in this context, I believe. XML stream is more like it. XML stream that changes its structure over time requires dynamic schema with ability to redefine, augment, remove schema fragments. Implementation wise, this is rather simple. Have client dynamically download schema fragment-specific handlers.
Security is no problem since they are restricted to operations on the stream itself.
Java is a perfect fit for this. Dreams are simply potential realities unknown author. A list for W3C XML Developers.