You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Ken Krugler (JIRA)" <ji...@apache.org> on 2010/08/17 17:08:17 UTC

[jira] Resolved: (TIKA-463) HtmlParser doesn't extract links from img, map, object, frame, iframe, area, link

     [ https://issues.apache.org/jira/browse/TIKA-463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ken Krugler resolved TIKA-463.
------------------------------

    Fix Version/s: 0.8
       Resolution: Fixed

SVN 986348. With this commit, i'm going to resolve this issue. It's not perfect yet, but feels close enough for now. Issues I ran into and comments in general:

* The <applet> element isn't supported, and can contain URLs
* The <object> element has a codebase="xxx" attribute that defines the base URL for the "classid" URL, but that isn't getting special handling.
* The <object> element has a urllist="url, url" attribute that can contain one or more space-separated URLs, but I'm ignoring it.
* The DefaultHtmlMapper doesn't pass through all valid XHTML 1.0 elements or their attributes, but that's a topic for another issue.
* No checks are done for required attributes, or restrictions on values of attributes. For example, the <img> element must have an alt="xxx" attribute.
* TagSoup adds some of the required attributes, so you can now get output that has attributes (with default values) that didn't exist in the source HTML.
* The HtmlParserTest code should be using XPath expressions to validate output, versus string patterns.
* It would be good to use a validating parser (for XHTML 1.0) to double-check the output from all tests.

> HtmlParser doesn't extract links from img, map, object, frame, iframe, area, link
> ---------------------------------------------------------------------------------
>
>                 Key: TIKA-463
>                 URL: https://issues.apache.org/jira/browse/TIKA-463
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>            Reporter: Ken Krugler
>            Assignee: Ken Krugler
>             Fix For: 0.8
>
>         Attachments: TIKA-463-1.patch, TIKA-463-2.patch, TIKA-463-3.patch, TIKA-463.patch
>
>
> All of the listed HTML elements can have URLs as attributes, and thus we'd want to extract those links, if possible.
> For elements that aren't valid as XHTML 1.0, there might be some challenges in the right way to handle this.
> But if XHTML 1.0 means the union of "transitional and frameset" variants, then all of the above are valid, and thus should be emitted by the parser,

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.