325N/A * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 325N/A * This code is free software; you can redistribute it and/or modify it 325N/A * under the terms of the GNU General Public License version 2 only, as 325N/A * published by the Free Software Foundation. Oracle designates this 325N/A * particular file as subject to the "Classpath" exception as provided 325N/A * by Oracle in the LICENSE file that accompanied this code. 325N/A * This code is distributed in the hope that it will be useful, but WITHOUT 325N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 325N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 325N/A * version 2 for more details (a copy is included in the LICENSE file that 325N/A * accompanied this code). 325N/A * You should have received a copy of the GNU General Public License version 325N/A * 2 along with this work; if not, write to the Free Software Foundation, 325N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 325N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 325N/A * or visit www.oracle.com if you need additional information or have any 325N/A * Produces a complete series of SAX events from any DOM node 325N/A * This class hides a logic of re-associating {@link Locator} 325N/A * to the generated SAX event stream. 325N/A * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com) 325N/A * Scans DOM nodes of the given forest. 325N/A * DOM node parameters to the scan method must be a part of 325N/A * Generates the whole set of SAX events by treating 325N/A * element e as if it's a root element. 325N/A // insert the location resolver into the pipe line 325N/A * Generates the whole set of SAX events from the given Document 325N/A * Intercepts the invocation of the setDocumentLocator method 325N/A * and passes itself as the locator. 325N/A * If the client calls one of the methods on the Locator interface, 325N/A * use the LocatorTable to resolve the source location. 325N/A * Flag that tells us whether we are processing a start element event 325N/A * or an end element event. 325N/A * DOMScanner's getCurrentLocation method doesn't tell us which, but 325N/A * this information is necessary to return the correct source line information. 325N/A * Thus we set this flag appropriately before we pass an event to 325N/A * the next ContentHandler, thereby making it possible to figure 325N/A * out which location to return. 325N/A // ignore one set by the parent.