private static void
    showProperties (XMLReader producer)
    {
	System.out.println ("PROPERTIES for "
	    + producer.getClass ().getName ());

	DefaultHandler2		handler = new DefaultHandler2 ();

	// all properties are optional
	checkProperty ("declaration-handler", producer, handler);

    // To check the dom-node property, we need an instance
    // of an org.w3c.dom.Node.  Any one will do; but since
    // we don't know what is installed, we try four likely
    // suspects.

    String[] domClassNames = {
        "org.apache.crimson.tree.XmlDocument",
        "org.apache.xerces.dom.DocumentImpl",
        "gnu.xml.dom.DomDocument",
        "oracle.xml.parser.v2.XMLDocument",
    };
    org.w3c.dom.Node node = null;
    for (int i = 0; i < domClassNames.length; i++) {
        try {
            Class domClass = Class.forName(domClassNames[i]);
            node = (org.w3c.dom.Node) domClass.newInstance();
        }
        catch (ClassNotFoundException e) { continue; }
        catch (InstantiationException e) { continue; }
        catch (IllegalAccessException e) { continue; }
        catch (ClassCastException e)     { continue; }
    }

    // If none of the classes yielded a workable instance,
    // just skip the test.
    if (node != null) {
        checkProperty ("dom-node", producer, node);
    }

	checkProperty ("lexical-handler", producer, handler);
	checkProperty ("xml-string", producer, "<root/>");
    }