[Saxdotnet-devel] Reducing the versioning / eliminating the Ixxx2 interfaces
Brought to you by:
jeffrafter,
kwaclaw
From: Jeff R. <li...@je...> - 2004-12-07 17:57:59
|
Reducing the versioning / eliminating the Ixxx2 interfaces: =========================================================== We are considering eliminating the versioning that exists in the API. As we are still early in the game and both implementations (Expat and AElfred) are active making such a change now seems plausible. We propose to eliminate the versioning by merging the Ixxx2 interfaces with the existing interfaces. This means, for example, merging the behavior of IAttributes2 with IAttributes and so on. There are several problems that are created by doing this. (1) Some implementations will not support the additional methods. Again, these extensions are not required by the XML Specification to be reported to the application. In such a case we will again turn to the SaxNotSupportedExcpetion. If someone attempts to access isDeclared for example and it is not supported by the implementation a SaxNotSupportedException should be thrown. (2) In the case of IEntityResolver / IEntityResolver2, the resolveEntity function is duplicated. Because the implementation needs to know which function should be called (or worse both...) it is determined that the original resolveEntity signature be eliminated in favor of the newer signature from IEntityResolver2. So there will still be only one resolveEntity function and it would look like: InputSource ResolveEntity(string name, string publicId, string baseURI, string systemId); This will of course cause existing applications to fail. But, because this would be a compile time error the problem is mitigated. (3) Modification to existing feature names for the Ixxx2 interfaces. Because the interfaces would no longer exist the feature names would become confusing. So we would change the feature names to: UseAttributes2Feature --> AttributeDeclaredFeature UseLocator2Feature --> XmlDeclFeature UseEntityResolver2Feature --> UseExternalSubsetFeature When the features are false the various extension callbacks (with the exception of the modified resolveEntity) would not be performed. Thanks, Jeff Rafter |