Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Anton Bachin <antonbachin@yahoo.com>
To: "François Bobot" <francois.bobot@cea.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] [ANN] Lambda Soup - HTML scraping and rewriting with CSS selectors
Date: Sun, 22 Nov 2015 01:58:37 -0600	[thread overview]
Message-ID: <1A569326-8749-4332-A88C-719165728F20@yahoo.com> (raw)
In-Reply-To: <564AF405.10400@cea.fr>

Hello François,

First, I have to apologize. It seems my mail client thought all of Caml-list is
spam. I have been disappointed that the list is so quiet. Turns out I should be
disappointed at my mail client instead.

> Does the types are as powerful as the one in tyxml? Is it possible to have
> this kind of selectors on top of tyxml?

The types are not as powerful as the ones in tyxml, in the sense of being
precise. Lambda Soup only distinguishes between "definitely elements",
"definitely documents", and "anything, including an element, or document, or any
other node". It doesn't know about element types or any constraints on their
composition.

It does, however, seem to be possible to have the selectors on top of tyxml. I
am not very familiar with tyxml, but I do see types Xml.elt and Xml.econtent,
and value content. It may be possible to either use those directly as the
internal DOM representation of Lambda Soup, and build traversals over them, and
it is almost certainly possible to convert them to Lambda Soup's current
internal representation, the same way Lambda Soup currently converts Nethtml’s
parse trees.

If there is interest in this, perhaps with some study Lambda Soup can be
modified to use tyxml – perhaps functorized.

Regards,
Anton


  reply	other threads:[~2015-11-22  7:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16 21:01 Anton Bachin
2015-11-17  9:31 ` François Bobot
2015-11-22  7:58   ` Anton Bachin [this message]
2015-11-23 10:44     ` François Bobot
2015-11-23 16:26       ` Anton Bachin
2015-11-23 17:16         ` Drup
2015-11-23 17:35           ` Anton Bachin
2015-11-23 17:41             ` Anton Bachin
2015-11-23 18:20             ` Drup
2015-11-23 19:02               ` Anton Bachin
2015-11-24  8:35         ` François Bobot

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=1A569326-8749-4332-A88C-719165728F20@yahoo.com \
    --to=antonbachin@yahoo.com \
    --cc=caml-list@inria.fr \
    --cc=francois.bobot@cea.fr \
    /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