From: Mark S. <ma...@Sc...> - 2006-10-03 01:48:19
|
Jimmy Zhang wrote: > A concern, if VTD-XML is to allow those chars, is that XML developers > are likely to > shun away from VTD-XML for the fear that it is not enough conformant to > the spec... > It is something that is worth thinking about... Well, allow me try to make a stronger case: In the real world, data isn't perfect. One can either toss back illegal data or try your best to work with it. A common best practice is to be as friendly and as considerate as you can to the incoming data, and produce the most accurate and conforming (to whatever standard) outgoing data. Currently, VTD fails here wrt the incoming data; there is no way I can tell VTD to be considerate and lenient towards the failings of the incoming data stream. As a developer, I believe it is my choice - not VTD's - whether or not I wish to be considerate and lenient to the incoming data. If I wish to consider a form feed character as harmless, then I don't want my tools to get in the way. VTD is getting in the way. From a performance standpoint, VTD is now causing many negative consequences: 1. I must build and maintain a new additional layer to handle incoming requests - because I don't have the source to modify any of the previous layers. This new layer is required to scrub clean the incoming data - a job that VTD could have done far faster and cheaper both in terms of time and resources. 2. I need to allocate more objects to buffer the incoming data and the new cleaned result, and spend CPU time walking and cleaning the incoming data. VTD is already doing this exact same job, it's just missing a small insignificant extra if() statement. 3. The extra cost of memory and CPU (plus garbage collection) forced upon users of VTD (users who want to be considerate and friendly to clients sending in data) may now remove the advantages of VTD compared to other solutions. 4. (at least some of) VTDs competitors already scrub the data by default. The XPP (Xml Pull Parser) already does this. In fact, I was in the middle of switching away from XPP when I ran into this VTD limitation. For my particular use case, using VTD is now slower than XPP because of this scrubbing issue. A single if{} could allow the pedantic behaviour (as it is currently) or a more friendly and considerate (I would argue more industry standard) behaviour. In the real world, dirty data happens. We have to deal with it. VTDs value would be even greater if developers could count on it to help us with this problem. Please consider it. Thank you. -- http://www.ScheduleWorld.com/tg/ Free Google Calendar synchronization with Outlook, Evolution, cell phones, BlackBerry, PalmOS, Exchange, Mozilla, Thunderbird, Pocket PC/Windows Mobile. Also sync tasks, notes and contacts! WebDAV, vfreebusy, RSS, LDAP, iCalendar, iTIP, iMIP support. |