Package org.pdf4j.saxon.instruct

Examples of org.pdf4j.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


    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 in template at line " + t.getLineNumber() + " of " + t.getSystemId());
                }
                r = r.getNext();
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.pdf4j.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.