Re: [Saxdotnet-devel] Reducing the versioning / eliminating the Ixxx2 interfaces
Brought to you by:
jeffrafter,
kwaclaw
From: Karl W. <ka...@wa...> - 2004-12-07 19:33:27
|
> Jeff Rafter wrote: > > > > (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. > > > Suggestion: drop isDeclared from Attributes/Attributes2 completely and > instead define a new "undeclared" value to be returned by getType for > undeclared attributes. I suspect this would have been in SAX/Java if > anyone had thought of it earlier; but the use cases that led to these > methods in Attributes2 weren't uncovered till later. Hhmm, makes sense. While we are at it: Why are enumerations reported as NMTOKEN in the Java API" <quote> For an enumerated attribute that is not a notation, the parser will report the type as "NMTOKEN". </quote> Why not use the type as it is declared? Or use the the term "ENUMERATION"? > isSpecified is trickier, but I tend to think you should just add it to > the Attributes interface and require parsers to support it. I guess that is possible, since a parser that does not read the DTD will just always return true without misleading the user. Karl |