com.opensymphony.module.sitemesh.html.rules
Class TagReplaceRule
java.lang.Object
com.opensymphony.module.sitemesh.html.BasicRule
com.opensymphony.module.sitemesh.html.rules.TagReplaceRule
- All Implemented Interfaces:
- TagRule
public class TagReplaceRule
- extends BasicRule
Very simple rule for replacing all occurences of one tag with another.
For example, to convert all <b> tags to <strong>:
html.addRule(new TagReplaceRule("b", "strong"));
- Author:
- Joe Walnes
Fields inherited from class com.opensymphony.module.sitemesh.html.BasicRule |
context |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
newTagName
private final String newTagName
TagReplaceRule
public TagReplaceRule(String originalTagName,
String newTagName)
process
public void process(Tag tag)
- Specified by:
process
in interface TagRule
- Specified by:
process
in class BasicRule