ocsigen / tyxml

Build valid HTML and SVG documents
https://ocsigen.org/tyxml/
Other
167 stars 59 forks source link

Figure out a way to export to lambdasoup #100

Open Drup opened 8 years ago

Drup commented 8 years ago

Currently, Xml_iter is very crude and not very used. I would like to both improve the functionality and deprecate the current interface.

We can do that by providing a way to export to lambdasoup. I would prefer to do it while not actually depending on lambdasoup, so some structural thing would be nice. This would also potentially provide us with a good streaming printer, when one is added to lambdasoup.

aantron commented 8 years ago

@Drup, Markup.ml has a streaming printer – so Lambda Soup does too, it's the Soup.to_string function. It can also be done with soup |> Soup.signals |> Markup.write_html |> Markup.to_something_other_than_string.... I am not sure what the purpose or use case of Xml_iter is, but depending on what it actually is, can it be achieved by functorizing Lambda Soup over its tree representation somehow?

Drup commented 8 years ago

can it be achieved by functorizing Lambda Soup over its tree representation somehow?

Either that, or expecting a tree walker (see Xml_sigs.Iterable).