From: Matthew C. <mat...@va...> - 2007-10-05 18:32:49
|
Mike Coleman wrote: > I see what you're saying, but I'm very sympathetic to Angel's point as > well. If nothing else, a well-written piece of software needs to emit > a warning upon seeing an inconsistent count field. This means that it > needs to calculate the correct value, which mostly eliminates the > value of having it in the file in the first place. > Steps to implement a reader dealing with invalid count attributes: 1) Ignore the count 2) Keep counters of how many list elements (whatever is being counted) were actually read in 3) If you write out mzML, use your counters' values (subtracting the # of elements filtered out and adding the # of elements added) 4) Voila, valid mzML by ignoring count attributes! :) It's considerably more difficult to implement readers which work with references to previously parsed elements (i.e. ParamGroups and references to them). And that's NOT something that an implementation can ignore! -Matt |