org.apache.tapestry.script
Class InitRule

java.lang.Object
  |
  +--org.apache.tapestry.util.xml.BaseRule
        |
        +--org.apache.tapestry.script.AbstractTokenRule
              |
              +--org.apache.tapestry.script.InitRule
All Implemented Interfaces:
IRule

public class InitRule
extends org.apache.tapestry.script.AbstractTokenRule

Constructs an org.apache.tapestry.script.InitToken from an <initialization> element, which contains full content.

Since:
3.0
Version:
$Id: InitRule.java,v 1.1 2003/04/25 01:18:31 hlship Exp $
Author:
Howard Lewis Ship

Constructor Summary
InitRule()
           
 
Method Summary
protected  void addTextTokens(IScriptToken token, String text, ILocation location)
          Parses the provided text and converts it into a series of
protected  void addToParent(RuleDirectedParser parser, IScriptToken token)
          Adds a token to its parent, the top object on the stack.
 void content(RuleDirectedParser parser, String content)
          Peeks at the top object on the stack (which must be a IScriptToken), and converts the text into a series of StaticToken and InsertTokens.
 void endElement(RuleDirectedParser parser)
          Invoked just after the rule is popped off the rule stack.
 void startElement(RuleDirectedParser parser, org.xml.sax.Attributes attributes)
          Invoked just after the rule is pushed onto the rule stack.
 
Methods inherited from class org.apache.tapestry.util.xml.BaseRule
getAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InitRule

public InitRule()
Method Detail

endElement

public void endElement(RuleDirectedParser parser)
Description copied from interface: IRule
Invoked just after the rule is popped off the rule stack.
Overrides:
endElement in class BaseRule

startElement

public void startElement(RuleDirectedParser parser,
                         org.xml.sax.Attributes attributes)
Description copied from interface: IRule
Invoked just after the rule is pushed onto the rule stack. Typically, a Rule will use the information to create a new object and push it onto the object stack. If the rule needs to know about the element (rather than the attributes), it may obtain the URI, localName and qName from the parser.
Overrides:
startElement in class BaseRule

addToParent

protected void addToParent(RuleDirectedParser parser,
                           IScriptToken token)
Adds a token to its parent, the top object on the stack.

content

public void content(RuleDirectedParser parser,
                    String content)
Peeks at the top object on the stack (which must be a IScriptToken), and converts the text into a series of StaticToken and InsertTokens.
Overrides:
content in class BaseRule

addTextTokens

protected void addTextTokens(IScriptToken token,
                             String text,
                             ILocation location)
Parses the provided text and converts it into a series of