Example usage for org.dom4j.rule Rule setMode

List of usage examples for org.dom4j.rule Rule setMode

Introduction

In this page you can find the example usage for org.dom4j.rule Rule setMode.

Prototype

public void setMode(String mode) 

Source Link

Document

Setter for property mode.

Usage

From source file:org.apache.commons.jelly.tags.jsl.TemplateTag.java

License:Apache License

public void doTag(XMLOutput output) throws JellyTagException {
    StylesheetTag tag = (StylesheetTag) findAncestorWithClass(StylesheetTag.class);
    if (tag == null) {
        throw new JellyTagException("This <template> tag must be used inside a <stylesheet> tag");
    }//from  w w  w.  j a v  a2  s  . c  o  m

    if (log.isDebugEnabled()) {
        log.debug("adding template rule for match: " + match);
    }

    Rule rule = createRule(tag, output);
    if (rule != null && tag != null) {
        rule.setMode(mode);
        tag.addTemplate(rule);
    }
}

From source file:org.apache.taglibs.xtags.xpath.TemplateTag.java

License:Apache License

protected Rule createRule() {
    Rule rule = new Rule(pattern, getAction());
    rule.setMode(mode);
    return rule;
}