Forum OpenACS Development: Heads Up: tDOM will replace nsxml
Once committed, OpenACS will require tDOM instead of nsxml. tDOM is one of the fastest DOM/XSL/XPath implementations around. Replacing nsxml with tDOM opens the door to all sorts exciting posibilities. Examples include:
- the IRC logger at https://openacs.org/irc/log/ (currently out of order but that is a whole different story)
- amazon.com integration (see the books listed at http://www.thecodemill.biz or my wishlist at http://www.thecodemill.biz/about/bart-teeuwisse/wish-list/
- ups and fedex integration to track orders or to get quotes (long term plan),
and much more.
I also want to take this opportunity to ask for the community's input on this replacement. Changing the code is easy, the real work is in the documentation (1) and the ease of installation (2).
1) We need to change the documentation so that it refers to tDOM where it used to mention ns_xml. Which documents are affected by this change?
2) The advantage of tDOM is that it can be loaded into AOLserver 4.x with a simple 'package require' when ever needed. AOLserver 3.x however still requires a nstdom module which will need to be compiled (Instructions are included in the tDOM tar ball). Should we include tDOM in an OpenACS tarball? tDOM is not available (and will not be -as far as I know-) from AOLserver.com as it is not an exclusive AOLserver module.
Your thoughts on these questions are apreciated.
More news follows when the change has taken place. Checkout http:/tdom.org/ to familiarize your self with tDOM.
Please follow the installation instructions included with tDOM for AOLserver 3.x EVEN when you are running AOLserver 4.x. As package require only works in AOLserver 4.x we'll have to go with the smallest common denominator.
Checkout irc-logger (http://cvs.openacs.org/cvs/openacs-4/contrib/packages/irc-logger) for an example of how to use tDOM in OpenACS.
I've written a DTD for XQL files, which is available from http://www.thecodemill.biz/repository/xql.dtd. A write-up of how to use this DTD in Emacs is available from http://www.thecodemill.biz/publications/xql-dtd/.
Not wishing to belittle your hard work but a talk I attended recently suggested that in future we should be using XML Schemas in place of DTD's. http://www.w3.org/XML/Schema
I couldn't agree more. However, I do know that Emacs (and many other editor) can parse DTDs. Support for XML Schemas is spotty at this time.
When the time is right we can convert DTDs into XML Schemas using tools such as http://www.w3.org/2000/04/schema_hack/.
and could you give all of us non-lisp programmers an example of setting sgml-custom-dtd? I tried many ways and it never worked. Thanks
("XQL 1.0" "<?xml version=\"1.0\"?gt;\n<!DOCTYPE queryset PUBLIC \"-//OpenACS//DTD XQL 1.0//EN\" \"xql.dtd\"gt;" )
Please note that the URL has change to http://www.thecodemill.biz/publications/articles/xql-dtd/.
A second article is forthcoming. This article shows how can find and replace bind variables in OpenACS queries as you enter them in an interactive SQL buffer. Stay tuned!
nsparam nsxml ..path/bin/nsxml.so
aolserver server_config.tcl file entry for:
nsparam libtdom ..path/bin/libtdom.so
This might confuse newcomers.
I am assuming that nsxml does not need to be loaded any more. Will there be any errors thrown in openacs code if aolserver loads both modules at startup?
ns_xml and tDOM can both be loaded at the same time.