- super("active");
- }
-
-
- @Override
- protected ProcessorResult processAttribute(
- Arguments arguments,
- Element element,
- String name
- )
- {
- Configuration configuration = arguments.getConfiguration();
- IStandardExpressionParser parser =
- StandardExpressions.getExpressionParser(configuration);
- String value = element.getAttributeValue(name);
- IStandardExpression expression =
- parser.parseExpression(configuration, arguments, value);
- element.removeAttribute(name);
- if ((Boolean)expression.execute(configuration, arguments))
- {
- // We must not clone the processors, because we remove attributes
- Element strong =
- element.cloneElementNodeWithNewName(element, "strong", false);
- strong.removeAttribute("charset");
- strong.removeAttribute("th:charset");
- strong.removeAttribute("coords");
- strong.removeAttribute("href");
- strong.removeAttribute("th:href");
- strong.removeAttribute("hreflang");
- strong.removeAttribute("th:hreflang");
- strong.removeAttribute("media");
- strong.removeAttribute("th:media");
- strong.removeAttribute("name");
- strong.removeAttribute("th:name");
- strong.removeAttribute("rel");
- strong.removeAttribute("th:rel");
- strong.removeAttribute("ref");
- strong.removeAttribute("th:ref");
- strong.removeAttribute("shape");
- strong.removeAttribute("target");
- strong.removeAttribute("th:target");
- strong.removeAttribute("type");
- strong.removeAttribute("th:type");
- element.clearChildren();
- element.addChild(strong);
- element.getParent().extractChild(element);
- }
- return ProcessorResult.OK;
- }
-
- @Override
- public int getPrecedence()
- {
- return ATTR_PRECEDENCE;