[jdom-commits] CVS update: jdom/src/java/org/jdom/input

bmclaugh at cvs.jdom.org bmclaugh at cvs.jdom.org
Wed Aug 1 17:01:19 PDT 2001

Date:	Thursday August 2, 2001 @ 1:01
Author:	bmclaugh

Update of /home/cvspublic/jdom/src/java/org/jdom/input
In directory www.nmemonix.com:/tmp/cvs-serv5785/java/org/jdom/input

Modified Files:
Log Message:
This change moves the location of the code in SAXBuilder that handles setting
  any user-defined XMLFilters on the XMLReader implementation. Details follow:

I suggest moving the installFilter part into build(InputSource), after
createParser() and before configureParser(XMLReader), as follows:

    public Document build(InputSource in) throws JDOMException {
        SAXHandler contentHandler = null;

        try {
            // Create and configure the content handler.
            contentHandler = createContentHandler();

            // Create parser
            XMLReader parser = createParser();

            // Install optional filter
            if (saxXMLFilter != null) {
                // Connect filter chain to parser
                XMLFilter root = saxXMLFilter;
                while (root.getParent() instanceof XMLFilter) {
                    root = (XMLFilter)root.getParent();

                // Read from filter
                parser = saxXMLFilter;

            // Configure parser
            configureParser(parser, contentHandler);

This "separation of concerns" simplifies createParser() for the benefit of
overriders, and prepares for an eventual installFilter() protected method.

File: no file SAXBuilder.java		Status: Needs Checkout

   Working revision:	1.55	Thu Aug  2 00:01:19 2001
   Repository revision:	1.55	/home/cvspublic/jdom/src/java/org/jdom/input/SAXBuilder.java,v

   Existing Tags:
	jdom_1_0_b7              	(revision: 1.53)
	jdom_1_0_b7_rc3          	(revision: 1.53)
	jdom_1_0_b7_rc2          	(revision: 1.53)
	jdom_1_0_b7_rc1          	(revision: 1.53)
	jdom_1_0_b6              	(revision: 1.34)
	start                    	(revision:
	jdom                     	(branch: 1.1.1)

More information about the jdom-commits mailing list