Hi Nick,
I am the author of XEditNet. Am interested to hear what you thought of
it as it's currently in Alpha and I know there are lots of missing
features - what did you miss in it the most, and what issues did you
find? I'm working on the plugin API for it so ultimately it will be
customisable with .NET add-ons. What would you need in this area to fit
it to your scenario?
Writing a WYSIWYG editor, especially for XML is not trivial as I'm sure
you've come to realise. There are some nice architectural featurs in
the .NET XML APIs which help with the basic groundwork though. I'd be
glad to discuss some of these offline... use the contact link at
xeditnet.com.
At the very beginning I looked at the Mozilla codebase for inspiration.
It's C++ though and pretty involved so was only a very cursory look to
get some ideas.
After most of my work was done I found Vex, a Java open source project
(vex.sourceforge.net). Looking at their source they use some of the
same basic ideas but they still have some way to go with some of the
more complex aspects of layout and line breaking. Not a bad place to
start though if you want to see an approach without too much clutter.
Most people seem to go with an approach that involves three basic types
of object: block, line and line item. Blocks represent things like
paragraphs, which in an XML document can be nested (eg. nested divs
translate to nested blocks). A line item might be a tag or a run of
text.
The challenges are the simple (heh) typograph stuff of line breaking
and caret management, and deciding how to efficiently reflect changes
on the underlying document in the view.
If you really need on the fly XSLT transformation rather than a
CSS-like approach then that adds another layer of complexity and I'm
not sure how you'd do that using the .NET XSL functionality.
Regards, Alfie.