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
  • Constructor Details

    • TagReplaceRule

      public TagReplaceRule(String originalTagName, String newTagName)
      Instantiates a new tag replace rule.
      Parameters:
      originalTagName - the original tag name
      newTagName - the new tag name
  • Method Details

    • process

      public void process(Tag tag)
      Description copied from interface: TagRule
      Process.
      Parameters:
      tag - the tag