Re: [Repost] Re: [PATCH]: A couple fixes to org/xml/sax/package.html
"Karl Waclawek" <[email protected]> Wed, 21 Apr 2004 11:21:49 -0400
| Newsgroups | gmane.text.xml.sax.devel |
|---|---|
| Message-ID | <002801c427b4$5e523960$9e539696@citkwaclaww2k> |
> [Originally posted earlier today, but it didn't get through.] > > Karl Waclawek wrote: > > >>2) Specify that the use-entity-resolver2 is read-write with a default > >>value of true, instead of read-only with no default value. The description > >>of EntityResolver2 in CVS says: "If a SAX application requires the > >>customized handling which this interface defines for external entities, it > >>must ensure that it uses an XMLReader with the > >>http://xml.org/sax/features/use-entity-resolver2 feature flag set to true > >>(which is its default value when the feature is recognized). If that flag > >>is unrecognized, or its value is false, or the resolver does not implement > >>this interface, then only the EntityResolver method will be used." > >>Therefore this feature has a default value of true (when it is > >>recognized). Since the default value is true, the value of the feature > >>could only ever be false if it were read-write. Parsers which do not > >>support setting this feature to false would throw a > >>SAXNotSupportedException. > > > > Alternatively, you could fix the description of EntityResolver2 > > with the attached patch and leave it read-only. > > Thanks for the patch. Before I commit, will we need a patch to package.html > (with Michael's recent changes) for consistency? I sent this patch before I saw you had committed Michael's patch. Right now CVS is consistent, and the only reason I object to the use-entity-resolver2 being read/write is that it does not add anything and just gives you one more way to do the same thing, which - IMO - violates the "minimal" principle for API design. However, I can live with both choices, and leave it up to you to decide. For completeness, the patch to undo Michael's patch which undid my previous patch, is attached. It was not created through CVS, as pserver access to CVS does not go against live data, so I couldn't see your recent changes. Karl
package.html.diff
(application/octet-stream, 488 B)
--- package_michael.html 2004-04-21 11:15:06.115454400 -0400
+++ package.html 2004-04-21 11:10:57.738305600 -0400
@@ -166,8 +166,8 @@
<tr>
<td>use-entity-resolver2</td>
- <td><em>read/write</em></td>
- <td><em>true</em></td>
+ <td><em>read-only</em></td>
+ <td>not applicable</td>
<td> Returns "true" if, when <em>setEntityResolver</em> is given
an object implementing the <a href="ext/EntityResolver2.html"
><em>org.xml.sax.ext.EntityResolver2</em></a> interface,