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

java.lang.Object
  |
  +--org.apache.commons.jelly.TagSupport
        |
        +--org.apache.commons.jelly.tags.xml.XPathTagSupport
              |
              +--org.apache.commons.jelly.tags.jsl.StylesheetTag
All Implemented Interfaces:
Tag, XPathSource

public class StylesheetTag
extends XPathTagSupport
implements XPathSource

This tag implements a JSL stylesheet which is similar to an XSLT stylesheet but can use Jelly tags inside it

Version:
$Revision: 1.8 $
Author:
James Strachan

Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
StylesheetTag()
           
 
Method Summary
 void addTemplate(org.dom4j.rule.Rule rule)
          Adds a new template rule to this stylesheet
protected  org.dom4j.rule.Stylesheet createStylesheet(XMLOutput output)
          Factory method to create a new stylesheet
 void doTag(XMLOutput output)
          Evaluates this tag after all the tags properties have been initialized.
 java.lang.String getMode()
          Getter for property mode.
protected  java.lang.Object getSource()
           
 org.dom4j.rule.Stylesheet getStylesheet()
           
 java.lang.Object getXPathSource()
           
 void setMode(java.lang.String mode)
          Sets the mode.
 void setSelect(org.jaxen.XPath select)
          Sets the XPath expression to evaluate.
 void setVar(java.lang.String var)
          Sets the variable name to define for this expression
 
Methods inherited from class org.apache.commons.jelly.tags.xml.XPathTagSupport
getXPathContext
 
Methods inherited from class org.apache.commons.jelly.TagSupport
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
 

Constructor Detail

StylesheetTag

public StylesheetTag()
Method Detail

addTemplate

public void addTemplate(org.dom4j.rule.Rule rule)
Adds a new template rule to this stylesheet

getXPathSource

public java.lang.Object getXPathSource()
Specified by:
getXPathSource in interface XPathSource
Returns:
the current XPath iteration value so that any other XPath aware child tags to use

doTag

public void doTag(XMLOutput output)
           throws java.lang.Exception
Description copied from interface: Tag
Evaluates this tag after all the tags properties have been initialized.

getMode

public java.lang.String getMode()
Getter for property mode.
Returns:
Value of property mode.

setMode

public void setMode(java.lang.String mode)
Sets the mode.
Parameters:
mode - New value of property mode.

getStylesheet

public org.dom4j.rule.Stylesheet getStylesheet()

setVar

public void setVar(java.lang.String var)
Sets the variable name to define for this expression

setSelect

public void setSelect(org.jaxen.XPath select)
Sets the XPath expression to evaluate.

getSource

protected java.lang.Object getSource()
                              throws java.lang.Exception
Returns:
the source on which the stylesheet should run

createStylesheet

protected org.dom4j.rule.Stylesheet createStylesheet(XMLOutput output)
Factory method to create a new stylesheet


Copyright © 2002-2002 Apache Software Foundation. All Rights Reserved.