org.apache.commons.jelly.tags.jsl
Class TemplateTag

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended byorg.apache.commons.jelly.tags.jsl.TemplateTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag, org.apache.commons.jelly.xpath.XPathSource

public class TemplateTag
extends org.apache.commons.jelly.TagSupport
implements org.apache.commons.jelly.xpath.XPathSource

This tag represents a declarative matching rule, similar to the template tag in XSLT.

Version:
$Revision: 1.8 $
Author:
James Strachan

Field Summary
private  org.apache.commons.logging.Log log
          The Log to which logging calls will be made.
private  org.dom4j.rule.Pattern match
          The pattern to match
private  java.lang.String mode
          Holds value of property mode.
private  java.lang.String name
          Holds value of property name.
private  double priority
          Holds value of property priority.
private  java.lang.Object xpathSource
          The source XPath context for any child tags
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
TemplateTag()
           
 
Method Summary
protected  org.dom4j.rule.Action createAction(StylesheetTag tag, org.apache.commons.jelly.XMLOutput output)
           
protected  org.dom4j.rule.Rule createRule(StylesheetTag tag, org.apache.commons.jelly.XMLOutput output)
           
 void doTag(org.apache.commons.jelly.XMLOutput output)
           
 java.lang.String getName()
          Getter for property name.
 double getPriority()
          Getter for property priority.
 java.lang.Object getXPathSource()
           
 void setMatch(org.dom4j.rule.Pattern match)
           
 void setMode(java.lang.String mode)
          Sets the mode.
 void setName(java.lang.String name)
          Sets the name.
 void setPriority(double priority)
          Sets the priority.
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isTrim, setBody, setContext, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private org.apache.commons.logging.Log log
The Log to which logging calls will be made.


name

private java.lang.String name
Holds value of property name.


mode

private java.lang.String mode
Holds value of property mode.


priority

private double priority
Holds value of property priority.


match

private org.dom4j.rule.Pattern match
The pattern to match


xpathSource

private java.lang.Object xpathSource
The source XPath context for any child tags

Constructor Detail

TemplateTag

public TemplateTag()
Method Detail

doTag

public void doTag(org.apache.commons.jelly.XMLOutput output)
           throws org.apache.commons.jelly.JellyTagException
Specified by:
doTag in interface org.apache.commons.jelly.Tag
Throws:
org.apache.commons.jelly.JellyTagException

getXPathSource

public java.lang.Object getXPathSource()
Specified by:
getXPathSource in interface org.apache.commons.jelly.xpath.XPathSource
Returns:
the current XPath value on which relative paths are evaluated

setMatch

public void setMatch(org.dom4j.rule.Pattern match)

getPriority

public double getPriority()
Getter for property priority.

Returns:
Value of property priority.

setPriority

public void setPriority(double priority)
Sets the priority.

Parameters:
priority - New value of property priority.

getName

public java.lang.String getName()
Getter for property name.

Returns:
Value of property name.

setName

public void setName(java.lang.String name)
Sets the name.

Parameters:
name - New value of property name.

setMode

public void setMode(java.lang.String mode)
Sets the mode.

Parameters:
mode - New value of property mode.

createRule

protected org.dom4j.rule.Rule createRule(StylesheetTag tag,
                                         org.apache.commons.jelly.XMLOutput output)

createAction

protected org.dom4j.rule.Action createAction(StylesheetTag tag,
                                             org.apache.commons.jelly.XMLOutput output)