From: Steve B. <Ste...@zv...> - 2001-12-03 03:25:07
|
Dear All, Just thought I'd give a "heads-up" on a couple of checkins to the TclXML project CVS repository. These are for the TclDOM module. Firstly, dom.tcl has been given improved support for XML Namespaces. Specifically, serialisation of documents that contain XML Namespaces should now work correctly (ie. prefixes will be added to element names). I don't think XML Namespace support is complete yet, but this makes it more usable. More significantly, there is now a new subdirectory 'src-libxml2'. This contains an initial implementation of a Tcl wrapper for the Gnome libxml2 library. Early days yet: you can parse and serialize a DOM document, get its document element and some node attributes, such as nodeName. Documents and nodes are wrapped up in Tcl_Obj structures so that manipulating the tree from Tcl is fast[*]. The eventual goal, of course, is to have this package completely TclDOM compatible. At the moment tcldom-libxml2 is a separate implementation to the rest of TclDOM; I have yet to engineer the package loading scripts so that one can choose between implementations. The underlying goal for this work is to integrate it with TclXSLT so that XSLT extensions written in Tcl will be able to handle nodes and nodelists. * In order to conserve memory I have not implemented a token -> node mapping. There is a token -> document mapping since a typical application will not have many documents. Since means that the app must keep a reference to the node. Another thing I have avoided is creating a Tcl command for each node. This is what tDOM does. I think doing so will cause too much memory consumption, but I'm open to suggestions. Does anyone desire compatibility with tDOM model? Enjoy, Steve Ball -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |