Dear TEI Community,

I'm looking for a web-based XML editor for a project that will make use
of TEI. The document would live in a server, a user would connect with a
browser to edit the document, the server will serve the XML editor to
the browser (with the relevant data), etc. 

I have searched the mailing list archives. While I found many
discussions about desktop-based editors, I did not find a discussion
thread that was specifically about web-based editors.

What I'm looking for is something which would:

1. Be open source. (Absolutely required.)

2. Be implemented in JavaScript. (I don't believe there is any other
viable option for web-served browser-side application code, unless I
missed something.)

3. Edit XML.

4. Support context-sensitive addition of elements so as allow insertion
of new elements that are allowed in context. This often shows up as
"automatic completion" in editors that edit raw XML.

5. Support validation with a Relax NG schema, and guide editing (see
point 4) with this same schema. (Like nxml-mode does in Emacs.)

6. Support WYSIWYM editing besides raw XML. I know that I'd have to
customize it for my needs but if there is an infrastructure for this
already, it simplifies my work.

The way I've split my requirements may seem random but it is in fact
based on a breakdown of functionality in the editors I've seen out
there. The editor I've found so far which seems to fit my requirements
most closely is CodeMirror:

It meets all first 4 requirements but not 5 or 6. If anyone has
experience with CodeMirror for XML editing they'd like to share, good or
bad, I'd be much obliged. Or if anyone knows of an editor which would
fit the requirements above even better than CodeMirror, I'd appreciate
that too. For the record, I've rejected the editors listed below, for a
variety of reasons. That I've rejected them only means I've decided that
they do not fit *my* requirements, not that they are terrible or serve
no purpose. Xopus, for instance, looks great but is not open source.
eXide looks great for XQuery editing but seems to offer less than
CodeMirror when it comes to XML. If I have misjudged an editor that some
of the list members know would do what I want, please correct me.

Thank you,