Editing styled XML
Return to home page
Comments Loading...
2003-09-05

Hi, for those of you who are following with:Style and our efforts to make a XML thin-client in and for Smalltalk, you might be interested in the editing functionality I'm currently working on.

It starts off easy enough - display the XML with the CSS as you always would. Mouse overs all work, so you can drop a cursor where-ever the mouse clicks. No problems so far. Typing isn't even much of an issue, you edit the text through the various display layers back to the model and invalidate the areas that need updating. It flies, truelly.

But that's about where it ends being easy :) - Selecting wasn't too hard. You can assign a unique id to each view node so that selecting is calculated by number ranges. Ie: I've selected from id's 7 to 12. Any node that is the fringe numbers or inside them is selected. It's quick and effecient.

Right! So we can type, we can select - but what about mass operations? - styling an area of text, deleting an area of text, cutting it.. or pasting something else in. And once you're done, it still needs to be valid XML. Let's make it a bit harder, let's imagine all of that isn't too hard - what if they want things to be validated against an XSchema or DTD?, you have to make sure it validates as you do it.

This is an introduction blog on what I'm currently in the process of solving. If you want to post to me about your solution to the problem, by all means do so - but I won't be paying you for the contribution, you'll get the glory only :)

I'm a great believer in simple solutions and I also believe these things won't be as difficult as they sound.