WYSIWYG XML Editor

S

sushant.bhatia

Hi Folks.
I would like to find a control or code for use with an app I am
writing. We need to load a XML document. This XML document has a DTD
and we want to allow a user to edit the plain text in the editor. Then
the changes should be saved back to the xml file.

The idea is very much akin to the HTML Editors which use WYSIWIG.
However, we need to be able to extend the functionality of these
editors to support functionality that we will be building like
highlights. I've seen a few controls that can do this but they are
either for HTML or for java. We need it for XML and for C#/.Net.

Thanks.
Sushant Bhatia
 
J

Jon Skeet [C# MVP]

I would like to find a control or code for use with an app I am
writing. We need to load a XML document. This XML document has a DTD
and we want to allow a user to edit the plain text in the editor. Then
the changes should be saved back to the xml file.

The idea is very much akin to the HTML Editors which use WYSIWIG.
However, we need to be able to extend the functionality of these
editors to support functionality that we will be building like
highlights. I've seen a few controls that can do this but they are
either for HTML or for java. We need it for XML and for C#/.Net.

HTML is a presentation-based language, so WYSIWYG makes sense there (to
some extent, anyway). It doesn't make sense in XML, because there's
often no presentation in the first place. What does an application
configuration "look" like beyond it just being the XML, for instance?
 
N

Nick Malik [Microsoft]

altova makes a commercial product that allows a user to edit data defined by
a DTD or Schema.

Microsoft's entry, Infopath, is part of Office 2003.

(Personally, I like Infopath better).

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
S

sushant.bhatia

Hi Nick,
Thanks for the feedback. I looked at the Demo for InfoPath and it
seems like its used for Forms. We need the editor to be much like the
demo provided here :-
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlweb/html/xmldocedit.asp

The idea being, that a user can for instance, scan a document, get the
generated text from the OCR (which will be an XML file) and edit that
using an editor.

Therefore, there might be a CSS style sheet etc for that. From my
knowledge MSXML is used for applications like that.

However, I am told that MSXML is quite a difficult tool to master so
thats why we were hunting for components.

As far as Altova goes, they have XMLSpy which is already a GUI based
product. We need a control or the code for something like that.

Jon - I hope this answers your question as to why we are using XML. The
link i put in there is an example of that.

Thanks Nick and Jon for your replies. Hope to hear more for you two.
Sushant Bhatia
 
N

Nick Malik [Microsoft]

Hello Sushant,

I download and ran that little app
Let me understand your requirement a little better:

a) the documents that they are scanning, and running through OCR, are
printed XML documents? Or are you taking freetext output from OCR and
running it through a program to create XML?
b) The user who is editing the text is non-technical and we don't want them
to (1) deal with xml tags, and (2) screw up the XML structure, right?
c) The user should be able to see the results of their editing in a WYSIWYG
environment but they cannot change the structure or layout (unlike the demo,
which runs in IE and doesn't enforce either structure or layout). Is that
correct?
d) When the user is done, the user should have the ability to "submit"
somehow, and the item saved is a valid XML file.
e) You mention a DTD. Is a Schema available? Would it be OK if you created
a schema from the DTD?
f) The person editing the text can be training on simple editing
capabilities, but you don't want them changing the formatting, right?
g) The goal of the WYSIWYG is to allow the user to "see" how their text
will look in the layout so that they can change it as needed. Correct?

Am I on the same page?


--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
S

sushant.bhatia

Hi Nick.
To answer your questions:

a) The text that is scanned in can be anything, letters, books,
magazines. The result from the OCR software is an XML file.

b) Correct. The user is non technical.

c) I'm not sure what you mean by this. They should be able to change
the layout. The structure is defined in the DTD.

d) Correct. The user saves the document and it saves it as a XML file
again.

e) I guess its ok to create a schema from the DTD.

f) By formatting if you mean indentation etc then yes, they should be
able to change it.

g) Yes they should be able to see the text. In fact they should not
even know that they are editing "xml" ideally. They should think they
are using something like Word.

The idea is to have an "editor" like word that uses XML files instead
of Doc files.

Hope this helps. Thanks again Nick.
Sushant

Hello Sushant,

I download and ran that little app
Let me understand your requirement a little better:

a) the documents that they are scanning, and running through OCR, are
 
N

Nick Malik [Microsoft]

Hello Shushant,

Interesting that the OCR software produces XML output. I hadn't heard that
one before. Can you post a sample of the resulting text after OCR? I'm
very curious about what tags the OCR software is putting in to freetext. I
assume it is a set of formatting markup tags, not data tags.

Is the DTD defined by the maker of the OCR software? Or did you define
something specific for your needs?

You may be best off looking at Altova again, not at XML Spy, but at
Stylevision. I don't know of any controls that help with editing text like
this. You may want to consider taking the XML text, running it through a
stylesheet to get HTML text, and simply allowing the user to edit in HTML
using some of the existing controls available on the market.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top