A Lowfat Treebank Browser

The display shows only the syntactic relationships in a sentence, not the morphology (which can be seen in the source files). I expect to provide a query interface to this, I need to clear a hurdle with my service provider first.

While writing this I hit an interesting issue when loading XML using HTML controls. I thought it might be worth posting about that in case someone else is facing the same issues. I wanted to load an XML file with CSS styling, and hit several issues when I tried to use JQuery to do this. I asked a few questions on Stack Exchange, and somone suggested that I use an iframe and change the src attribute to load the file. Voila! Iframes have gone out of style, but for loading XML with CSS, they work very well.

The code that does this is in the syntax trees repo. Here’s the main body of the HTML page, with some text removed for the sake of brevity:

The XML file already contains the CSS needed to format it. I hit one other snag along the way: on some browsers, the top window disappeared when this file was loaded. The solution was to allocate a fixed size for the top window, and allocate the rest for the iframe. Here is the CSS that does that: