edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Chris Brannon <chris@the-brannons.com>
To: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] tidy5
Date: Fri, 14 Aug 2015 13:17:21 -0700	[thread overview]
Message-ID: <87mvxt62we.fsf@mushroom.localdomain> (raw)
In-Reply-To: <20150713234537.eklhad@comcast.net> (Karl Dahlke's message of "Thu, 13 Aug 2015 23:45:37 -0400")

Karl Dahlke <eklhad@comcast.net> writes:

> Forgive me I haven't looked at the code at all,
> but I would guess there's a tidy5 encodeTags() that takes the
> html text and makes the tree.

Essentially true.  The details are a bit more complicated, but this is
the idea.  We call tidy to parse the html, and we get back a structure
from tidy called a document.  It contains our tree of nodes, and we
can iterate over it.  The problem is, this is a usable parse tree for
the html, but it isn't a true DOM.  We can remove nodes and attributes
from the tree, but we can't add them.  That causes problems for JS that
needs to add new nodes.  So we're going to have to take that parse tree
we get back from Tidy5, build our own DOM out of it, and eventually
render it.

-- Chris

  reply	other threads:[~2015-08-14 20:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-10  8:56 [Edbrowse-dev] startwindow / class NodeList Kevin Carhart
2015-08-11 21:38 ` Adam Thompson
2015-08-12  0:15   ` Karl Dahlke
2015-08-12 19:55     ` Kevin Carhart
2015-08-12 20:56       ` Karl Dahlke
2015-08-13  1:08         ` Chris Brannon
2015-08-13  4:36           ` [Edbrowse-dev] tidy5 Kevin Carhart
2015-08-13 20:07             ` Adam Thompson
2015-08-14  0:54               ` Kevin Carhart
2015-08-14  3:45                 ` Karl Dahlke
2015-08-14 20:17                   ` Chris Brannon [this message]
2015-08-16  5:54                     ` Kevin Carhart
2015-08-16 10:38                       ` Karl Dahlke
2015-08-14  3:37               ` Karl Dahlke
2015-08-16 18:10                 ` Adam Thompson
  -- strict thread matches above, loose matches on Subject: below --
2015-02-03 22:15 Karl Dahlke
2015-02-03 23:41 ` Adam Thompson
2015-02-02 19:58 Karl Dahlke
2015-02-03 21:18 ` Adam Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvxt62we.fsf@mushroom.localdomain \
    --to=chris@the-brannons.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).