rg/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 {@link EntityResolver} method will be used.
That supports three categories of application that modify entity resolution. Old Style applications won't know about this interface; they will provide an EntityResolver. Transitional Mode provide an EntityResolver2 and automatically get the benefit of its methods in any systems (parsers or other tools) supporting it, due to polymorphism. Both Old Style and Transitional Mode applications will work with any SAX2 parser. New style applications will fail to run except on SAX2 parsers that support this particular feature. They will insist that feature flag have a value of "true", and the EntityResolver2 implementation they provide might throw an exception if the original SAX 1.0 style entity resolution method is invoked.
@see org.xml.sax.XMLReader#setEntityResolver
@since SAX 2.0 (extensions 1.1 alpha)
@author David Brownell