Why do I get warnings when using a JAXP 1.1 parser?

If you're using a JAXP 1.1 parser, you might see the following warning (in your log):

[WARN] Digester - -Error: JAXP SAXParser property not recognized: http://java.sun.com/xml/jaxp/properties/schemaLanguage

This property is needed for JAXP 1.2 (XML Schema support) as required for the Servlet Spec. 2.4 but is not recognized by JAXP 1.1 parsers. This warning is harmless.

Why Doesn't Schema Validation Work With Parser XXX Out Of The Box?

Schema location and language settings are often need for validation using schemas. Unfortunately, there isn't a single standard approach to how these properties are configured on a parser. Digester tries to guess the parser being used and configure it appropriately but it's not infallible. You might need to grab an instance, configure it and pass it to Digester.

If you want to support more than one parser in a portable manner, then you'll probably want to take a look at the org.apache.commons.digester.parsers package and add a new class to support the particular parser that's causing problems.

Help! I'm Validating Against Schema But Digester Ignores Errors!

Digester is based on SAX. The convention for SAX parsers is that all errors are reported (to any registered ErrorHandler) but processing continues. Digester (by default) registers its own ErrorHandler implementation. This logs details but does not stop the processing (following the usual convention for SAX based processors).

This means that the errors reported by the validation of the schema will appear in the Digester logs but the processing will continue. To change this behaviour, call digester.setErrorHandler with a more suitable implementation.

Where Can I Find Example Code?

Digester ships with a sample application: a mapping for the Rich Site Summary format used by many newsfeeds. Download the source distribution to see how it works.

Digester also ships with a set of examples demonstrating most of the features described in this document. See the "src/examples" subdirectory of the source distribution.

When Are You Going To Support Rich Site Summary Version x.y.z?

The Rich Site Summary application is intended to be a sample application. It works but we have no plans to add support for other versions of the format.

We would consider donations of standard digester applications but it's unlikely that these would ever be shipped with the base digester distribution. If you want to discuss this, please post to commons dev mailing list

Does my old Digester 2.X code continue working once upgraded to Digester 3?
No, class imports have to be updated to org.apache.commons.digester3 otherwise Digester and Rule classes won't be found. Old XML Rules and Annotations rule extensions are not 100% compatible, please refer to related documentation.