WYSIWYG XML Editor

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

This may be a dumb question, but here goes. I need to create an XML WYSIWYG
editor. I know there are some out there, but this is going to have some
custom stuff that pertains only to some of our other software. What would be
the best way to begin this? What control should I use? I have XML and .NET
experience, but I'm at a loss....

Thanks for any help, I really appreciate it.

Thanks,
Nick
 
This may be a dumb question, but here goes. I need to create an XML WYSIWYG
editor. I know there are some out there, but this is going to have some
custom stuff that pertains only to some of our other software.

XML, unlike HTML, was created to encode structure, not format.
So there is no such thing as "WYSIWYG."

Tags have no significance without a style sheet.

And in other cases the tags denote sounds (see MusicXML):
http://www.recordare.com/xml/mutxml.html
3D scenes (VRML), math formulas (MathML2)
or some function calls (SOAP).
 
Thanks for the reply Mihai. I understand the differences between XML and HTML
and that I'll have to use XSL. There are some products out there that do what
I want (www.xopus.com and www.xeditnet.com to a lesser extent), but we want
to develop one of our own.

Thanks again.

Nick
 
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.
 
Back
Top