Skip to content

Commit

Permalink
New DOMPreserveTransformer. #76
Browse files Browse the repository at this point in the history
  • Loading branch information
essiembre committed Sep 8, 2022
1 parent aeb7c80 commit ac26098
Show file tree
Hide file tree
Showing 7 changed files with 711 additions and 5 deletions.
9 changes: 9 additions & 0 deletions CHANGES.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
</properties>
<body>

<release version="3.0.1" date="2022-??-??">

<action dev="essiembre" type="add" issue="76">
New DOMPreserveTransformer.
</action>

</release>


<release version="3.0.0" date="2022-01-02"
description="Major release. NOT a drop-in replacement for 2.x.">

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</parent>
<groupId>com.norconex.collectors</groupId>
<artifactId>norconex-importer</artifactId>
<version>3.0.0</version>
<version>3.0.1-SNAPSHOT</version>
<name>Norconex Importer</name>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@
import com.norconex.importer.util.DOMUtil;

/**
* <p>Enables deletion of one or more elements matching a given selector
* <p>
* Enables deletion of one or more elements matching a given selector
* from a document content. Applies to HTML, XHTML, or XML document.
* To extract DOM elements into metadata fields, use {@link DOMTagger}
* To deal with DOM elements in metadata fields, use {@link DOMTagger}
* instead.
* </p>
*
Expand Down Expand Up @@ -124,6 +125,7 @@
* @author Pascal Essiembre
* @since 3.0.0
* @see DOMTagger
* @see DOMPreserveTransformer
*/
@SuppressWarnings("javadoc")
public class DOMDeleteTransformer extends AbstractDocumentTransformer {
Expand All @@ -136,7 +138,6 @@ public class DOMDeleteTransformer extends AbstractDocumentTransformer {
* Constructor.
*/
public DOMDeleteTransformer() {
super();
addRestrictions(
CommonRestrictions.domContentTypes(DocMetadata.CONTENT_TYPE));
}
Expand Down Expand Up @@ -209,7 +210,7 @@ public void setSelectors(List<String> selectors) {
}
public void addSelector(String selector) {
if (StringUtils.isNotBlank(selector)) {
this.selectors.add(selector);
selectors.add(selector);
}
}

Expand Down
Loading

0 comments on commit ac26098

Please sign in to comment.