/** * @see ITagNodeCondition#satisfy(TagNode) */ public boolean satisfy(TagNode tagNode) { // auto-generated node that is not needed. return tagNode.isAutoGenerated() && tagNode.isEmpty(); }
/** * @see org.htmlcleaner.conditional.ITagNodeCondition#satisfy(org.htmlcleaner.TagNode) */ public boolean satisfy(TagNode tagNode) { // auto-generated node that is not needed. return tagNode.isAutoGenerated() && tagNode.isEmpty(); }
private boolean addIfNeededToPruneSet(TagNode tagNode, CleanTimeValues cleanTimeValues) { if ( cleanTimeValues.pruneTagSet != null ) { for(ITagNodeCondition condition: cleanTimeValues.pruneTagSet) { if ( condition.satisfy(tagNode)) { addPruneNode(tagNode, cleanTimeValues); properties.fireConditionModification(condition, tagNode); return true; } } } if ( cleanTimeValues.allowTagSet != null && !cleanTimeValues.allowTagSet.isEmpty() ) { for(ITagNodeCondition condition: cleanTimeValues.allowTagSet) { if ( condition.satisfy(tagNode)) { return false; } } if (!tagNode.isAutoGenerated()) { properties.fireUserDefinedModification(true, tagNode, ErrorType.NotAllowedTag); } addPruneNode(tagNode, cleanTimeValues); return true; } return false; }
private boolean addIfNeededToPruneSet(TagNode tagNode, CleanTimeValues cleanTimeValues) { if (cleanTimeValues.pruneTagSet != null) { for (ITagNodeCondition condition : cleanTimeValues.pruneTagSet) { if (condition.satisfy(tagNode)) { addPruneNode(tagNode, cleanTimeValues); properties.fireConditionModification(condition, tagNode); return true; } } } if (cleanTimeValues.allowTagSet != null && !cleanTimeValues.allowTagSet.isEmpty()) { for (ITagNodeCondition condition : cleanTimeValues.allowTagSet) { if (condition.satisfy(tagNode)) { return false; } } if (!tagNode.isAutoGenerated()) { properties.fireUserDefinedModification(true, tagNode, ErrorType.NotAllowedTag); } addPruneNode(tagNode, cleanTimeValues); return true; } return false; }