From: Derek F. <fo...@hu...> - 2002-09-30 10:02:34
|
> Basically I'd say the version of TclXML and TclDOM that shipped with > ActiveTcl 8.3.4.3 were buggy. ActiveTcl 8.4.0.1 would be using more > recent versions, which have different bugs (like the lack of a '-parser' > option). Please submit bug reports for those problems. > > It should not be difficult to adjust the packages being loaded in > ActiveTcl 8.4.0.1 to use the pure Tcl implementations. > Firstly, make sure you have the latest release: v2.3. > Secondly, use 'package require tclparser' to load the pure-Tcl > parser first and make it the default parser. Failing that, remove > the TclXML/TclDOM DLLs to force the pure Tcl packages to be used. Unfortunately, plugging new versions of libraries in isn't really possible for my project. I have to distribute some code across my department, and one of the conditions of my doing it in Tcl as opposed to C++ was that I just distribute a single binary. I haggled such that installing one, easy to install package (ActiveTcl in this case), as well as the "binary" would be acceptable. The users can manage that on both Win32 and Linux. Patching in various versions of libraries is something I really need to avoid if possible. I've been having a better look at ActiveTcl-8.4.0.1 and seem to have it running the pure tcl parser by putting "package require tclparser" just after my "package require xml". (How do I tell which parser it's using?) The problem that appears now is that an area of text inside a CDATA section might get serialised such that it doesn't have the CDATA wrapper on output - the meta characters get escaped individually. Looking at the code, there seems to be a "node:cdatasection" flag on the node which is used to preserve these CDATA wrappers. However, I'm not sure this flag is being set properly a parse time. It certainly doesn't seem to be working for me! Unfortunately I need those CDATA wrappers to stay in place, but only where they appear in the input (so setting ::dom::maxSpecials to 0 doesn't help). They are being used to protect HTML areas in the text which a guy downstream is having to jump through some serious XSL hoops to get rendering right. Strictly speaking I think he's doing kludgey things, using "CDATA" as markers for certain behaviours, but I can't change what he's doing. Is there any way I can get that node:cdatasection flag to work correctly? -- 10:45am up 68 days, 1:12, 2 users, load average: 0.00, 0.02, 0.00 |