This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 7137278869f962601ea1c96be357bab808bfdcae Author: Otavio R. Piske <[email protected]> AuthorDate: Sun Apr 3 18:27:45 2022 +0200 CAMEL-17879: removed the deprecated camel-tagsoup component --- bom/camel-bom/pom.xml | 5 - camel-dependencies/pom.xml | 1 - catalog/camel-allcomponents/pom.xml | 4 - .../apache/camel/catalog/dataformats.properties | 1 - .../camel/catalog/dataformats/tidyMarkup.json | 23 -- components/camel-tagsoup/pom.xml | 120 -------- .../tagsoup/TidyMarkupDataFormatConfigurer.java | 30 -- .../apache/camel/configurer/tidyMarkup-dataformat | 2 - .../org/apache/camel/dataformat.properties | 7 - .../org/apache/camel/dataformat/tidyMarkup | 2 - .../camel/dataformat/tagsoup/tidyMarkup.json | 23 -- .../src/main/docs/tidyMarkup-dataformat.adoc | 84 ------ .../dataformat/tagsoup/TidyMarkupDataFormat.java | 320 --------------------- .../tagsoup/TidyMarkupDataFormatAsDomNodeTest.java | 90 ------ .../tagsoup/TidyMarkupDataFormatAsNodeTest.java | 78 ----- .../tagsoup/TidyMarkupDataFormatAsStringTest.java | 76 ----- .../TidyMarkupDataFormatWithUnmarshalTypeTest.java | 37 --- .../dataformat/tagsoup/TidyMarkupTestSupport.java | 77 ----- .../src/test/resources/log4j2.properties | 28 -- .../apache/camel/dataformat/tagsoup/testfile1.html | 38 --- .../dataformat/tagsoup/testfile2-evilHtml.html | 77 ----- components/pom.xml | 1 - .../org/apache/camel/main/dataformats.properties | 1 - .../dataformats/examples/json/tidyMarkup.json | 1 - docs/components/modules/dataformats/nav.adoc | 1 - .../dataformats/pages/tidyMarkup-dataformat.adoc | 1 - parent/pom.xml | 13 - 27 files changed, 1141 deletions(-) diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml index 2a5e7914fba..f34d12b753c 100644 --- a/bom/camel-bom/pom.xml +++ b/bom/camel-bom/pom.xml @@ -1978,11 +1978,6 @@ <artifactId>camel-syslog</artifactId> <version>${project.version}</version> </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-tagsoup</artifactId> - <version>${project.version}</version> - </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-tarfile</artifactId> diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml index bf1d104d6b7..1c3b57ebb06 100644 --- a/camel-dependencies/pom.xml +++ b/camel-dependencies/pom.xml @@ -528,7 +528,6 @@ <swagger-java-parser-version>1.0.56</swagger-java-parser-version> <swagger-java-version>1.6.4</swagger-java-version> <swagger-openapi3-version>2.1.11</swagger-openapi3-version> - <tagsoup-version>1.2.1</tagsoup-version> <templating-maven-plugin-version>1.0.0</templating-maven-plugin-version> <testcontainers-version>1.16.3</testcontainers-version> <tika-version>2.3.0</tika-version> diff --git a/catalog/camel-allcomponents/pom.xml b/catalog/camel-allcomponents/pom.xml index cda8747e6eb..132337bbd07 100644 --- a/catalog/camel-allcomponents/pom.xml +++ b/catalog/camel-allcomponents/pom.xml @@ -1353,10 +1353,6 @@ <groupId>org.apache.camel</groupId> <artifactId>camel-syslog</artifactId> </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-tagsoup</artifactId> - </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-tarfile</artifactId> diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties index e5d337dacfa..251737ada16 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties @@ -36,7 +36,6 @@ soap syslog tarFile thrift -tidyMarkup univocityCsv univocityFixed univocityTsv diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/tidyMarkup.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/tidyMarkup.json deleted file mode 100644 index 26cbfc7f66b..00000000000 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/tidyMarkup.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "dataformat": { - "kind": "dataformat", - "name": "tidyMarkup", - "title": "TidyMarkup", - "description": "Parse (potentially invalid) HTML into valid HTML or DOM.", - "deprecated": false, - "firstVersion": "2.0.0", - "label": "dataformat,transformation", - "javaType": "org.apache.camel.dataformat.tagsoup.TidyMarkupDataFormat", - "supportLevel": "Stable", - "groupId": "org.apache.camel", - "artifactId": "camel-tagsoup", - "version": "3.17.0-SNAPSHOT", - "modelName": "tidyMarkup", - "modelJavaType": "org.apache.camel.model.dataformat.TidyMarkupDataFormat" - }, - "properties": { - "dataObjectType": { "kind": "attribute", "displayName": "Data Object Type", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "org.w3c.dom.Node", "java.lang.String" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "org.w3c.dom.Node", "description": "What data type to unmarshal as, can either be org.w3c.dom.Node or java.lang.String. Is by default org.w3c.dom.Node" }, - "omitXmlDeclaration": { "kind": "attribute", "displayName": "Omit Xml Declaration", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "When returning a String, do we omit the XML declaration in the top." }, - "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" } - } -} diff --git a/components/camel-tagsoup/pom.xml b/components/camel-tagsoup/pom.xml deleted file mode 100644 index 1aa15d4a520..00000000000 --- a/components/camel-tagsoup/pom.xml +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.camel</groupId> - <artifactId>components</artifactId> - <version>3.17.0-SNAPSHOT</version> - </parent> - - <artifactId>camel-tagsoup</artifactId> - <packaging>jar</packaging> - <name>Camel :: TagSoup (deprecated)</name> - <description>Camel TagSoup support</description> - - <properties> - <camel.osgi.import.additional> - org.ccil.cowan.tagsoup.*;version="[1.2,2)" - </camel.osgi.import.additional> - </properties> - - <dependencies> - - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-support</artifactId> - </dependency> - - <dependency> - <groupId>org.ccil.cowan.tagsoup</groupId> - <artifactId>tagsoup</artifactId> - </dependency> - - <!-- test dependencies --> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-test-junit5</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-slf4j-impl</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - - <!-- - The default xalan TransformerFactory when using the ibm jdk is - org.apache.xalan.processor.TransformerFactoryImpl which seems - to add in duplicate namespace declarations, causing the tests - to fail. To work around this issue when we detect we are using - the ibm jdk, we set the TransformerFactory system property to - use the xsltc TransformerFactory as this allows the tests to pass - and this is the factory which is used by the sun jdk by default. - --> - <profiles> - <profile> - <id>ibm-jdk</id> - <activation> - <property> - <name>java.vendor</name> - <value>IBM Corporation</value> - </property> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <failIfNoTests>false</failIfNoTests> - <systemPropertyVariables> - <javax.xml.transform.TransformerFactory> - org.apache.xalan.xsltc.trax.TransformerFactoryImpl - </javax.xml.transform.TransformerFactory> - </systemPropertyVariables> - </configuration> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>xalan</groupId> - <artifactId>xalan</artifactId> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>xml-apis</groupId> - <artifactId>xml-apis</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - </profile> - </profiles> - -</project> diff --git a/components/camel-tagsoup/src/generated/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormatConfigurer.java b/components/camel-tagsoup/src/generated/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormatConfigurer.java deleted file mode 100644 index 30fb422e8c2..00000000000 --- a/components/camel-tagsoup/src/generated/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormatConfigurer.java +++ /dev/null @@ -1,30 +0,0 @@ -/* Generated by camel build tools - do NOT edit this file! */ -package org.apache.camel.dataformat.tagsoup; - -import java.util.HashMap; -import java.util.Map; - -import org.apache.camel.CamelContext; -import org.apache.camel.spi.GeneratedPropertyConfigurer; -import org.apache.camel.support.component.PropertyConfigurerSupport; - -/** - * Generated by camel build tools - do NOT edit this file! - */ -@SuppressWarnings("unchecked") -public class TidyMarkupDataFormatConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer { - - @Override - public boolean configure(CamelContext camelContext, Object target, String name, Object value, boolean ignoreCase) { - TidyMarkupDataFormat dataformat = (TidyMarkupDataFormat) target; - switch (ignoreCase ? name.toLowerCase() : name) { - case "omitxmldeclaration": - case "omitXmlDeclaration": dataformat.setOmitXmlDeclaration(property(camelContext, boolean.class, value)); return true; - case "dataobjecttype": - case "dataObjectType": dataformat.setDataObjectType(property(camelContext, java.lang.Class.class, value)); return true; - default: return false; - } - } - -} - diff --git a/components/camel-tagsoup/src/generated/resources/META-INF/services/org/apache/camel/configurer/tidyMarkup-dataformat b/components/camel-tagsoup/src/generated/resources/META-INF/services/org/apache/camel/configurer/tidyMarkup-dataformat deleted file mode 100644 index d2daa6e105d..00000000000 --- a/components/camel-tagsoup/src/generated/resources/META-INF/services/org/apache/camel/configurer/tidyMarkup-dataformat +++ /dev/null @@ -1,2 +0,0 @@ -# Generated by camel build tools - do NOT edit this file! -class=org.apache.camel.dataformat.tagsoup.TidyMarkupDataFormatConfigurer diff --git a/components/camel-tagsoup/src/generated/resources/META-INF/services/org/apache/camel/dataformat.properties b/components/camel-tagsoup/src/generated/resources/META-INF/services/org/apache/camel/dataformat.properties deleted file mode 100644 index 054a078eded..00000000000 --- a/components/camel-tagsoup/src/generated/resources/META-INF/services/org/apache/camel/dataformat.properties +++ /dev/null @@ -1,7 +0,0 @@ -# Generated by camel build tools - do NOT edit this file! -dataFormats=tidyMarkup -groupId=org.apache.camel -artifactId=camel-tagsoup -version=3.17.0-SNAPSHOT -projectName=Camel :: TagSoup (deprecated) -projectDescription=Camel TagSoup support diff --git a/components/camel-tagsoup/src/generated/resources/META-INF/services/org/apache/camel/dataformat/tidyMarkup b/components/camel-tagsoup/src/generated/resources/META-INF/services/org/apache/camel/dataformat/tidyMarkup deleted file mode 100644 index 878060299eb..00000000000 --- a/components/camel-tagsoup/src/generated/resources/META-INF/services/org/apache/camel/dataformat/tidyMarkup +++ /dev/null @@ -1,2 +0,0 @@ -# Generated by camel build tools - do NOT edit this file! -class=org.apache.camel.dataformat.tagsoup.TidyMarkupDataFormat diff --git a/components/camel-tagsoup/src/generated/resources/org/apache/camel/dataformat/tagsoup/tidyMarkup.json b/components/camel-tagsoup/src/generated/resources/org/apache/camel/dataformat/tagsoup/tidyMarkup.json deleted file mode 100644 index 26cbfc7f66b..00000000000 --- a/components/camel-tagsoup/src/generated/resources/org/apache/camel/dataformat/tagsoup/tidyMarkup.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "dataformat": { - "kind": "dataformat", - "name": "tidyMarkup", - "title": "TidyMarkup", - "description": "Parse (potentially invalid) HTML into valid HTML or DOM.", - "deprecated": false, - "firstVersion": "2.0.0", - "label": "dataformat,transformation", - "javaType": "org.apache.camel.dataformat.tagsoup.TidyMarkupDataFormat", - "supportLevel": "Stable", - "groupId": "org.apache.camel", - "artifactId": "camel-tagsoup", - "version": "3.17.0-SNAPSHOT", - "modelName": "tidyMarkup", - "modelJavaType": "org.apache.camel.model.dataformat.TidyMarkupDataFormat" - }, - "properties": { - "dataObjectType": { "kind": "attribute", "displayName": "Data Object Type", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "org.w3c.dom.Node", "java.lang.String" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "org.w3c.dom.Node", "description": "What data type to unmarshal as, can either be org.w3c.dom.Node or java.lang.String. Is by default org.w3c.dom.Node" }, - "omitXmlDeclaration": { "kind": "attribute", "displayName": "Omit Xml Declaration", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "When returning a String, do we omit the XML declaration in the top." }, - "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" } - } -} diff --git a/components/camel-tagsoup/src/main/docs/tidyMarkup-dataformat.adoc b/components/camel-tagsoup/src/main/docs/tidyMarkup-dataformat.adoc deleted file mode 100644 index 8060e1731f1..00000000000 --- a/components/camel-tagsoup/src/main/docs/tidyMarkup-dataformat.adoc +++ /dev/null @@ -1,84 +0,0 @@ -= TidyMarkup DataFormat -:doctitle: TidyMarkup -:shortname: tidyMarkup -:artifactid: camel-tagsoup -:description: Parse (potentially invalid) HTML into valid HTML or DOM. -:since: 2.0 -:supportlevel: Stable -//Manually maintained attributes -:camel-spring-boot-name: tagsoup - -*Since Camel {since}* - -TidyMarkup is a Data Format that uses the -http://www.ccil.org/~cowan/XML/tagsoup/[TagSoup] to tidy up HTML. It can -be used to parse ugly HTML and return it as pretty wellformed HTML. - -*Camel eats our own -dog food- soap* - -We had some issues in our pdf Manual where we had some -strange symbols. So http://janstey.blogspot.com/[Jonathan] used this -data format to tidy up the wiki html pages that are used as base for -rendering the pdf manuals. And then the mysterious symbols vanished. - -TidyMarkup only supports the *unmarshal* operation -as we really don't want to turn well formed HTML into ugly HTML. - -== TidyMarkup Options - - - -// dataformat options: START -include::partial$dataformat-options.adoc[] -// dataformat options: END - - - - -== Java DSL Example - -An example where the consumer provides some HTML - -[source,java] ---------------------------------------------------------------------------- -from("file://site/inbox").unmarshal().tidyMarkup().to("file://site/blogs"); ---------------------------------------------------------------------------- - -== Spring XML Example - -The following example shows how to use TidyMarkup -to unmarshal using Spring - -[source,java] ------------------------------------------------------------------------ -<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> - <route> - <from uri="file://site/inbox"/> - <unmarshal> - <tidyMarkup/> - </unmarshal> - <to uri="file://site/blogs"/> - </route> -</camelContext> ------------------------------------------------------------------------ - -== Dependencies - -To use TidyMarkup in your camel routes you need to add the a dependency -on *camel-tagsoup* which implements this data format. - -If you use maven you could just add the following to your pom.xml, -substituting the version number for the latest & greatest release (see -the download page for the latest versions). - -[source,java] ----------------------------------------- -<dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-tagsoup</artifactId> - <version>x.x.x</version> -</dependency> ----------------------------------------- - - -include::spring-boot:partial$starter.adoc[] diff --git a/components/camel-tagsoup/src/main/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormat.java b/components/camel-tagsoup/src/main/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormat.java deleted file mode 100644 index 99b5d4ec206..00000000000 --- a/components/camel-tagsoup/src/main/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormat.java +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.dataformat.tagsoup; - -import java.io.InputStream; -import java.io.OutputStream; -import java.io.StringWriter; -import java.io.Writer; -import java.util.Map; -import java.util.Map.Entry; - -import javax.xml.XMLConstants; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMResult; -import javax.xml.transform.sax.SAXSource; - -import org.w3c.dom.Node; - -import org.xml.sax.ContentHandler; -import org.xml.sax.InputSource; -import org.xml.sax.XMLReader; - -import org.apache.camel.CamelException; -import org.apache.camel.Exchange; -import org.apache.camel.spi.DataFormat; -import org.apache.camel.spi.DataFormatName; -import org.apache.camel.spi.annotations.Dataformat; -import org.apache.camel.support.service.ServiceSupport; -import org.apache.camel.util.ObjectHelper; -import org.ccil.cowan.tagsoup.HTMLSchema; -import org.ccil.cowan.tagsoup.Parser; -import org.ccil.cowan.tagsoup.Schema; -import org.ccil.cowan.tagsoup.XMLWriter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Dataformat for TidyMarkup (aka Well formed HTML in XML form.. may or may not be XHTML) This dataformat is intended to - * convert bad HTML from a site (or file) into a well formed HTML document which can then be sent to XSLT or xpath'ed - * on. - */ -@Dataformat("tidyMarkup") -public class TidyMarkupDataFormat extends ServiceSupport implements DataFormat, DataFormatName { - - /* - * Our Logger - */ - private static final Logger LOG = LoggerFactory.getLogger(TidyMarkupDataFormat.class); - - private static final String NO = "no"; - - private static final String YES = "yes"; - - private static final String XML = "xml"; - - /** - * When returning a String, do we omit the XML declaration in the top. - */ - private boolean omitXmlDeclaration; - - /** - * String or Node to return - */ - private Class<?> dataObjectType; - - /** - * What is the default output format ? - */ - private String method; - - /** - * The Schema which we are parsing (default HTMLSchema) - */ - private Schema parsingSchema; - - /** - * User supplied Parser features - * <p> - * {@link http://home.ccil.org/~cowan/XML/tagsoup/#properties} - * {@link http://www.saxproject.org/apidoc/org/xml/sax/package-summary.html} - * </p> - */ - private Map<String, Boolean> parserFeatures; - - /** - * User supplied Parser properties - * <p> - * {@link http://home.ccil.org/~cowan/XML/tagsoup/#properties} - * {@link http://www.saxproject.org/apidoc/org/xml/sax/package-summary.html} - * </p> - */ - private Map<String, Object> parserProperties; - - @Override - public String getDataFormatName() { - return "tidyMarkup"; - } - - /** - * Unsupported operation. We cannot create ugly HTML. - */ - @Override - public void marshal(Exchange exchange, Object object, OutputStream outputStream) throws Exception { - throw new CamelException( - "Marshalling from Well Formed HTML to ugly HTML is not supported." - + " Only unmarshal is supported"); - } - - /** - * Unmarshal the data - */ - @Override - public Object unmarshal(Exchange exchange, InputStream inputStream) throws Exception { - - ObjectHelper.notNull(dataObjectType, "dataObjectType", this); - - if (dataObjectType.isAssignableFrom(Node.class)) { - return asNodeTidyMarkup(inputStream); - } else if (dataObjectType.isAssignableFrom(String.class)) { - return asStringTidyMarkup(inputStream); - } else { - throw new IllegalArgumentException( - "The return type [" + dataObjectType.getCanonicalName() - + "] is unsupported"); - } - } - - /** - * Return the tidy markup as a string - * - * @param inputStream - * @return String of XML - * @throws CamelException - */ - public String asStringTidyMarkup(InputStream inputStream) throws CamelException { - - XMLReader parser = createTagSoupParser(); - StringWriter w = new StringWriter(); - parser.setContentHandler(createContentHandler(w)); - - try { - parser.parse(new InputSource(inputStream)); - return w.toString(); - - } catch (Exception e) { - throw new CamelException("Failed to convert the HTML to tidy Markup", e); - } finally { - try { - inputStream.close(); - } catch (Exception e) { - LOG.warn("Failed to close the inputStream"); - } - } - } - - /** - * Return the HTML Markup as an {@link org.w3c.dom.Node} - * - * @param inputStream The input Stream to convert - * @return org.w3c.dom.Node The HTML Markup as a DOM Node - * @throws CamelException - */ - public Node asNodeTidyMarkup(InputStream inputStream) throws CamelException { - XMLReader parser = createTagSoupParser(); - StringWriter w = new StringWriter(); - parser.setContentHandler(createContentHandler(w)); - - try { - TransformerFactory transformerFactory = TransformerFactory.newInstance(); - transformerFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); - Transformer transformer = transformerFactory.newTransformer(); - DOMResult result = new DOMResult(); - transformer.transform(new SAXSource(parser, new InputSource(inputStream)), result); - return result.getNode(); - } catch (Exception e) { - throw new CamelException("Failed to convert the HTML to tidy Markup", e); - } - } - - /** - * Create the tagSoup Parser - */ - protected XMLReader createTagSoupParser() { - XMLReader reader = new Parser(); - try { - reader.setFeature(Parser.namespacesFeature, false); - reader.setFeature(Parser.namespacePrefixesFeature, false); - - /* - * set each parser feature that the user may have supplied. - * http://www.saxproject.org/apidoc/org/xml/sax/package-summary.html - * http://home.ccil.org/~cowan/XML/tagsoup/#properties - */ - - if (getParserFeatures() != null) { - for (Entry<String, Boolean> e : getParserFeatures().entrySet()) { - reader.setFeature(e.getKey(), e.getValue()); - } - } - - /* - * set each parser feature that the user may have supplied. {@link - * http://home.ccil.org/~cowan/XML/tagsoup/#properties} - */ - - if (getParserProperties() != null) { - for (Entry<String, Object> e : getParserProperties().entrySet()) { - reader.setProperty(e.getKey(), e.getValue()); - } - } - - /* - * default the schema to HTML - */ - if (this.getParsingSchema() != null) { - reader.setProperty(Parser.schemaProperty, getParsingSchema()); - } - - } catch (Exception e) { - throw new IllegalArgumentException("Problem configuring the parser", e); - } - return reader; - } - - protected ContentHandler createContentHandler(Writer w) { - XMLWriter xmlWriter = new XMLWriter(w); - - // we might need to expose more than these two but that is pretty good - // for a default well formed Html generator - if (getMethod() != null) { - xmlWriter.setOutputProperty(XMLWriter.METHOD, getMethod()); - } else { - xmlWriter.setOutputProperty(XMLWriter.METHOD, XML); - } - - if (omitXmlDeclaration) { - xmlWriter.setOutputProperty(XMLWriter.OMIT_XML_DECLARATION, YES); - } else { - xmlWriter.setOutputProperty(XMLWriter.OMIT_XML_DECLARATION, NO); - } - return xmlWriter; - - } - - public void setParsingSchema(Schema schema) { - this.parsingSchema = schema; - } - - public Schema getParsingSchema() { - if (parsingSchema == null) { - this.parsingSchema = new HTMLSchema(); - } - return parsingSchema; - } - - public boolean isOmitXmlDeclaration() { - return omitXmlDeclaration; - } - - public void setOmitXmlDeclaration(boolean omitXmlDeclaration) { - this.omitXmlDeclaration = omitXmlDeclaration; - } - - public void setParserFeatures(Map<String, Boolean> parserFeatures) { - this.parserFeatures = parserFeatures; - } - - public Map<String, Boolean> getParserFeatures() { - return parserFeatures; - } - - public void setParserProperties(Map<String, Object> parserProperties) { - this.parserProperties = parserProperties; - } - - public Map<String, Object> getParserProperties() { - return parserProperties; - } - - public void setMethod(String method) { - this.method = method; - } - - public String getMethod() { - return method; - } - - public Class<?> getDataObjectType() { - return dataObjectType; - } - - public void setDataObjectType(Class<?> dataObjectType) { - this.dataObjectType = dataObjectType; - } - - @Override - protected void doStart() throws Exception { - // noop - } - - @Override - protected void doStop() throws Exception { - // noop - } -} diff --git a/components/camel-tagsoup/src/test/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormatAsDomNodeTest.java b/components/camel-tagsoup/src/test/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormatAsDomNodeTest.java deleted file mode 100644 index ad47e527c62..00000000000 --- a/components/camel-tagsoup/src/test/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormatAsDomNodeTest.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.dataformat.tagsoup; - -import java.io.File; -import java.util.List; - -import org.apache.camel.Exchange; -import org.apache.camel.Message; -import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.component.mock.MockEndpoint; -import org.apache.camel.test.junit5.CamelTestSupport; -import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.fail; - -public class TidyMarkupDataFormatAsDomNodeTest extends CamelTestSupport { - - protected final Logger log = LoggerFactory.getLogger(getClass()); - - @Test - public void testUnMarshalToStringOfXml() throws Exception { - MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class); - resultEndpoint.expectedMessageCount(2); - - /* - * each of these files has a <p>TidyMarkupNode section. (no closing tag) - * - * See the route below, we send the tidyMarkup to xpath and boolean that out. - */ - String badHtml = TidyMarkupTestSupport.loadFileAsString(new File( - "src/test/resources/org/apache/camel/dataformat/tagsoup/testfile1.html")); - String evilHtml = TidyMarkupTestSupport.loadFileAsString(new File( - "src/test/resources/org/apache/camel/dataformat/tagsoup/testfile2-evilHtml.html")); - - template.sendBody("direct:start", badHtml); - template.sendBody("direct:start", evilHtml); - - resultEndpoint.assertIsSatisfied(); - List<Exchange> list = resultEndpoint.getReceivedExchanges(); - for (Exchange exchange : list) { - Message in = exchange.getIn(); - String response = in.getBody(String.class); - - log.debug("Received " + response); - assertNotNull(response, "Should be able to convert received body to a string"); - - try { - /* - * our route xpaths the existence of our signature "<p>TidyMarkupNode" - * but of course, by the xpath time, it is well formed - */ - assertEquals("true", response); - } catch (Exception e) { - - fail("Failed to convert the resulting String to XML: " + e.getLocalizedMessage()); - } - - } - } - - @Override - protected RouteBuilder createRouteBuilder() { - return new RouteBuilder() { - public void configure() { - from("direct:start").unmarshal().tidyMarkup().setBody().xpath( - "boolean(//p[contains(text(),'TidyMarkupNode')])", String.class).to("mock:result"); - } - }; - } - -} diff --git a/components/camel-tagsoup/src/test/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormatAsNodeTest.java b/components/camel-tagsoup/src/test/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormatAsNodeTest.java deleted file mode 100644 index 585ca203d7d..00000000000 --- a/components/camel-tagsoup/src/test/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormatAsNodeTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.dataformat.tagsoup; - -import java.io.File; -import java.util.List; - -import org.w3c.dom.Node; - -import org.apache.camel.Exchange; -import org.apache.camel.Message; -import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.component.mock.MockEndpoint; -import org.apache.camel.test.junit5.CamelTestSupport; -import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.fail; - -public class TidyMarkupDataFormatAsNodeTest extends CamelTestSupport { - - protected final Logger log = LoggerFactory.getLogger(getClass()); - - @Test - public void testUnMarshalToNodeOfXml() throws Exception { - MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class); - resultEndpoint.expectedMessageCount(2); - - String badHtml = TidyMarkupTestSupport.loadFileAsString(new File( - "src/test/resources/org/apache/camel/dataformat/tagsoup/testfile1.html")); - String evilHtml = TidyMarkupTestSupport.loadFileAsString(new File( - "src/test/resources/org/apache/camel/dataformat/tagsoup/testfile2-evilHtml.html")); - - template.sendBody("direct:start", badHtml); - template.sendBody("direct:start", evilHtml); - - resultEndpoint.assertIsSatisfied(); - List<Exchange> list = resultEndpoint.getReceivedExchanges(); - for (Exchange exchange : list) { - try { - Message in = exchange.getIn(); - Node tidyMarkup = in.getBody(Node.class); - - log.debug("Received " + tidyMarkup); - assertNotNull(tidyMarkup, "Should be able to convert received body to a string"); - - } catch (Exception e) { - fail("Failed to convert the resulting String to XML: " + e.getLocalizedMessage()); - } - } - } - - @Override - protected RouteBuilder createRouteBuilder() { - return new RouteBuilder() { - public void configure() { - from("direct:start").unmarshal().tidyMarkup().to("mock:result"); - } - }; - } - -} diff --git a/components/camel-tagsoup/src/test/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormatAsStringTest.java b/components/camel-tagsoup/src/test/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormatAsStringTest.java deleted file mode 100644 index 1d9bcffa9bb..00000000000 --- a/components/camel-tagsoup/src/test/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormatAsStringTest.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.dataformat.tagsoup; - -import java.io.File; -import java.util.List; - -import org.apache.camel.Exchange; -import org.apache.camel.Message; -import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.component.mock.MockEndpoint; -import org.apache.camel.test.junit5.CamelTestSupport; -import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.fail; - -public class TidyMarkupDataFormatAsStringTest extends CamelTestSupport { - - protected final Logger log = LoggerFactory.getLogger(getClass()); - - @Test - public void testUnMarshalToStringOfXml() throws Exception { - MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class); - resultEndpoint.expectedMessageCount(2); - - String badHtml = TidyMarkupTestSupport.loadFileAsString(new File( - "src/test/resources/org/apache/camel/dataformat/tagsoup/testfile1.html")); - String evilHtml = TidyMarkupTestSupport.loadFileAsString(new File( - "src/test/resources/org/apache/camel/dataformat/tagsoup/testfile2-evilHtml.html")); - - template.sendBody("direct:start", badHtml); - template.sendBody("direct:start", evilHtml); - - resultEndpoint.assertIsSatisfied(); - List<Exchange> list = resultEndpoint.getReceivedExchanges(); - for (Exchange exchange : list) { - try { - Message in = exchange.getIn(); - String tidyMarkup = in.getBody(String.class); - - log.debug("Received " + tidyMarkup); - assertNotNull(tidyMarkup, "Should be able to convert received body to a string"); - - } catch (Exception e) { - fail("Failed to convert the resulting String to XML: " + e.getLocalizedMessage()); - } - } - } - - @Override - protected RouteBuilder createRouteBuilder() { - return new RouteBuilder() { - public void configure() { - from("direct:start").unmarshal().tidyMarkup(String.class).to("mock:result"); - } - }; - } - -} diff --git a/components/camel-tagsoup/src/test/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormatWithUnmarshalTypeTest.java b/components/camel-tagsoup/src/test/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormatWithUnmarshalTypeTest.java deleted file mode 100644 index d2ca6b38077..00000000000 --- a/components/camel-tagsoup/src/test/java/org/apache/camel/dataformat/tagsoup/TidyMarkupDataFormatWithUnmarshalTypeTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.dataformat.tagsoup; - -import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.model.dataformat.TidyMarkupDataFormat; - -/* - * This just tests whether this dataformat is available to UnmarshalType - */ -public class TidyMarkupDataFormatWithUnmarshalTypeTest extends TidyMarkupDataFormatAsStringTest { - - @Override - protected RouteBuilder createRouteBuilder() { - return new RouteBuilder() { - public void configure() { - TidyMarkupDataFormat dataFormat = new TidyMarkupDataFormat(String.class); - from("direct:start").unmarshal(dataFormat).to("mock:result"); - } - }; - } - -} diff --git a/components/camel-tagsoup/src/test/java/org/apache/camel/dataformat/tagsoup/TidyMarkupTestSupport.java b/components/camel-tagsoup/src/test/java/org/apache/camel/dataformat/tagsoup/TidyMarkupTestSupport.java deleted file mode 100644 index 61acefe0437..00000000000 --- a/components/camel-tagsoup/src/test/java/org/apache/camel/dataformat/tagsoup/TidyMarkupTestSupport.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.dataformat.tagsoup; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.StringReader; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; - -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -import org.apache.camel.util.IOHelper; - -public final class TidyMarkupTestSupport { - - private TidyMarkupTestSupport() { - // Utility class - } - - public static String loadFileAsString(File file) throws Exception { - StringBuilder fileContent = new StringBuilder(); - BufferedReader input = IOHelper.buffered(new FileReader(file)); - try { - String line = null; - while ((line = input.readLine()) != null) { - fileContent.append(line); - fileContent.append(System.lineSeparator()); - } - } finally { - input.close(); - } - return fileContent.toString(); - } - - /** - * Convert XML String to a Document. - */ - public static Document stringToXml(String xmlString) throws SAXException, IOException, ParserConfigurationException { - return createDocumentBuilder().parse(new InputSource(new StringReader(xmlString))); - } - - /** - * Static to generate a documentBuilder - */ - public static DocumentBuilder createDocumentBuilder() throws ParserConfigurationException { - - DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); - docBuilderFactory.setIgnoringComments(true); - docBuilderFactory.setIgnoringElementContentWhitespace(true); - docBuilderFactory.setCoalescing(true); - docBuilderFactory.setExpandEntityReferences(true); - docBuilderFactory.setNamespaceAware(true); - return docBuilderFactory.newDocumentBuilder(); - } -} diff --git a/components/camel-tagsoup/src/test/resources/log4j2.properties b/components/camel-tagsoup/src/test/resources/log4j2.properties deleted file mode 100644 index 57bb91f422e..00000000000 --- a/components/camel-tagsoup/src/test/resources/log4j2.properties +++ /dev/null @@ -1,28 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -appender.file.type = File -appender.file.name = file -appender.file.fileName = target/camel-atom-test.log -appender.file.layout.type = PatternLayout -appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n -appender.out.type = Console -appender.out.name = out -appender.out.layout.type = PatternLayout -appender.out.layout.pattern = [%30.30t] %-30.30c{1} %-5p %m%n -rootLogger.level = INFO -rootLogger.appenderRef.file.ref = file diff --git a/components/camel-tagsoup/src/test/resources/org/apache/camel/dataformat/tagsoup/testfile1.html b/components/camel-tagsoup/src/test/resources/org/apache/camel/dataformat/tagsoup/testfile1.html deleted file mode 100644 index b6f47074042..00000000000 --- a/components/camel-tagsoup/src/test/resources/org/apache/camel/dataformat/tagsoup/testfile1.html +++ /dev/null @@ -1,38 +0,0 @@ -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<html> - <head> - <title>FooBar</title> - <meta name=metatag value=foo> - </head> - - <body onload="foo()" > - <p> - Some text - - <p> - Some more Text - <p>TidyMarkupNode - <img src=filename.jpg> - - <font color="red">Some red text - - </body> - -</HTML> \ No newline at end of file diff --git a/components/camel-tagsoup/src/test/resources/org/apache/camel/dataformat/tagsoup/testfile2-evilHtml.html b/components/camel-tagsoup/src/test/resources/org/apache/camel/dataformat/tagsoup/testfile2-evilHtml.html deleted file mode 100644 index 35ec6da2c1b..00000000000 --- a/components/camel-tagsoup/src/test/resources/org/apache/camel/dataformat/tagsoup/testfile2-evilHtml.html +++ /dev/null @@ -1,77 +0,0 @@ -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<html> -<META-START> -John Cowan -<TABLE> -<ROW> -<CELL>SOUPE</CELL> -<CELL>BE EVIL!</CELL></ROW> -DE BALISES</TABLE> -<CORR NEW="U" LOC="PI"/> -<G ID="P1"> -Ecritez une balise ouvrante (sans attributs) -</G> -ou fermante HTML ici, s.v.p.</META-START> -<FONT>X Y <p> ABC </FONT> xyz -QRS<sup>TUV<sub>WXY</sup>Z</sub> - -<p>TidyMarkupNode -<script language="javascript"><p></script> -<table><tbody><tr><th>ABC -</table><nr/> -<meta><meta><meta><meta> -<pre xml:space="default">test</pre> -<test xmlns:xml="http://www.example.org/> -</test><hr/> -(add a random HTML tag above) -<r:r:r:test/> - -<b><i></B></I> -<b> - <p>bbb</b></p> - <p>bbb</b></p> - <p>bbb</b></p> -<blink>&grec; -<p xmlns:xqp="http://www.w3.org/1998/XML"> - <span xqp:space="preserve">~~~</span> -</p></blink> -<html:p xmlns:html="http://...."></p> -<@/><!--Apple logo in PUA--> -<!--comment--comment--> -<!--comment--comment> - -<P>]]> -<P id="7" id="8">M</p> -<p xmlns:a="urn" xmlns:b="urn" - a:id="7" b:id="9">~~~</p> -<p id="a" idref="a"/> BE EVIL! -<extreme sID="a" mood="happy"/> -<extreme eID="a" mood="sad"/> -<math><mi>2</mi><msup>3 - </msup></math> <title> -<verse><seg>When,</seg><seg>in</line> -<line>the beginning</line><line>God created -the heaven and the earth.</line></verse> - -<How/><To/><Markup/><Legibly/> -<Name Name="Name">Name</Name> -<list 4 text </p> -<marquee>foo!</marquee> - \ No newline at end of file diff --git a/components/pom.xml b/components/pom.xml index b6c3fd5afb4..70dbbca6fad 100644 --- a/components/pom.xml +++ b/components/pom.xml @@ -315,7 +315,6 @@ <module>camel-swagger-java</module> <module>camel-openapi-java</module> <module>camel-syslog</module> - <module>camel-tagsoup</module> <module>camel-tarfile</module> <module>camel-telegram</module> <module>camel-threadpoolfactory-vertx</module> diff --git a/core/camel-main/src/generated/resources/org/apache/camel/main/dataformats.properties b/core/camel-main/src/generated/resources/org/apache/camel/main/dataformats.properties index e5d337dacfa..251737ada16 100644 --- a/core/camel-main/src/generated/resources/org/apache/camel/main/dataformats.properties +++ b/core/camel-main/src/generated/resources/org/apache/camel/main/dataformats.properties @@ -36,7 +36,6 @@ soap syslog tarFile thrift -tidyMarkup univocityCsv univocityFixed univocityTsv diff --git a/docs/components/modules/dataformats/examples/json/tidyMarkup.json b/docs/components/modules/dataformats/examples/json/tidyMarkup.json deleted file mode 120000 index 3a0286ef42c..00000000000 --- a/docs/components/modules/dataformats/examples/json/tidyMarkup.json +++ /dev/null @@ -1 +0,0 @@ -../../../../../../components/camel-tagsoup/src/generated/resources/org/apache/camel/dataformat/tagsoup/tidyMarkup.json \ No newline at end of file diff --git a/docs/components/modules/dataformats/nav.adoc b/docs/components/modules/dataformats/nav.adoc index 8d0372e0bfb..c29d872a2b4 100644 --- a/docs/components/modules/dataformats/nav.adoc +++ b/docs/components/modules/dataformats/nav.adoc @@ -38,7 +38,6 @@ ** xref:syslog-dataformat.adoc[Syslog] ** xref:tarFile-dataformat.adoc[Tar File] ** xref:thrift-dataformat.adoc[Thrift] -** xref:tidyMarkup-dataformat.adoc[TidyMarkup] ** xref:univocityCsv-dataformat.adoc[uniVocity CSV] ** xref:univocityFixed-dataformat.adoc[uniVocity Fixed Length] ** xref:univocityTsv-dataformat.adoc[uniVocity TSV] diff --git a/docs/components/modules/dataformats/pages/tidyMarkup-dataformat.adoc b/docs/components/modules/dataformats/pages/tidyMarkup-dataformat.adoc deleted file mode 120000 index 6ecab5114a8..00000000000 --- a/docs/components/modules/dataformats/pages/tidyMarkup-dataformat.adoc +++ /dev/null @@ -1 +0,0 @@ -../../../../../components/camel-tagsoup/src/main/docs/tidyMarkup-dataformat.adoc \ No newline at end of file diff --git a/parent/pom.xml b/parent/pom.xml index ce99d4b0577..d8f3dc89cdb 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -516,7 +516,6 @@ <swagger-java-guava-version>27.1-jre</swagger-java-guava-version> <stax-api-version>1.0.1</stax-api-version> <stringtemplate-version>4.3.1</stringtemplate-version> - <tagsoup-version>1.2.1</tagsoup-version> <templating-maven-plugin-version>1.0.0</templating-maven-plugin-version> <testcontainers-version>1.16.3</testcontainers-version> <tika-version>2.3.0</tika-version> @@ -2521,11 +2520,6 @@ <artifactId>camel-syslog</artifactId> <version>${project.version}</version> </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-tagsoup</artifactId> - <version>${project.version}</version> - </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-tarfile</artifactId> @@ -3799,13 +3793,6 @@ <version>${jettison-version}</version> </dependency> - <!-- optional Tagsoup --> - <dependency> - <groupId>org.ccil.cowan.tagsoup</groupId> - <artifactId>tagsoup</artifactId> - <version>${tagsoup-version}</version> - </dependency> - <!-- optional Any23 --> <dependency> <groupId>org.apache.any23</groupId>
