Package com.jclark.xsl.expr

Examples of com.jclark.xsl.expr.DescendantsOrSelfNodeIterator


            if (cache == null) {
                cache = new Cache();
                documentTable.put(root, cache);
                int n = 0;
                for (NodeIterator iter =
                         new DescendantsOrSelfNodeIterator(root);;) {
                    Node tem = iter.next();
                    if (tem == null) {
                        break;
                    }
                    if (from != null && from.matches(tem, context)) {
                        n = 0;
                    } else if (count.matches(tem, context)) {
                        cache.append(tem, n++);
                    }
                }
            }
        }
        else if (node.getType() == Node.ELEMENT) {
            Hashtable elementTable = (Hashtable)documentTable.get(root);
            if (elementTable == null) {
                elementTable = new Hashtable();
                documentTable.put(root, elementTable);
            }
            Name name = node.getName();
            cache = (Cache)elementTable.get(name);
            if (cache == null) {
                cache = new Cache();
                elementTable.put(name, cache);
                int n = 0;
                for (NodeIterator iter = new DescendantsOrSelfNodeIterator(root);;) {
                    Node tem = iter.next();
                    if (tem == null)
                        break;
                    if (from != null && from.matches(tem, context))
                        n = 0;
                    else if (name.equals(tem.getName()) && tem.getType() == Node.ELEMENT)
View Full Code Here

TOP

Related Classes of com.jclark.xsl.expr.DescendantsOrSelfNodeIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.