[ expat-Bugs-481400 ] xmlparser needs parentheses
noreply@sourceforge.net
noreply@sourceforge.net
Fri Nov 16 10:48:01 2001
Bugs item #481400, was opened at 2001-11-13 10:49
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=110127&aid=481400&group_id=10127
Category: None
Group: None
>Status: Closed
>Resolution: Works For Me
Priority: 7
Submitted By: Marc Rubin (jayseye)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: xmlparser needs parentheses
Initial Comment:
Two additional sets of parenteses are needed, in
xmlparse.c line 3483, under appendAttributeValue(),
as follows:
if ((!isCdata && (poolLength(pool) == 0) ||
(poolLastChar(pool) == 0x20)))
The intent of the existing code is to suppress
multiple spaces, but this gets short-circuited as
currently written:
if (!isCdata && (poolLength(pool) == 0 || poolLastChar
(pool) == 0x20))
The second test is skipped due to the expansion of the
poolLength() and poolLastChar() preprocessor #defines.
The symptom is that multiple spaces are incorrectly
preserved in attribute values. They are suppressed, as
intended, by adding the parenteses.
The same fix should be applied to xmlparse.cpp line
2688.
----------------------------------------------------------------------
>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-11-16 10:46
Message:
Logged In: YES
user_id=3066
I cannot reproduce this using either NMTOKENS or IDREFS
attribute types. The behavior you're expecting is not
specified for CDATA attributes.
If you can sample XML which exhibits the bug you describe,
please either attach it to this report (in which case I'll
re-open it) or submit a new report.
Thanks.
----------------------------------------------------------------------
Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-11-16 06:39
Message:
Logged In: YES
user_id=3066
I presume you're using a DTD and the attribute is declared
to have a type other than CDATA?
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=110127&aid=481400&group_id=10127