ASP.NET WYSIWYG Xml Editor

This FreeTextBox.NET thing got me thinking about the whole XML based editor idea again and how frustrating it was to get Xopus running on top of .NET. So, I got to thinking, how would you go about making your own .NET based XML editor? Well, it needs XML, XSD, XSL support and the Framework covers that. The question is, how do you insert editable areas into the page?  Take this simple example:

<someHtmlTags>

<xsl:value-of select="someXPathExpression"/>

</someHtmlTags>

Which produces:

<someHtmlTags>

someEvaluatedExpression

</someHtmlTags>

I'm thinking something like this would do the trick:

<someHtmlTags>

<xsl:value-of select="xmlEditorExtension:CreateEditableRegion(someXPathExpression)"/>

</someHtmlTags>

Basically, you would take the XSL document, run a quick preprocessing transform over it that takes the content of the appropriate select statements and wraps them in calls to a custom XSL extension (written in C# of course). Then, you run that transform over the document and it comes up with something like this:

<someHtmlTags>

<input id="editableAreaID" type="text">someEvaluatedExpression</input>

<someHtmlTags>

Of course, on IE clients, you would want to use editable spans instead of input or textarea tags (so that it looks nice), but the concept is still the same. I'm going to be pretty wrapped up in projects both inside and outside of the office for the next couple weeks, but maybe I'll have some time to put this idea to the test. It would really be nice to have a completely .NET based xml editor in the form of a server control.

 

3 Comments

Comments have been disabled for this content.