Re: [PATCH]: A couple fixes to org/xml/sax/package.html
"Karl Waclawek" <[email protected]> Wed, 21 Apr 2004 09:12:51 -0400
| Newsgroups | gmane.text.xml.sax.devel |
|---|---|
| Message-ID | <001701c427a2$59ff1110$9e539696@citkwaclaww2k> |
> 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. Karl
entityresolver2.diff
(application/octet-stream, 882 B)
Index: EntityResolver2.java
===================================================================
RCS file: /cvsroot/sax/sax2/src/org/xml/sax/ext/EntityResolver2.java,v
retrieving revision 1.2
diff -u -w -b -r1.2 EntityResolver2.java
--- EntityResolver2.java 12 Jan 2002 19:20:08 -0000 1.2
+++ EntityResolver2.java 21 Apr 2004 13:07:50 -0000
@@ -32,8 +32,7 @@
* interface defines for external entities, it must ensure that it uses
* an XMLReader with the
* <em>http://xml.org/sax/features/use-entity-resolver2</em> feature flag
- * set to <em>true</em> (which is its default value when the feature is
- * recognized). If that flag is unrecognized, or its value is false,
+ * set to <em>true</em>. If that flag is unrecognized, or its value is false,
* or the resolver does not implement this interface, then only the
* {@link EntityResolver} method will be used.
* </p>