if I were writing an XML editor
There is a number of XML-editors, but there are no user-friendly ones (except FraemMaker). A standard XML editor is a tool for programmers, to play with XML. But technical writers need an user-centric XML editor, to play with a document, not with XML.
If I were writing an user-friendly XML editor, my specification would cover the following.
WYSIWYG, real or pseudo.
CALS tables support.
Entities support: if an XML document contains entities, the editor must retain them. More, the editor should easily fold/unfold/edit nested entities on demand:
* an entity can appear as some visual symbol
* an entity content can be diplayed in full
* an user can edit an entity separately
Implicit transformations: for editing and formatting purposes, it could be useful to modify the document's structure while loading XML.
Advanced, hidden from an usual user: support of concurrent markup (multiple overlapping XML trees in one document).
Only basic DTD/Schema support, no need for an XSLT debugger and other programmer-centric tools.
Structure islands: allow to write as in Word, without any structure. Allow using XML only in parts of the document.