org.apache.commons.jelly.tags.core
Class ParseTag

java.lang.Object
  |
  +--org.apache.commons.jelly.TagSupport
        |
        +--org.apache.commons.jelly.tags.core.ParseTag
All Implemented Interfaces:
Tag

public class ParseTag
extends TagSupport

Parses the output of this tags body or of a given String as a Jelly script then either outputting the Script as a variable or executing the script.

Version:
$Revision: 1.5 $
Author:
James Strachan

Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
ParseTag()
           
 
Method Summary
protected  XMLParser createJellyParser()
          Factory method to create a new Jelly parser
protected  org.xml.sax.XMLReader createXMLReader()
          Factory method to create a new XMLReader
 void doTag(XMLOutput output)
          Evaluates this tag after all the tags properties have been initialized.
 XMLParser getJellyParser()
           
 java.lang.String getText()
          Returns the text to be parsed
 java.lang.String getVar()
          The variable name that will be used for the Document variable created
 org.xml.sax.XMLReader getXMLReader()
           
protected  void parseBody(XMLOutput output)
          Parses the body of this tag and returns the parsed document
protected  void parseText(java.lang.String text)
          Parses the give piece of text as being markup
 void setJellyParser(XMLParser jellyParser)
          Sets the jellyParser.
 void setText(java.lang.String text)
          Sets the text to be parsed by this parser
 void setVar(java.lang.String var)
          Sets the variable name that will be used for the Document variable created
 void setXMLReader(org.xml.sax.XMLReader xmlReader)
          Sets the XMLReader used for parsing
 
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

ParseTag

public ParseTag()
Method Detail

doTag

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

getVar

public java.lang.String getVar()
The variable name that will be used for the Document variable created

setVar

public void setVar(java.lang.String var)
Sets the variable name that will be used for the Document variable created

getText

public java.lang.String getText()
Returns the text to be parsed
Returns:
String

setText

public void setText(java.lang.String text)
Sets the text to be parsed by this parser
Parameters:
text - The text to be parsed by this parser

getXMLReader

public org.xml.sax.XMLReader getXMLReader()
                                   throws javax.xml.parsers.ParserConfigurationException,
                                          org.xml.sax.SAXException
Returns:
the XMLReader used for parsing, creating one lazily if need be

setXMLReader

public void setXMLReader(org.xml.sax.XMLReader xmlReader)
Sets the XMLReader used for parsing

getJellyParser

public XMLParser getJellyParser()
Returns:
XMLParser

setJellyParser

public void setJellyParser(XMLParser jellyParser)
Sets the jellyParser.
Parameters:
jellyParser - The jellyParser to set

createXMLReader

protected org.xml.sax.XMLReader createXMLReader()
                                         throws javax.xml.parsers.ParserConfigurationException,
                                                org.xml.sax.SAXException
Factory method to create a new XMLReader

parseBody

protected void parseBody(XMLOutput output)
                  throws JellyTagException
Parses the body of this tag and returns the parsed document

parseText

protected void parseText(java.lang.String text)
                  throws JellyTagException
Parses the give piece of text as being markup

createJellyParser

protected XMLParser createJellyParser()
Factory method to create a new Jelly parser
Returns:
XMLParser


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