February 8, 2007

Verbosio progress, 02/08/2007

While I tried to clean up source code editing in Verbosio, I ran into a serious problem: mozdev bug 16341. Basically, the XML document I was editing was pulling in DTD entities from the Verbosio application, not from the document's intended chrome URL's. In other words, Verbosio was getting confused about where to get source code from.

This little mistake is not easy to fix, unless Verbosio knows something about the context it's working in. This goes back to the question of "stand-alone" editing versus "repository" editing (which I tried, and failed, to define in a prior blog entry). Stand-alone editing means a bunch of files which are not related to each other. Repository editing refers to files which reference one another and/or link to one another, so edits to one affect other files as well.

For XML files which refer to other files (like localization DTD files), stand-alone editing cannot work. The entities in external files must load, or the XML document is not well-formed.

(Yes, I know Mozilla does strange things with external entities, that don't follow the XML spec. Deal with it. I have to.)

I had gone for stand-alone editing first, figuring that was going to be very simple. Now it's a stand-alone complex (pun intended) and a major (pun again intended) design flaw.

The solution, for now, is to implement a whole bunch of features I didn't want to implement this early. More importantly, I have to break stuff to fix stuff, again. This will give me basic support for one type of repository editing: XUL applications and extensions.

I had hoped to have Verbosio 0.1 ready in time for OSCON 2007 in Portland, OR. I seriously doubt that's going to happen now, but it might be halfway usable by then.

It's not all gloom and doom. Today I checked in the first big piece of the new approach: a file-system tree viewer. I'm almost certain I could have used a RDF datasource for this (rdf:files), but I needed this in a hurry, and RDF in XUL is something I still don't fully get. So I went with what I knew. If anyone wants to base this on RDF, I'll take patches.

Posted by WeirdAl at February 8, 2007 10:15 PM