Lists Home |
Date Index |
Karl Waclawek wrote:
>>* Topic 2004-0003: Unicode normalization
> Ideally the factory is the better place for it, as it would
> be for requesting a validating parser. But what about
> backwards compatibility?
Backwards compatibility for turning validation on/off is not
immediately broken by providing an appropriate feature setting
for the factory. It depends what kind of consistency is required
between using the feature on the factory and on the processor
1. Using the feature setting on the factory just creates a
2. Using the feature on the factory creates a processor whose
feature setting can't be changed later (but it can be set to
the preset value).
3. The feature can *only* be used on the factory, trying to
change it on the processor, even to the preset value, results
in an error.
4. The feature can *only* be set on the processor.
Pick one, or add your own variation.
> It is conceivable to have user options for ignoring certain
> kinds of errors. In the case of Unicode normalization:
> What about the ability to turn normalization checking
> off in the middle of parsing?
I think the results are unpredictable. An efficient parser
might have read ahead, prepared a buffer of already normalized
data and discarded the original data on a non-seekable input