Subscribe to Dr. Macro's XML Rants

NOTE TO TOOL OWNERS: In this blog I will occasionally make statements about products that you will take exception to. My intent is to always be factual and accurate. If I have made a statement that you consider to be incorrect or innaccurate, please bring it to my attention and, once I have verified my error, I will post the appropriate correction.

And before you get too exercised, please read the post, date 9 Feb 2006, titled "All Tools Suck".

Saturday, August 26, 2006

XIRUSS-T Update: Now WIth Direct HTTP Access to Contente

I have uploaded a new release of XIRUSS-T to Sourceforge, xiruss_t_build_20060826.

The code now includes two HTTP servers, the API server and the "viewer" server. I've provided a new top-level server runner that starts both servers. I've added some convenience functions to the Jython xiruss_client.py script to make manipulating the repository contents a little easier.

This release adds support for direct HTTP-based access to version content such that you can now import XML documents and then access them via URL from any HTTP-aware tool (i.e., a Web browser, an XSLT processor, an editor like oXygen XML, etc.) such that references to other documents will be resolved against the repository correctly.

For example, using the Jython client as a helper, I imported a directory containing an XML document that uses another schema that imports yet another schema (which is in turn made up of many small parts). The whole lot gets imported (via the built-in directory importer). Having done that, I then navigated via the new HTTP server (started on port 9091 by default) to the version that is an imported XML document. Clicking on the link from the snapshot view to the version you get the content of the version in the browser window. There you can see that the pointers to, for example, schemas, have been rewritten as references to resource IDs with resolution policy names as URL parameters.

I then copy the URL of the version to the clipboard, open oXygenXML editor and do "Open URL". I paste the copied URL into the box and do open. The version is opened in the editor. I then push the "validate" button and the document is validated against its schema accessed directly from the repository.

Not earth shattering functionality but it's a big milestone for XIRUSS.

The HTTP viewer server is very crude and unsophisticated--I'm not a Web guy and have not put any real effort into making it look pretty--it's just a way to demonstrate accessibility of versions.

This is the minimal functionality needed to make the XML versions stored in a XIRUSS repository directly usable without any sort of explicit export action.

Note that being able to actually edit a version through a tool like oXygenXML would require either implementing the necessary WebDAV protocols or providing a plug-in that works via the XIRUSS client API. The last time I looked into implementing WebDAV it appeared to be harder than I expected so I didn't do it. At the time I couldn't find a nice layered WebDAV implementation that would have been quick to adapt to my stuff. That might be different now, I don't know.

Finally, I think that my approach to the rewritten URLs needs to be thought through carefully. The current approach works but it binds the resolution policy into the version content and I think that is wrong. You should be able to change the resolution policy for a dependency without modifying the version (the current code reflects my initial implementation from a couple of years ago). I think the right thing to do is to point dependency objects but then that imposes some requirements for dependency existence that the repository model currently doesn't impose. So I have to think it through. But definitely what I'm doing now is not 100% correct.

Toward that end I think my next task will be implement an Eclipse plug-in that provides more sophisticated access to the repository and enables direct editing of new versions through Eclipse-integrated editors. I don't think this will be too hard, certainly no harder than doing my crude HTTP stuff is and will provide a much nicer interface overall.

Labels:

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home