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

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

public class StylesheetTag
extends org.apache.commons.jelly.xpath.XPathTagSupport
implements org.apache.commons.jelly.xpath.XPathSource

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

Version:
$Revision: 155420 $
Author:
James Strachan

Field Summary
 
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(org.apache.commons.jelly.XMLOutput output)
          Factory method to create a new stylesheet
 void doTag(org.apache.commons.jelly.XMLOutput output)
           
 java.lang.String getMode()
          Getter for property mode.
protected  java.lang.Object getSource()
           
 org.dom4j.rule.Stylesheet getStylesheet()
           
 org.apache.commons.jelly.XMLOutput getStylesheetOutput()
           
 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 setStylesheetOutput(org.apache.commons.jelly.XMLOutput output)
          Sets the XMLOutput to use by the current stylesheet
 void setVar(java.lang.String var)
          Sets the variable name to define for this expression
 
Methods inherited from class org.apache.commons.jelly.xpath.XPathTagSupport
getXPathContext
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, 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

getStylesheetOutput

public org.apache.commons.jelly.XMLOutput getStylesheetOutput()
Returns:
the XMLOutput from the stylesheet if available

setStylesheetOutput

public void setStylesheetOutput(org.apache.commons.jelly.XMLOutput output)
Sets the XMLOutput to use by the current stylesheet


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 org.apache.commons.jelly.xpath.XPathSource
Returns:
the current XPath iteration value so that any other XPath aware child tags to use

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

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 org.jaxen.JaxenException
Returns:
the source on which the stylesheet should run
Throws:
org.jaxen.JaxenException

createStylesheet

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



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