471,624 Members | 1,824 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,624 software developers and data experts.

WYSIWYG XML Editor

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
Jul 21 '05 #1
3 1721
> 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).

--
Mihai Nita [Microsoft MVP, Windows - SDK]
------------------------------------------
Replace _year_ with _ to get the real email
Jul 21 '05 #2
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

"Mihai N." wrote:
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).

--
Mihai Nita [Microsoft MVP, Windows - SDK]
------------------------------------------
Replace _year_ with _ to get the real email

Jul 21 '05 #3
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.

Nick wrote:
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


Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by lb | last post: by
reply views Thread by Ellen Quaadgras | last post: by
3 posts views Thread by Mel Smith | last post: by
5 posts views Thread by Arsalan | last post: by
12 posts views Thread by Michael Peters | last post: by
4 posts views Thread by David Lozzi | last post: by
1 post views Thread by .::alex::. | last post: by
5 posts views Thread by DaveC | last post: by
9 posts views Thread by TristaSD | last post: by
27 posts views Thread by prt7u | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.