From: Steve B. <Ste...@zv...> - 2002-12-08 01:35:48
|
Dear Ted, You wrote: > I am transitioning a program I had running with tclexpat to use > tclxml. I had some problems with -final in tclexpat, (had to patch the > code someway or another) and seem to be finding something similar here > also. > > Here is my first test script [...snip...] > As expected, it prints > > world Good - that's a start ;-) > Here is my second test script > > ====Start==== > #!/usr/local/bin/tclsh8.4 > > lappend auto_path lib > > package require xml > > proc cdata {data args} { > puts $data > } > > set parser [::xml::parser parseit \ > -characterdatacommand cdata -final 0] > > $parser parse "<the>" > $parser parse "world" > $parser parse "</the>" > ====End==== > > It does not print "world" and errors out with a long backtrace: Your script should include: $parser configure -final 1 at the end, just to wind-up the parser. As it is, I would expect it to at least not produce an error, if not to emit "world". > This seems like a pretty basic thing. Any suggestions? There is already an open bug on "-final" in the SF bug tracker (#413341). Please feel free to append your comments to that bug. The bug is currently assigned to Mats, and may be worthwhile reminding him (gently) to fix it ;-) Of course, if you can provide a patch I would be only too happy to incorporate it myself and close the bug report if it is fixed. > Please reply directly to me as well as to the list because sourceforge > seems to be unhappy today, and I have not been able to subscribe so > far. Fixed. You are now subscribed. (New subscribers must be approved, to avoid spammers having access to the list). Cheers, 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 |