From: Matthew C. <mat...@va...> - 2007-10-05 17:06:26
|
Angel Pizarro wrote: > > The count atts are required, so you can't just ignore them. Plus if > you do, then you won't be playing nice with other tools out there that > do use them. Meaning that: > I meant ignore them while reading, which is entirely possible. Ignoring them while writing would not meet the spec. > (a) all write tools must encode counts properly Yes, and this should be very easy to do. > (b) all read tools must check the count attribute's correctness since > (a) may not actually be true, thus completely defeating the point of > having this attribute in the first place. > I do not see how you come to this conclusion. Read tools do not need to check the correctness, they can choose to parse whatever is there. If a reader reads the count element for spectra and pre-allocates memory for <count> spectra objects, that's the reader's choice. Readers don't HAVE to do that, it's just there for convenience. > Simpler on everybody if we just get rid of it in these spots. I routinely ignore count attributes in my XML parsers. Like I said, it's mainly convenient for human readability. Otherwise, readers have to do a "find all" on the element type, which is also not very hard, but some might complain. -Matt |