[ expat-Bugs-585521 ] Line ends not normalized for default

noreply@sourceforge.net noreply@sourceforge.net
Sat Jul 27 08:58:02 2002


Bugs item #585521, was opened at 2002-07-23 13:41
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=585521&group_id=10127

Category: None
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 4
Submitted By: Fred L. Drake, Jr. (fdrake)
Assigned to: Nobody/Anonymous (nobody)
Summary: Line ends not normalized for default

Initial Comment:
Line endings passed to the handler set by
XML_SetDefaultHandler() or
XML_SetDefaultHandlerExpand() are not normalized,
though it appears they should be.

This definately seems to be a bug, but I'm not sure
that fixing it won't cause application breakage for
apps that determined they need to normalize line
endings themselves.

----------------------------------------------------------------------

>Comment By: Karl Waclawek (kwaclaw)
Date: 2002-07-27 11:57

Message:
Logged In: YES 
user_id=290026

Closed and rejected, since Fred accepted my last argument,
and since no one else seemed to care.

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-07-25 19:46

Message:
Logged In: YES 
user_id=290026

Apart from the comment in expat.h, what sense would
an alternate handler make if it did what the other handlers
already do?

If we agree that it should normalize linebreaks, should
it then not also expand character and predefined entity 
references? But wait, that should not be done in all 
situations, since reporting default attribute values does not
allow expanding general entities. Then we would need
a special behaviour when called instead of an attribute list
declaration handler. Why not use the proper handler then?

The default handler callback must provide something that
the regular handlers don't do, otherwise I don't see why 
anyone would use it.
And what could that be? Reporting the raw data
seems the most reasonable, IMO. The need for additional
processing is obvious in any case, so why not refrain
from pre-processing altogether (with the exception of 
encoding, which is reversible anyway).



----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-07-23 23:59

Message:
Logged In: YES 
user_id=290026

Getting the raw data may be exactly the case the default 
handler is meant for. The existence of XML_DefaultCurrent
would support this assumption. Check the corresponding 
documentation/comments in expat.h.


----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-07-23 23:18

Message:
Logged In: YES 
user_id=290026

Fixing this bug should only be a problem for
applications that *need* the default handler's data
un-normalized. Otherwise, normalizing the linebreaks
a second time would not change them.



----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-07-23 17:36

Message:
Logged In: YES 
user_id=290026

Fred,

I think you are right, it is a bug.
The spec seems to say that every character passed
to the application has to go through line break
normalization.

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-07-23 14:02

Message:
Logged In: YES 
user_id=290026

I don't think it is a bug in the implementation.
It might be a documentation problem.

If you look at how it is implemented and called,
it seems pretty clear that it intentionally reports
the raw input data (except for encoding).

There is also the XML_DefaultCurrent function,
which seems to require this behaviour.
Btw, this function does not seem to be documented
in reference.html.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=585521&group_id=10127