Package client.net.sf.saxon.ce.trans

Examples of client.net.sf.saxon.ce.trans.StripSpaceRules.addRule()


        while (st.hasMoreTokens()) {
            String s = st.nextToken();
            NodeTest nt;
            if (s.equals("*")) {
                nt = NodeKindTest.ELEMENT;
                stripperRules.addRule(nt, preserve, decl.getModule(), decl.getSourceElement().getLineNumber());

            } else if (s.endsWith(":*")) {
                if (s.length()==2) {
                    compileError("No prefix before ':*'");
                }
View Full Code Here


                    compileError("No prefix before ':*'");
                }
                String prefix = s.substring(0, s.length()-2);
                String uri = getURIForPrefix(prefix, false);
                nt = new NamespaceTest(getNamePool(), Type.ELEMENT, uri);
                stripperRules.addRule(nt, preserve, decl.getModule(), decl.getSourceElement().getLineNumber());

            } else if (s.startsWith("*:")) {
                if (s.length()==2) {
                    compileError("No local name after '*:'");
                }
View Full Code Here

                if (s.length()==2) {
                    compileError("No local name after '*:'");
                }
                String localname = s.substring(2);
                nt = new LocalNameTest(getNamePool(), Type.ELEMENT, localname);
                stripperRules.addRule(nt, preserve, decl.getModule(), decl.getSourceElement().getLineNumber());

            } else {
                String prefix;
                String localName;
                String uri;
View Full Code Here

                    return null;
                }
                NamePool target = getNamePool();
                int nameCode = target.allocate("", uri, localName);
                nt = new NameTest(Type.ELEMENT, nameCode, getNamePool());
                stripperRules.addRule(nt, preserve, decl.getModule(), decl.getSourceElement().getLineNumber());
            }

        }
        return null;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.