@@ -0,0 +1,2056 @@
+/*%0A *%0A *   Copyright 2005-2006 The Apache Software Foundation.%0A *%0A *  Licensed under the Apache License, Version 2.0 (the %22License%22);%0A *  you may not use this file except in compliance with the License.%0A *  You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A *  Unless required by applicable law or agreed to in writing, software%0A *  distributed under the License is distributed on an %22AS IS%22 BASIS,%0A *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A *  See the License for the specific language governing permissions and%0A *  limitations under the License.%0A *%0A */%0Apackage org.apache.commons.scxml.io;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Iterator;%0Aimport java.util.Map;%0A%0Aimport org.apache.commons.collections.ArrayStack;%0Aimport org.apache.commons.digester.Digester;%0A%0A/**%0A * %3Cp%3E%3Ccode%3EDigester%3C/code%3E that exposes a %3Ccode%3EgetCurrentNamespaces()%3C/code%3E%0A * method, for capturing namespace snapshots.%3C/p%3E%0A *%0A * @deprecated Will be removed after the 1.8 release of Commons Digester.%0A */%0Afinal class CustomDigester extends Digester %7B%0A%0A    /**%0A     * Get the most current namespaces for all prefixes.%0A     *%0A     * @return Map A map with namespace prefixes as keys and most current%0A     *             namespace URIs for the corresponding prefixes as values%0A     *%0A     */%0A    public Map getCurrentNamespaces() %7B%0A        if (!namespaceAware) %7B%0A            log.warn(%22Digester is not namespace aware%22);%0A        %7D%0A        Map currentNamespaces = new HashMap();%0A        Iterator nsIterator = namespaces.entrySet().iterator();%0A        while (nsIterator.hasNext()) %7B%0A            Map.Entry nsEntry = (Map.Entry) nsIterator.next();%0A            try %7B%0A                currentNamespaces.put(nsEntry.getKey(),%0A                    ((ArrayStack) nsEntry.getValue()).peek());%0A            %7D catch (RuntimeException e) %7B%0A                // rethrow, after logging%0A                log.error(e.getMessage(), e);%0A                throw e;%0A            %7D%0A        %7D%0A        return currentNamespaces;%0A    %7D%0A%0A%7D%0A%0A

Add CustomDigester package scoped class, deprecated at the onset. Ideally, this should never be released. Opens the door to better XPath support.