[ANN] ReplaceText Bug and STS XML Library

Ken Ray kray at sonsothunder.com
Sun Aug 21 21:44:59 CDT 2005


-- IF YOU DON'T USE THE SONS OF THUNDER XML LIBRARY
-- YOU CAN IGNORE THIS POST
----------------------------------------
Hey everyone... I'm sorry to "shotgun" this email, but I know that there are
dozens of you who have downloaded the Basic version of my XML Library, and
many who have purchased the Standard version, so this is the fastest way to
communicate with you all.

I have recently logged a bug in Bugzilla (#3074) related to Rev 2.6 (I'm
running Build 108) that has a replacetext problem that causes issues with
the XML Library (since that's what it's based on).

The 'xml_normalize' function in the library strips spaces from a string
(leading and trailing spaces) as well as converting space runs to a single
space. The command:

  put replaceText("This    is    a    test"," *"," ")

in 2.5.1 would return "This is a test". But in 2.6 Build 108, it returns
"   " (3 spaces). Apparently it is successful in converting the space runs
to a single space, but at the same time deletes all non-space characters
from the string.

This totally screws up the XML Library since this function is called not
only when you pass parameters that say you want the information normalized
(which you can get around by passing "false" for the normalize param), but
it is *also* called automatically by xml_storeAttribute and
xml_getAttributes - which are called in turn by other XML handlers,
including the *main parsing routine*.

So unfortunately, you can't use the XML Library with confidence in Rev 2.6
(2.5.1 is fine) until this is fixed.

Note that this does NOT affect the revXML DLL, so you may wish to switch to
the revXML DLL in the meantime.

The reason I'm posting this is because I'm concerned that those of you using
the XML Library may be dealing with what you think are bugs in your own
program, but which are actually a result of this replaceText bug.

I'll keep you all posted when things change,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the metacard mailing list