Demo using Tcl XML packages by much more talented programmers than myself for a useful XML drug database. Part of a larger medical records application. Combines ability to edit the XML data, display the parsed DOM and perform XPATH, apply XSLT stylesheets and display the results in as rendered HTML. Uses starDOM, tDOM, Bwidgets, IncrTcl and Tkhtml.
| Tcl |
1 | It's a small package available at http://www.psnw.com/~alcald/starDOM.tar.gz
|
Discussion
tDOM is a very useful XML package for Tcl. It includes SAX, XML DOM, XPATH and XSLT. Tkhtml is very useful for displaying HTML in a Tcl/Tk application. starDOM is a combination XML editor and can also display the parsed XML DOM as a Bwidget tree structure in a Tk window. You can apply XPATH queries on your XML data. I added the ability to apply an XSLT stylesheet to the XML DOM and display the resulting XHTML in a Tkhtml widget. A a physician, I'm going to use XSLT to apply stylesheets to the drug database to extract useful information while treating patients. For example, I can extract all the antihypertensives that are beta blockers and disply it in nicely formatted HTML. Should run on Windows with Windows version of tDOM and ActiveTcl, but I've only run it on Linux. The editor is rather specialized for the particular XML data structure I'm using, but the code could fairly easily be modified for another XML structure. It isn't finished yet and has only 4 drugs. I need to add function to load all drugs into a DOM structure in memory. Right now it's mostly for editing the database one drug at a time.


Sign in to comment