Wednesday, 26 September 2007

Importing XML to a web page and using ID

I've been working on the web  display of the online database for DCS, starting from Luca's code, and then I shall put the backend from Satoru's on it. It seems the best way (most robust) to import XML into a web page is using an Ajax method and retrieve the .xml file. However I was surprised at first to find that the 'id' attribute didn't work with 'getElementById()', until I remembered that one of the few remaining places where a DTD is preferable over a W3C schema is in defining the id attribute to be of type 'ID'. Once done, it seems to work (tiddler article in preparation).
Today I need an XSLT to go from Luca's existing Atlas.xml file format to the new menu.xml format I made, which is less wordy and separates the menu definition from the hierarchy, using xlink:href references to bind the two.
On the back burner for now: On Monday, after reviewing a few web apps in Atlas which access Cool, it became apparent that everyone is doing their own ugly thing to get the COOL environment set up before accessing the database...better would be to have a centralized service. I'll accept the received wisdom that SOAP is too wordy, and now I've downloaded and locally installed CherryPy to expose the python interface to COOL via URLs.
Metadata: Atlas has it, but it seems that we have a homegrown solution; why aren't they using RDF?

Wednesday, 19 September 2007

IFrame vs Div in WebDisplay

I spent the last couple of days trying to work out how to use the XSLT I made for displaying a JiveXML file for a web interface. I thought I would have to load the document, get the transform from the server and then manually instantiate the XSLT processor in javascript. This turns out not to be the case; because the JiveXML is associated with a stylesheet, I need only load it into an IFrame window directly from the server. In any case, changing the content of an IFrame programmatically turns out to be difficult.
It seems that Javascript cannot, however, access a local file directly from within itself: it needs to send it to the server, which then echoes it back to the web page. I gave a talk on the web display, which seemed to go very well (if people have not seen XSLT before, its effect can seem pretty amazing). A tiddlyWiki update is in preparation...

In the mean time, Richard Hawkings has asked for some help on the databases, which is exactly what I want to do. I need to familiarise myself with PyCool and look at the AtlCool console, too (todays work). 

Wednesday, 12 September 2007

DCS Viewer Interface

I've been involved in the Database documentation review, so have a meeting this afternoon from 15:00. In the mean time, I've also been looking at Luca's code. I think that the problem is very difficult: How to generally define a navigational interface for all subsystems. We've started with an XML definition file, but I think it needs revamping. All of this has been committed in CVS now, so this should at least make versioning easier.

Wednesday, 5 September 2007

Testing

Have to test a number of fixes:
latest cabling in 13.0.X
both InDetPrepRawDataFormation and SiClusterizationTool in 13.0.30. Unfortunately, I can only test the compilation on this last one... I still need a good routine way to test clusterization...

Compiled/tested the cabling: ok, requested tag approval
Compiled InDetPrepRawDataFormation and SiClusterizationTool (dont have a unit test: have to figure out how to introduce one). ok, requested tag approval.
Diagnosed DB problem of Auke-Pieter Colijn, updated a simple DB query program (Ajax style) for him, here.

Tuesday, 4 September 2007

Broadening display, bad news

I managed to separate out the styles of InDetWebDisplay such that they can be edited separately and then introduced panning and zooming. Once the coordinate system had been fixed, this was fairly trivial. Unfortunately there are still people out there using internet explorer, which doesnt understand SVG (it uses a proprietary format called VML) so I may need to introduce another level of transform for them...
Today I'll fix the savannah bug about InDetCabling warnings and try a few things in VML to see what happens.

Bad News
I've been asked to take on a job which would essentially mean the end of any serious software activity. I'm not sure that my initial refusal has been accepted. :-(