Package net.sf.saxon.instruct

Examples of net.sf.saxon.instruct.Template


        return true;
    }


    public Expression compile(Executable exec) throws XPathException {
        Template target = null;
        NamespaceResolver nsContext = null;

        if (calledTemplateExpression==null) {
            if (template==null) {
                return null;   // error already reported
View Full Code Here


            RuleAction action = new RuleAction() {
                public void processRule(Rule r) throws XPathException {
                    NodeTest test = r.getPattern().getNodeTest();
                    int kind = test.getPrimitiveType();
                    if (kind == Type.DOCUMENT || kind == Type.ELEMENT) {
                        Template t = (Template)r.getAction();
                        RuleTarget inverse = opt.makeInversion(t, test);
                        r.setAction(inverse);
                    }
                }
            };
View Full Code Here

    public void explainTemplateRules(ExpressionPresenter presenter) {
        for (int i=0; i<ruleDict.length; i++) {
            Rule r = ruleDict[i];
            while (r != null) {
                Template t = (Template)r.getAction();
                int s = presenter.startElement("templateRule");
                presenter.emitAttribute("match", r.getPattern().toString());
                presenter.emitAttribute("precedence", r.getPrecedence()+"");
                presenter.emitAttribute("priority", r.getPriority()+"");
                presenter.emitAttribute("line", t.getLineNumber()+"");
                presenter.emitAttribute("module", t.getSystemId());
                if (t.getBody() != null) {
                    t.getBody().explain(presenter);
                }
                int e = presenter.endElement();
                if (s != e) {
                    throw new IllegalStateException("tree unbalanced");
                }
View Full Code Here

        useTailRecursion = true;
    }


    public Expression compile(Executable exec) throws XPathException {
        Template target = null;
        NamespaceResolver nsContext = null;

        if (calledTemplateExpression==null) {
            if (template==null) {
                return null;   // error already reported
View Full Code Here

TOP

Related Classes of net.sf.saxon.instruct.Template

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.