You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/10/18 23:22:46 UTC
[sling-org-apache-sling-commons-html] branch master created (now
c473216)
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git.
at c473216 SLING-7167 Adjust READMEs
This branch includes the following new commits:
new 130767d Add new module containing a html parser.
new eff3e20 Don't import sun.io.
new 3c88335 Use latest parent pom.
new 7326e4c [maven-release-plugin] prepare release org.apache.sling.commons.html-0.9.0
new 026ada7 [maven-release-plugin] prepare for next development iteration
new 41222cd SLING-1203 : Use tagsoup html parser instead of nekohtml
new 6f757ef Export version 1.0.0 of the API
new a75e208 [maven-release-plugin] prepare release org.apache.sling.commons.html-1.0.0
new 15b19e4 [maven-release-plugin] prepare for next development iteration
new fb850e4 SLING-1205 Upgrade all projects to parent POM 8 and use OSGi provided OSGi libraries
new 2b2f0c1 Use released parent pom.
new cca81ae SLING-2150 : Update plugins to use the latest available versions
new f0b2028 Update to recent snapshot
new 15cb64d Using latest released parent pom
new ee7dbca Use latest parent pom in all projects
new 7a7e698 SLING-2480 : Add config for maven-sling-plugin to m2e configuration
new 38276b9 SLING-2363 : Replace JavaDoc SCR annotations with Java SCR annotations
new c59b263 Update to latest parent pom
new a947e27 Use released versions
new 8b2930e Adding mongodb resource provider
new 431c135 Ups.reverting previous changes from 1391017
new f44ee3d Use latest releases and update to new parent pom
new 187b2d6 Update to latest parent pom and use latest releases in launchpad
new 672be89 Correct reactor pom and update to parent pom 16
new b8f3b4a Update to latest parent pom
new 240e2e0 Update to parent pom 18
new 91075fc Update to parent pom v19
new 1b751fb Update to latest parent pom 20
new ffa8434 Update to Sling Parent POM 22 with baselining enabled
new 34c13a1 SLING-4698 - Set parent.relativePath to empty for all modules
new 918656d Update contrib modules to Parent 23
new 08b49ed set parent version to 24 and add empty relativePath where missing
new ed25158 Update the contrib reactor to parent 25
new 1ebab17 Switch to parent pom 26
new fae7ec8 SLING-6783 updates for org.apache.commons.html
new c473216 SLING-7167 Adjust READMEs
The 36 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
--
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].
[sling-org-apache-sling-commons-html] 06/36: SLING-1203 : Use
tagsoup html parser instead of nekohtml
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 41222cd82995a41cccbe698db623fed00bd7c139
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Nov 25 12:28:19 2009 +0000
SLING-1203 : Use tagsoup html parser instead of nekohtml
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@884067 13f79535-47bb-0310-9956-ffa450edef68
---
NOTICE | 2 +
pom.xml | 35 +----
.../apache/sling/commons/html/impl/DOMBuilder.java | 166 +++++++++++++++++++++
.../sling/commons/html/impl/HtmlParserImpl.java | 36 ++++-
.../sling/commons/html/impl/NekohtmlDomParser.java | 62 --------
.../sling/commons/html/impl/NekohtmlSaxParser.java | 73 ---------
6 files changed, 206 insertions(+), 168 deletions(-)
diff --git a/NOTICE b/NOTICE
index 9e87228..be0c7d1 100644
--- a/NOTICE
+++ b/NOTICE
@@ -7,3 +7,5 @@ by Day Software (http://www.day.com/).
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
+This product includes software developed at
+http://home.ccil.org/~cowan/XML/tagsoup/
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 1e9bcad..4f6b247 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,19 +54,13 @@
<extensions>true</extensions>
<configuration>
<instructions>
- <Import-Package>
- !sun.io,*
- </Import-Package>
<Export-Package>
org.apache.sling.commons.html
</Export-Package>
<Private-Package>
- !org.cyberneko.dtd.ant,
org.apache.sling.commons.html.impl,
- org.cyberneko.*,
- org.apache.xerces.parsers.*,org.apache.xerces.xni.parser.*,
- org.apache.html.dom, org.apache.wml, org.apache.xerces.*,
- org.apache.wml.dom, org.apache.xml.serialize, org.apache.xml.resolver.*
+ org.ccil.cowan.tagsoup,
+ org.ccil.cowan.tagsoup.jaxp
</Private-Package>
</instructions>
</configuration>
@@ -89,29 +83,8 @@
<dependencies>
<dependency>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- <version>1.3.04</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>nekohtml</groupId>
- <artifactId>nekohtml</artifactId>
- <version>0.9.5</version>
- </dependency>
- <dependency>
- <groupId>nekohtml</groupId>
- <artifactId>nekodtd</artifactId>
- <version>0.1.11</version>
- </dependency>
- <dependency>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- <version>2.8.1</version>
- </dependency>
- <dependency>
- <groupId>xml-resolver</groupId>
- <artifactId>xml-resolver</artifactId>
+ <groupId>org.ccil.cowan.tagsoup</groupId>
+ <artifactId>tagsoup</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
diff --git a/src/main/java/org/apache/sling/commons/html/impl/DOMBuilder.java b/src/main/java/org/apache/sling/commons/html/impl/DOMBuilder.java
new file mode 100644
index 0000000..375ae9d
--- /dev/null
+++ b/src/main/java/org/apache/sling/commons/html/impl/DOMBuilder.java
@@ -0,0 +1,166 @@
+/*
+ * 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.sling.commons.html.impl;
+
+import java.io.IOException;
+
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TransformerHandler;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+
+/**
+ * The <code>DOMBuilder</code> is a utility class that will generate a W3C
+ * DOM Document from SAX events.
+ *
+ */
+public class DOMBuilder implements ContentHandler, LexicalHandler {
+
+ /** The default transformer factory shared by all instances */
+ private static final SAXTransformerFactory FACTORY = (SAXTransformerFactory) TransformerFactory.newInstance();
+
+ /** The result */
+ private final DOMResult result;
+
+ private final ContentHandler contentHandler;
+ private final LexicalHandler lexicalHandler;
+
+ /**
+ * Construct a new instance of this DOMBuilder.
+ */
+ public DOMBuilder() throws IOException {
+ try {
+ final TransformerHandler handler = FACTORY.newTransformerHandler();
+ this.contentHandler = handler;
+ this.lexicalHandler = handler;
+ this.result = new DOMResult();
+ handler.setResult(this.result);
+ } catch (javax.xml.transform.TransformerException local) {
+ throw (IOException) new IOException("Fatal-Error: Unable to get transformer handler").initCause(local);
+ }
+ }
+
+ /**
+ * Return the newly built Document.
+ */
+ public Document getDocument() {
+ if (this.result.getNode() == null) {
+ return null;
+ } else if (this.result.getNode().getNodeType() == Node.DOCUMENT_NODE) {
+ return (Document) this.result.getNode();
+ } else {
+ return this.result.getNode().getOwnerDocument();
+ }
+ }
+
+ public void setDocumentLocator(Locator locator) {
+ contentHandler.setDocumentLocator(locator);
+ }
+
+ public void startDocument()
+ throws SAXException {
+ contentHandler.startDocument();
+ }
+
+ public void endDocument()
+ throws SAXException {
+ contentHandler.endDocument();
+ }
+
+ public void startPrefixMapping(String prefix, String uri)
+ throws SAXException {
+ contentHandler.startPrefixMapping(prefix, uri);
+ }
+
+ public void endPrefixMapping(String prefix)
+ throws SAXException {
+ contentHandler.endPrefixMapping(prefix);
+ }
+
+ public void startElement(String uri, String loc, String raw, Attributes a)
+ throws SAXException {
+ contentHandler.startElement(uri, loc, raw, a);
+ }
+
+ public void endElement(String uri, String loc, String raw)
+ throws SAXException {
+ contentHandler.endElement(uri, loc, raw);
+ }
+
+ public void characters(char c[], int start, int len)
+ throws SAXException {
+ contentHandler.characters(c, start, len);
+ }
+
+ public void ignorableWhitespace(char c[], int start, int len)
+ throws SAXException {
+ contentHandler.ignorableWhitespace(c, start, len);
+ }
+
+ public void processingInstruction(String target, String data)
+ throws SAXException {
+ contentHandler.processingInstruction(target, data);
+ }
+
+ public void skippedEntity(String name)
+ throws SAXException {
+ contentHandler.skippedEntity(name);
+ }
+
+ public void startDTD(String name, String publicId, String systemId)
+ throws SAXException {
+ lexicalHandler.startDTD(name, publicId, systemId);
+ }
+
+ public void endDTD()
+ throws SAXException {
+ lexicalHandler.endDTD();
+ }
+
+ public void startEntity(String name)
+ throws SAXException {
+ lexicalHandler.startEntity(name);
+ }
+
+ public void endEntity(String name)
+ throws SAXException {
+ lexicalHandler.endEntity(name);
+ }
+
+ public void startCDATA()
+ throws SAXException {
+ lexicalHandler.startCDATA();
+ }
+
+ public void endCDATA()
+ throws SAXException {
+ lexicalHandler.endCDATA();
+ }
+
+ public void comment(char ch[], int start, int len)
+ throws SAXException {
+ lexicalHandler.comment(ch, start, len);
+ }
+}
diff --git a/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java b/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
index cda543e..ed9a28d 100644
--- a/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
+++ b/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
@@ -22,9 +22,12 @@ import java.io.IOException;
import java.io.InputStream;
import org.apache.sling.commons.html.HtmlParser;
+import org.ccil.cowan.tagsoup.Parser;
import org.w3c.dom.Document;
import org.xml.sax.ContentHandler;
+import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
/**
* @scr.component metatype="false"
@@ -38,13 +41,42 @@ public class HtmlParserImpl implements HtmlParser {
*/
public void parse(InputStream stream, String encoding, ContentHandler ch)
throws SAXException {
- NekohtmlSaxParser.parse(stream, encoding, ch);
+ final Parser parser = new Parser();
+ if ( ch instanceof LexicalHandler ) {
+ parser.setProperty("http://xml.org/sax/properties/lexical-handler", ch);
+ }
+ parser.setContentHandler(ch);
+ final InputSource source = new InputSource(stream);
+ source.setEncoding(encoding);
+ try {
+ parser.parse(source);
+ } catch (IOException ioe) {
+ throw new SAXException(ioe);
+ }
}
/**
* @see org.apache.sling.commons.html.HtmlParser#parse(java.lang.String, java.io.InputStream, java.lang.String)
*/
public Document parse(String systemId, InputStream stream, String encoding) throws IOException {
- return NekohtmlDomParser.parse(systemId, stream, encoding);
+ final Parser parser = new Parser();
+
+ final DOMBuilder builder = new DOMBuilder();
+
+ final InputSource source = new InputSource(stream);
+ source.setEncoding(encoding);
+ source.setSystemId(systemId);
+
+ try {
+ parser.setProperty("http://xml.org/sax/properties/lexical-handler", builder);
+ parser.setContentHandler(builder);
+ parser.parse(source);
+ } catch (SAXException se) {
+ if ( se.getCause() instanceof IOException ) {
+ throw (IOException) se.getCause();
+ }
+ throw (IOException) new IOException("Unable to parse xml.").initCause(se);
+ }
+ return builder.getDocument();
}
}
diff --git a/src/main/java/org/apache/sling/commons/html/impl/NekohtmlDomParser.java b/src/main/java/org/apache/sling/commons/html/impl/NekohtmlDomParser.java
deleted file mode 100644
index 4bbe349..0000000
--- a/src/main/java/org/apache/sling/commons/html/impl/NekohtmlDomParser.java
+++ /dev/null
@@ -1,62 +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.sling.commons.html.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.apache.xerces.parsers.AbstractDOMParser;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.cyberneko.html.HTMLConfiguration;
-import org.w3c.dom.Document;
-
-/**
- * DOM Parser based on the neko html parser.
- */
-public class NekohtmlDomParser extends AbstractDOMParser {
-
- public NekohtmlDomParser(Properties properties) {
- super(getConfig(properties));
- }
-
- protected static HTMLConfiguration getConfig(Properties properties) {
- final HTMLConfiguration config = new HTMLConfiguration();
- config.setProperty("http://cyberneko.org/html/properties/names/elems", "lower");
- if (properties != null) {
- for (Iterator<Object> i = properties.keySet().iterator(); i.hasNext();) {
- final String name = i.next().toString();
- config.setProperty(name, properties.getProperty(name));
- }
- }
- return config;
- }
-
- /**
- * Parse html.
- */
- public static Document parse(String systemId, InputStream stream, String encoding)
- throws IOException {
- final NekohtmlDomParser parser = new NekohtmlDomParser(null);
- XMLInputSource source = new XMLInputSource(null, systemId, null, stream, encoding);
- parser.parse(source);
- return parser.getDocument();
- }
-}
diff --git a/src/main/java/org/apache/sling/commons/html/impl/NekohtmlSaxParser.java b/src/main/java/org/apache/sling/commons/html/impl/NekohtmlSaxParser.java
deleted file mode 100644
index 5eba383..0000000
--- a/src/main/java/org/apache/sling/commons/html/impl/NekohtmlSaxParser.java
+++ /dev/null
@@ -1,73 +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.sling.commons.html.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.apache.xerces.parsers.AbstractSAXParser;
-import org.cyberneko.html.HTMLConfiguration;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.ext.LexicalHandler;
-
-/**
- * SAX Parser based on the neko html parser.
- */
-public class NekohtmlSaxParser extends AbstractSAXParser {
-
- public NekohtmlSaxParser(Properties properties) {
- super(getConfig(properties));
- }
-
- protected static HTMLConfiguration getConfig(Properties properties) {
- final HTMLConfiguration config = new HTMLConfiguration();
- config.setProperty("http://cyberneko.org/html/properties/names/elems", "lower");
- if (properties != null) {
- for (Iterator<Object> i = properties.keySet().iterator(); i.hasNext();) {
- final String name = i.next().toString();
- config.setProperty(name, properties.getProperty(name));
- }
- }
- return config;
- }
-
- /**
- * Parse html.
- */
- public static void parse(InputStream stream, String encoding, ContentHandler ch) throws SAXException {
- final NekohtmlSaxParser parser = new NekohtmlSaxParser(null);
- parser.setContentHandler(ch);
- if (ch instanceof LexicalHandler) {
- parser.setLexicalHandler((LexicalHandler) ch);
- }
- final InputSource is = new InputSource(stream);
- if ( encoding != null ) {
- is.setEncoding(encoding);
- }
- try {
- parser.parse(is);
- } catch (IOException ioe) {
- throw new SAXException("Error during parsing of html markup.", ioe);
- }
- }
-}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 20/36: Adding mongodb
resource provider
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 8b2930eafb08ce7af06308ca5eef31526563ecd4
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Sep 27 14:03:30 2012 +0000
Adding mongodb resource provider
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1391017 13f79535-47bb-0310-9956-ffa450edef68
---
src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java b/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
index d3cd9b8..43dbc1c 100644
--- a/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
+++ b/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
@@ -35,6 +35,9 @@ import org.xml.sax.ext.LexicalHandler;
@Service(value=HtmlParser.class)
public class HtmlParserImpl implements HtmlParser {
+ private void test() {
+ BundleContext bundleContext = null;
+ }
/**
* @see org.apache.sling.commons.html.HtmlParser#parse(java.io.InputStream, java.lang.String, org.xml.sax.ContentHandler)
*/
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 23/36: Update to latest
parent pom and use latest releases in launchpad
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 187b2d62005f172b1ece2b380ea126d20c1854ea
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Feb 18 08:38:52 2013 +0000
Update to latest parent pom and use latest releases in launchpad
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1447147 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index de969b0..3ee19a4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>14</version>
+ <version>15</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 05/36: [maven-release-plugin]
prepare for next development iteration
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 026ada78c06135c397a64da8c55cdbfff01ec268
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Sep 29 13:22:24 2009 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@819937 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 56fcf7b..1e9bcad 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
</parent>
<artifactId>org.apache.sling.commons.html</artifactId>
- <version>0.9.0</version>
+ <version>0.9.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache Sling Commons HTML Utilities</name>
@@ -37,9 +37,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.html-0.9.0</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.html-0.9.0</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.commons.html-0.9.0</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/commons/html</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/html</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/contrib/commons/html</url>
</scm>
<build>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 27/36: Update to parent pom
v19
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 91075fcb01b8cc2cff66423edbfcfd5ee9af04f3
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Mar 31 14:39:20 2014 +0000
Update to parent pom v19
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1583337 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 4041ffe..d113dec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>18</version>
+ <version>19</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 12/36: SLING-2150 : Update
plugins to use the latest available versions
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit cca81aec41da2ab2b9a5f21004984f55fca3d913
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Jul 20 12:21:40 2011 +0000
SLING-2150 : Update plugins to use the latest available versions
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1148722 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index babb177..2f6ba8f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>9</version>
+ <version>11-SNAPSHOT</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 36/36: SLING-7167 Adjust
READMEs
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit c47321635c255fa08afba19a19c34601198c45b9
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Oct 3 10:02:08 2017 +0000
SLING-7167 Adjust READMEs
add uniform header linking to Sling project
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810887 13f79535-47bb-0310-9956-ffa450edef68
---
README.md | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 106367a..1ad5665 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,8 @@
-# current settings and their default values
+# Apache Sling Commons HTML Utilities
+
+This module is part of the [Apache Sling](https://sling.apache.org) project.
+
+current settings and their default values
* http://xml.org/sax/features/namespaces=true
* http://xml.org/sax/features/namespace-prefixes=false
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 03/36: Use latest parent pom.
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 3c883351caa4f846880ecf30383bc546bb5a7afc
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Sep 29 13:01:59 2009 +0000
Use latest parent pom.
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@819913 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 540ed5a..0af9d04 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>6</version>
+ <version>7</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 11/36: Use released parent
pom.
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 2b2f0c19cf1ffebbaec3d39dc3fdf1344e7393d2
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon May 17 13:42:29 2010 +0000
Use released parent pom.
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@945149 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 6ff1efe..babb177 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>8</version>
+ <version>9</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 21/36: Ups.reverting previous
changes from 1391017
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 431c1354124cced0dd3c43cf3518a50c85585186
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Sep 27 14:26:53 2012 +0000
Ups.reverting previous changes from 1391017
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1391030 13f79535-47bb-0310-9956-ffa450edef68
---
src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java b/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
index 43dbc1c..d3cd9b8 100644
--- a/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
+++ b/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
@@ -35,9 +35,6 @@ import org.xml.sax.ext.LexicalHandler;
@Service(value=HtmlParser.class)
public class HtmlParserImpl implements HtmlParser {
- private void test() {
- BundleContext bundleContext = null;
- }
/**
* @see org.apache.sling.commons.html.HtmlParser#parse(java.io.InputStream, java.lang.String, org.xml.sax.ContentHandler)
*/
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 24/36: Correct reactor pom
and update to parent pom 16
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 672be89eac76f7774b59fd3476adf299e87add7e
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun May 5 14:38:24 2013 +0000
Correct reactor pom and update to parent pom 16
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1479333 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 3ee19a4..1f455aa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>15</version>
+ <version>16</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 30/36: SLING-4698 - Set
parent.relativePath to empty for all modules
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 34c13a18959665b0c952c44ab69d2464a162c833
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu May 7 10:14:40 2015 +0000
SLING-4698 - Set parent.relativePath to empty for all modules
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1678154 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 18f6d97..111d0cd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
<version>22</version>
- <relativePath>../../../parent/pom.xml</relativePath>
+ <relativePath/>
</parent>
<artifactId>org.apache.sling.commons.html</artifactId>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 26/36: Update to parent pom 18
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 240e2e0f8d8acdd603ffd1343c52e740407cb254
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Sep 6 12:15:57 2013 +0000
Update to parent pom 18
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1520554 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 8634772..4041ffe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>17</version>
+ <version>18</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 16/36: SLING-2480 : Add
config for maven-sling-plugin to m2e configuration
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 7a7e6981b577a89689d97aadeda624bcae036193
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed May 16 07:39:13 2012 +0000
SLING-2480 : Add config for maven-sling-plugin to m2e configuration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1339038 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index d9497a0..270cb07 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>12</version>
+ <version>13-SNAPSHOT</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 34/36: Switch to parent pom 26
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 1ebab1729d87ecf578a3a0833f5fd275cfe3abaa
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun Jan 3 14:07:46 2016 +0000
Switch to parent pom 26
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1722720 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index d4f6b42..97eddd9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>25</version>
+ <version>26</version>
<relativePath/>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 31/36: Update contrib modules
to Parent 23
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 918656d52b4f6838adff8c8b8e0646ba15498b55
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jun 25 13:10:59 2015 +0000
Update contrib modules to Parent 23
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1687503 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 111d0cd..6e2f335 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>22</version>
+ <version>23</version>
<relativePath/>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 19/36: Use released versions
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit a947e275c21ff4ba714ebbc2ba2c307496ec601f
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Jul 10 11:07:18 2012 +0000
Use released versions
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1359601 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 913cbc0..703d7b0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>14-SNAPSHOT</version>
+ <version>13</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 13/36: Update to recent
snapshot
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit f0b20288bbe2d1c0926d9610b9978d7372e4a8ea
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Aug 3 09:01:37 2011 +0000
Update to recent snapshot
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1153397 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 2f6ba8f..97dda6e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>11-SNAPSHOT</version>
+ <version>12-SNAPSHOT</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 28/36: Update to latest
parent pom 20
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 1b751fbe8c0b105ea02ce4ba7fc64d3e0b0c812c
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Sep 2 14:49:00 2014 +0000
Update to latest parent pom 20
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1622026 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index d113dec..a65a043 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>19</version>
+ <version>20</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 22/36: Use latest releases
and update to new parent pom
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit f44ee3d169673ccf2d6e42bcf5290641aeca82a0
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun Dec 23 06:53:35 2012 +0000
Use latest releases and update to new parent pom
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1425425 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 703d7b0..de969b0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>13</version>
+ <version>14</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 15/36: Use latest parent pom
in all projects
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit ee7dbca457ac6650a6e00983790d5b62ac0e399f
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Apr 3 11:15:41 2012 +0000
Use latest parent pom in all projects
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1308819 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 41f450c..d9497a0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>11</version>
+ <version>12</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 04/36: [maven-release-plugin]
prepare release org.apache.sling.commons.html-0.9.0
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 7326e4c2ba48a2360fd3cf0ca9ee870252d67060
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Sep 29 13:21:03 2009 +0000
[maven-release-plugin] prepare release org.apache.sling.commons.html-0.9.0
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@819934 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 0af9d04..56fcf7b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
</parent>
<artifactId>org.apache.sling.commons.html</artifactId>
- <version>0.9.0-SNAPSHOT</version>
+ <version>0.9.0</version>
<packaging>bundle</packaging>
<name>Apache Sling Commons HTML Utilities</name>
@@ -37,9 +37,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/commons/html</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/html</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/trunk/contrib/commons/html</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.html-0.9.0</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.html-0.9.0</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.commons.html-0.9.0</url>
</scm>
<build>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 01/36: Add new module
containing a html parser.
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 130767dad9d07fce2ecd67c0cee7d1e5b5c299c7
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Aug 18 07:57:23 2009 +0000
Add new module containing a html parser.
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@805308 13f79535-47bb-0310-9956-ffa450edef68
---
LICENSE | 202 +++++++++++++++++++++
NOTICE | 9 +
pom.xml | 115 ++++++++++++
.../org/apache/sling/commons/html/HtmlParser.java | 51 ++++++
.../sling/commons/html/impl/HtmlParserImpl.java | 50 +++++
.../sling/commons/html/impl/NekohtmlDomParser.java | 62 +++++++
.../sling/commons/html/impl/NekohtmlSaxParser.java | 73 ++++++++
src/main/resources/META-INF/LICENSE | 202 +++++++++++++++++++++
src/main/resources/META-INF/NOTICE | 9 +
9 files changed, 773 insertions(+)
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..9e87228
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,9 @@
+Apache Sling Commons HTML
+Copyright 2009 The Apache Software Foundation
+
+Apache Sling is based on source code originally developed
+by Day Software (http://www.day.com/).
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..02ed01a
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.sling</groupId>
+ <artifactId>sling</artifactId>
+ <version>6</version>
+ <relativePath>../../../parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>org.apache.sling.commons.html</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+
+ <name>Apache Sling Commons HTML Utilities</name>
+ <description>
+ The Sling Commons HTML bundle provides utility classes for parsing and creating HTML.
+ </description>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/commons/html</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/html</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/contrib/commons/html</url>
+ </scm>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-scr-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Export-Package>
+ org.apache.sling.commons.html
+ </Export-Package>
+ <Private-Package>
+ !org.cyberneko.dtd.ant,
+ org.apache.sling.commons.html.impl,
+ org.cyberneko.*,
+ org.apache.xerces.parsers.*,org.apache.xerces.xni.parser.*,
+ org.apache.html.dom, org.apache.wml, org.apache.xerces.*,
+ org.apache.wml.dom, org.apache.xml.serialize, org.apache.xml.resolver.*
+ </Private-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <excludePackageNames>
+ org.apache.sling.commons.html.impl
+ </excludePackageNames>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <dependencies>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>1.3.04</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>nekohtml</groupId>
+ <artifactId>nekohtml</artifactId>
+ <version>0.9.5</version>
+ </dependency>
+ <dependency>
+ <groupId>nekohtml</groupId>
+ <artifactId>nekodtd</artifactId>
+ <version>0.1.11</version>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>xml-resolver</groupId>
+ <artifactId>xml-resolver</artifactId>
+ <version>1.2</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/src/main/java/org/apache/sling/commons/html/HtmlParser.java b/src/main/java/org/apache/sling/commons/html/HtmlParser.java
new file mode 100644
index 0000000..1d0887d
--- /dev/null
+++ b/src/main/java/org/apache/sling/commons/html/HtmlParser.java
@@ -0,0 +1,51 @@
+/*
+ * 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.sling.commons.html;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.w3c.dom.Document;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/**
+ * The html parser is a service to parse html and generate
+ * SAX events or a Document out of the html.
+ *
+ */
+public interface HtmlParser {
+
+ /**
+ * Parse html and send sax events.
+ * @param stream The input stream
+ * @param encoding Encoding of the input stream, <code>null</code>for default encoding.
+ * @param ch Content handler receiving the SAX events. The content handler might also
+ * implement the lexical handler interface.
+ */
+ void parse(InputStream stream, String encoding, ContentHandler ch) throws SAXException;
+
+ /**
+ * Parse html and return a DOM Document.
+ * @param The system id
+ * @param stream The input stream
+ * @param encoding Encoding of the input stream, <code>null</code>for default encoding.
+ */
+ Document parse(String systemId, InputStream stream, String encoding) throws IOException;
+}
diff --git a/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java b/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
new file mode 100644
index 0000000..cda543e
--- /dev/null
+++ b/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
@@ -0,0 +1,50 @@
+/*
+ * 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.sling.commons.html.impl;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.sling.commons.html.HtmlParser;
+import org.w3c.dom.Document;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/**
+ * @scr.component metatype="false"
+ * @scr.service interface="HtmlParser"
+ *
+ */
+public class HtmlParserImpl implements HtmlParser {
+
+ /**
+ * @see org.apache.sling.commons.html.HtmlParser#parse(java.io.InputStream, java.lang.String, org.xml.sax.ContentHandler)
+ */
+ public void parse(InputStream stream, String encoding, ContentHandler ch)
+ throws SAXException {
+ NekohtmlSaxParser.parse(stream, encoding, ch);
+ }
+
+ /**
+ * @see org.apache.sling.commons.html.HtmlParser#parse(java.lang.String, java.io.InputStream, java.lang.String)
+ */
+ public Document parse(String systemId, InputStream stream, String encoding) throws IOException {
+ return NekohtmlDomParser.parse(systemId, stream, encoding);
+ }
+}
diff --git a/src/main/java/org/apache/sling/commons/html/impl/NekohtmlDomParser.java b/src/main/java/org/apache/sling/commons/html/impl/NekohtmlDomParser.java
new file mode 100644
index 0000000..4bbe349
--- /dev/null
+++ b/src/main/java/org/apache/sling/commons/html/impl/NekohtmlDomParser.java
@@ -0,0 +1,62 @@
+/*
+ * 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.sling.commons.html.impl;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Iterator;
+import java.util.Properties;
+
+import org.apache.xerces.parsers.AbstractDOMParser;
+import org.apache.xerces.xni.parser.XMLInputSource;
+import org.cyberneko.html.HTMLConfiguration;
+import org.w3c.dom.Document;
+
+/**
+ * DOM Parser based on the neko html parser.
+ */
+public class NekohtmlDomParser extends AbstractDOMParser {
+
+ public NekohtmlDomParser(Properties properties) {
+ super(getConfig(properties));
+ }
+
+ protected static HTMLConfiguration getConfig(Properties properties) {
+ final HTMLConfiguration config = new HTMLConfiguration();
+ config.setProperty("http://cyberneko.org/html/properties/names/elems", "lower");
+ if (properties != null) {
+ for (Iterator<Object> i = properties.keySet().iterator(); i.hasNext();) {
+ final String name = i.next().toString();
+ config.setProperty(name, properties.getProperty(name));
+ }
+ }
+ return config;
+ }
+
+ /**
+ * Parse html.
+ */
+ public static Document parse(String systemId, InputStream stream, String encoding)
+ throws IOException {
+ final NekohtmlDomParser parser = new NekohtmlDomParser(null);
+ XMLInputSource source = new XMLInputSource(null, systemId, null, stream, encoding);
+ parser.parse(source);
+ return parser.getDocument();
+ }
+}
diff --git a/src/main/java/org/apache/sling/commons/html/impl/NekohtmlSaxParser.java b/src/main/java/org/apache/sling/commons/html/impl/NekohtmlSaxParser.java
new file mode 100644
index 0000000..5eba383
--- /dev/null
+++ b/src/main/java/org/apache/sling/commons/html/impl/NekohtmlSaxParser.java
@@ -0,0 +1,73 @@
+/*
+ * 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.sling.commons.html.impl;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Iterator;
+import java.util.Properties;
+
+import org.apache.xerces.parsers.AbstractSAXParser;
+import org.cyberneko.html.HTMLConfiguration;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+
+/**
+ * SAX Parser based on the neko html parser.
+ */
+public class NekohtmlSaxParser extends AbstractSAXParser {
+
+ public NekohtmlSaxParser(Properties properties) {
+ super(getConfig(properties));
+ }
+
+ protected static HTMLConfiguration getConfig(Properties properties) {
+ final HTMLConfiguration config = new HTMLConfiguration();
+ config.setProperty("http://cyberneko.org/html/properties/names/elems", "lower");
+ if (properties != null) {
+ for (Iterator<Object> i = properties.keySet().iterator(); i.hasNext();) {
+ final String name = i.next().toString();
+ config.setProperty(name, properties.getProperty(name));
+ }
+ }
+ return config;
+ }
+
+ /**
+ * Parse html.
+ */
+ public static void parse(InputStream stream, String encoding, ContentHandler ch) throws SAXException {
+ final NekohtmlSaxParser parser = new NekohtmlSaxParser(null);
+ parser.setContentHandler(ch);
+ if (ch instanceof LexicalHandler) {
+ parser.setLexicalHandler((LexicalHandler) ch);
+ }
+ final InputSource is = new InputSource(stream);
+ if ( encoding != null ) {
+ is.setEncoding(encoding);
+ }
+ try {
+ parser.parse(is);
+ } catch (IOException ioe) {
+ throw new SAXException("Error during parsing of html markup.", ioe);
+ }
+ }
+}
diff --git a/src/main/resources/META-INF/LICENSE b/src/main/resources/META-INF/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/src/main/resources/META-INF/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
diff --git a/src/main/resources/META-INF/NOTICE b/src/main/resources/META-INF/NOTICE
new file mode 100644
index 0000000..9e87228
--- /dev/null
+++ b/src/main/resources/META-INF/NOTICE
@@ -0,0 +1,9 @@
+Apache Sling Commons HTML
+Copyright 2009 The Apache Software Foundation
+
+Apache Sling is based on source code originally developed
+by Day Software (http://www.day.com/).
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 09/36: [maven-release-plugin]
prepare for next development iteration
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 15b19e43975fa95cd246dfac157dc9e29fdefdfd
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Nov 26 15:36:59 2009 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@884590 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 7bfdf05..c1c941e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
</parent>
<artifactId>org.apache.sling.commons.html</artifactId>
- <version>1.0.0</version>
+ <version>1.0.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache Sling Commons HTML Utilities</name>
@@ -37,9 +37,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.html-1.0.0</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.html-1.0.0</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.commons.html-1.0.0</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/commons/html</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/html</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/contrib/commons/html</url>
</scm>
<build>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 25/36: Update to latest
parent pom
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit b8f3b4ab7cfa29c752294c4b261a026a02b1447c
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Jul 19 07:04:15 2013 +0000
Update to latest parent pom
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1504788 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 1f455aa..8634772 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>16</version>
+ <version>17</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 08/36: [maven-release-plugin]
prepare release org.apache.sling.commons.html-1.0.0
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit a75e2083ee9a24edcefbc1b5ded4429a72d9a10b
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Nov 26 15:35:56 2009 +0000
[maven-release-plugin] prepare release org.apache.sling.commons.html-1.0.0
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@884586 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 2051bc9..7bfdf05 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
</parent>
<artifactId>org.apache.sling.commons.html</artifactId>
- <version>0.9.1-SNAPSHOT</version>
+ <version>1.0.0</version>
<packaging>bundle</packaging>
<name>Apache Sling Commons HTML Utilities</name>
@@ -37,9 +37,9 @@
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/commons/html</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/html</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/trunk/contrib/commons/html</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.html-1.0.0</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.html-1.0.0</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.commons.html-1.0.0</url>
</scm>
<build>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 17/36: SLING-2363 : Replace
JavaDoc SCR annotations with Java SCR annotations
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 38276b9722e9b50daa2db6dd855e83378efa7f7e
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Jul 4 07:40:20 2012 +0000
SLING-2363 : Replace JavaDoc SCR annotations with Java SCR annotations
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1357127 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 4 ++++
.../java/org/apache/sling/commons/html/impl/HtmlParserImpl.java | 9 ++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index 270cb07..f7b4281 100644
--- a/pom.xml
+++ b/pom.xml
@@ -87,5 +87,9 @@
<artifactId>tagsoup</artifactId>
<version>1.2</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.scr.annotations</artifactId>
+ </dependency>
</dependencies>
</project>
diff --git a/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java b/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
index ed9a28d..d3cd9b8 100644
--- a/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
+++ b/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
@@ -21,6 +21,8 @@ package org.apache.sling.commons.html.impl;
import java.io.IOException;
import java.io.InputStream;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;
import org.apache.sling.commons.html.HtmlParser;
import org.ccil.cowan.tagsoup.Parser;
import org.w3c.dom.Document;
@@ -29,11 +31,8 @@ import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.ext.LexicalHandler;
-/**
- * @scr.component metatype="false"
- * @scr.service interface="HtmlParser"
- *
- */
+@Component
+@Service(value=HtmlParser.class)
public class HtmlParserImpl implements HtmlParser {
/**
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 29/36: Update to Sling Parent
POM 22 with baselining enabled
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit ffa84348400276444f82146e92ef9cb7720402aa
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Oct 1 06:52:29 2014 +0000
Update to Sling Parent POM 22 with baselining enabled
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1628620 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index a65a043..18f6d97 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>20</version>
+ <version>22</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 14/36: Using latest released
parent pom
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 15cb64d36794ad98cc949c1c5a79c08d2cacf0be
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Aug 8 11:31:38 2011 +0000
Using latest released parent pom
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1154924 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 97dda6e..41f450c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>12-SNAPSHOT</version>
+ <version>11</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 02/36: Don't import sun.io.
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit eff3e2010fe30af8418d56920ee208426b6481e4
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Aug 18 14:31:12 2009 +0000
Don't import sun.io.
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@805428 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pom.xml b/pom.xml
index 02ed01a..540ed5a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,6 +54,9 @@
<extensions>true</extensions>
<configuration>
<instructions>
+ <Import-Package>
+ !sun.io,*
+ </Import-Package>
<Export-Package>
org.apache.sling.commons.html
</Export-Package>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 07/36: Export version 1.0.0
of the API
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 6f757efb4abf7a9c465491e6912e41c3b6806e7a
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Nov 26 15:34:37 2009 +0000
Export version 1.0.0 of the API
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@884584 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 4f6b247..2051bc9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,7 +55,7 @@
<configuration>
<instructions>
<Export-Package>
- org.apache.sling.commons.html
+ org.apache.sling.commons.html;version=1.0.0
</Export-Package>
<Private-Package>
org.apache.sling.commons.html.impl,
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 32/36: set parent version to
24 and add empty relativePath where missing
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit 08b49ed133b267ed588c5bc8215b2ac539122aa5
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jul 7 07:36:29 2015 +0000
set parent version to 24 and add empty relativePath where missing
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1689588 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 6e2f335..c03aa34 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>23</version>
+ <version>24</version>
<relativePath/>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 35/36: SLING-6783 updates for
org.apache.commons.html
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit fae7ec857766e4a2adb0acdaaa1fad3624c07271
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Apr 24 07:34:50 2017 +0000
SLING-6783 updates for org.apache.commons.html
Submitted-By: Jason Bailey
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1792430 13f79535-47bb-0310-9956-ffa450edef68
---
NOTICE | 2 +-
README.md | 39 ++++++++++++++++++++++
pom.xml | 14 ++++----
.../sling/commons/html/impl/HtmlParserImpl.java | 36 ++++++++++++++++++--
4 files changed, 79 insertions(+), 12 deletions(-)
diff --git a/NOTICE b/NOTICE
index be0c7d1..92f43bf 100644
--- a/NOTICE
+++ b/NOTICE
@@ -8,4 +8,4 @@ This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
This product includes software developed at
-http://home.ccil.org/~cowan/XML/tagsoup/
\ No newline at end of file
+http://vrici.lojban.org/~cowan/XML/tagsoup/
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..106367a
--- /dev/null
+++ b/README.md
@@ -0,0 +1,39 @@
+# current settings and their default values
+
+* http://xml.org/sax/features/namespaces=true
+* http://xml.org/sax/features/namespace-prefixes=false
+* http://xml.org/sax/features/external-general-entities=false
+* http://xml.org/sax/features/external-parameter-entities=false
+* http://xml.org/sax/features/is-standalone=false
+* http://xml.org/sax/features/lexical-handler/parameter-entities=false
+* http://xml.org/sax/features/resolve-dtd-uris=true
+* http://xml.org/sax/features/string-interning=true
+* http://xml.org/sax/features/use-attributes2=false
+* http://xml.org/sax/features/use-locator2=false
+* http://xml.org/sax/features/use-entity-resolver2=false
+* http://xml.org/sax/features/validation=false
+* http://xml.org/sax/features/xmlns-uris=false
+* http://xml.org/sax/features/xmlns-uris=false
+* http://xml.org/sax/features/xml-1.1=false
+
+default SAX features are defined here
+http://www.saxproject.org/apidoc/org/xml/sax/package-summary.html
+
+tagsoup specific features are
+
+* http://www.ccil.org/~cowan/tagsoup/features/ignore-bogons=false
+ A value of "true" indicates that the parser will ignore unknown elements.
+* http://www.ccil.org/~cowan/tagsoup/features/bogons-empty=false
+ A value of "true" indicates that the parser will give unknown elements a content model of EMPTY; a value of "false", a content model of ANY.
+* http://www.ccil.org/~cowan/tagsoup/features/root-bogons=true
+ A value of "true" indicates that the parser will allow unknown elements to be the root of the output document.
+* http://www.ccil.org/~cowan/tagsoup/features/default-attributes=true
+ A value of "true" indicates that the parser will return default attribute values for missing attributes that have default values.
+* http://www.ccil.org/~cowan/tagsoup/features/translate-colons=false
+ A value of "true" indicates that the parser will translate colons into underscores in names.
+* http://www.ccil.org/~cowan/tagsoup/features/restart-elements=true
+ A value of "true" indicates that the parser will attempt to restart the restartable elements.
+* http://www.ccil.org/~cowan/tagsoup/features/ignorable-whitespace=false
+ A value of "true" indicates that the parser will transmit whitespace in element-only content via the SAX ignorableWhitespace callback. Normally this is not done, because HTML is an SGML application and SGML suppresses such whitespace.
+* http://www.ccil.org/~cowan/tagsoup/features/cdata-elements=true
+ A value of "true" indicates that the parser will process the script and style elements (or any elements with type='cdata' in the TSSL schema) as SGML CDATA elements (that is, no markup is recognized except the matching end-tag).
diff --git a/pom.xml b/pom.xml
index 97eddd9..f022b61 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>26</version>
+ <version>30</version>
<relativePath/>
</parent>
@@ -46,10 +46,6 @@
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
- <artifactId>maven-scr-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
@@ -85,11 +81,13 @@
<dependency>
<groupId>org.ccil.cowan.tagsoup</groupId>
<artifactId>tagsoup</artifactId>
- <version>1.2</version>
+ <version>1.2.1</version>
</dependency>
<dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.scr.annotations</artifactId>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.commons.osgi</artifactId>
+ <version>2.2.0</version>
+ <scope>provided</scope>
</dependency>
</dependencies>
</project>
diff --git a/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java b/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
index d3cd9b8..109e411 100644
--- a/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
+++ b/src/main/java/org/apache/sling/commons/html/impl/HtmlParserImpl.java
@@ -20,11 +20,16 @@ package org.apache.sling.commons.html.impl;
import java.io.IOException;
import java.io.InputStream;
+import java.util.Map;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;
import org.apache.sling.commons.html.HtmlParser;
+import org.apache.sling.commons.osgi.PropertiesUtil;
import org.ccil.cowan.tagsoup.Parser;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
+import org.osgi.service.metatype.annotations.Designate;
+import org.osgi.service.metatype.annotations.ObjectClassDefinition;
import org.w3c.dom.Document;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
@@ -32,8 +37,19 @@ import org.xml.sax.SAXException;
import org.xml.sax.ext.LexicalHandler;
@Component
-@Service(value=HtmlParser.class)
+@Designate(ocd = HtmlParserImpl.Config.class)
public class HtmlParserImpl implements HtmlParser {
+
+ @ObjectClassDefinition(name="Apache Sling HTML Parser", description="Parser configuration")
+ static @interface Config {
+
+ @AttributeDefinition(name = "Parser Properties",
+ description = "Additional properties to be applied to the underlying parser in the format of key=[true|false]")
+ String[] properties();
+
+ }
+
+ private Map<String,Boolean> features;
/**
* @see org.apache.sling.commons.html.HtmlParser#parse(java.io.InputStream, java.lang.String, org.xml.sax.ContentHandler)
@@ -44,6 +60,9 @@ public class HtmlParserImpl implements HtmlParser {
if ( ch instanceof LexicalHandler ) {
parser.setProperty("http://xml.org/sax/properties/lexical-handler", ch);
}
+ for (String feature : features.keySet()){
+ parser.setProperty(feature, features.get(feature));
+ }
parser.setContentHandler(ch);
final InputSource source = new InputSource(stream);
source.setEncoding(encoding);
@@ -68,6 +87,9 @@ public class HtmlParserImpl implements HtmlParser {
try {
parser.setProperty("http://xml.org/sax/properties/lexical-handler", builder);
+ for (String feature : features.keySet()) {
+ parser.setProperty(feature, features.get(feature));
+ }
parser.setContentHandler(builder);
parser.parse(source);
} catch (SAXException se) {
@@ -78,4 +100,12 @@ public class HtmlParserImpl implements HtmlParser {
}
return builder.getDocument();
}
+
+ @Activate
+ private void activate(Config config) {
+ Map<String,String> temp = PropertiesUtil.toMap(config.properties(), new String[]{});
+ for (String key : temp.keySet()){
+ features.put(key, Boolean.valueOf(temp.get(key)));
+ }
+ }
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 10/36: SLING-1205 Upgrade all
projects to parent POM 8 and use OSGi provided OSGi libraries
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit fb850e4d47a2976dbeb8d81d30b29a58a91dccec
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Tue Dec 1 07:32:34 2009 +0000
SLING-1205 Upgrade all projects to parent POM 8 and use OSGi provided OSGi libraries
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@885680 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index c1c941e..6ff1efe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>7</version>
+ <version>8</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 33/36: Update the contrib
reactor to parent 25
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit ed251587caf0169017d61313f5f223127d69a929
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Oct 5 10:04:15 2015 +0000
Update the contrib reactor to parent 25
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1706781 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index c03aa34..d4f6b42 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>24</version>
+ <version>25</version>
<relativePath/>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-commons-html] 18/36: Update to latest
parent pom
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git
commit c59b263038ac9d359871217b8553c27cfee08eca
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Jul 5 09:29:47 2012 +0000
Update to latest parent pom
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1357521 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index f7b4281..913cbc0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>13-SNAPSHOT</version>
+ <version>14-SNAPSHOT</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.