On Thu, 28 Jul 2011, Ludo Brands wrote:




- when a string field contains the > character, the row is not
imported but the previous one is duplicated.
Strange, shouldn't this be handled by the XML export code?

Debugged xmlwrite.pp. In DelphiClientDataset, values are
sent out as
attributes of ROW. Line 133 in xmlwrite.pp specifies special
characters for attributes as AttrSpecialChars = ['<', '"', '&', #9,
#10, #13]; It doesn't include '>'. Is delphi violating the
rules or is
xmlwrite.pp too conservative, I don't know. Adding '>' to
AttrSpecialChars seems to be a save solution. Another issue in
bugtracker?

Yes, and please assign it to sergei gorelkin.


Do you have any indication if it is actually a bug to not consider '>' as a
special character? I googled a bit but only found contradicting info.
Question of correctly tagging it as feature request or bug.
Didn't know a "reporter" could assign issues to somebody.

The XML rereference does not list > as an allowed character for attribute 
values.

It also says

The right angle bracket (>) may be represented using the string " &gt; ", and 
MUST, for
compatibility, be escaped using either " &gt; " or a character reference when it appears in the string " ]]> " in content, when that string is not marking the end of a CDATA section.

So replacing > with &gt; seems like the correct thing to do.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to