GithubHelp home page GithubHelp logo

hhugo / tyxml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ocsigen/tyxml

0.0 2.0 0.0 17.84 MB

OCaml library to build valid HTML5 and SVG trees.

Home Page: http://ocsigen.org/tyxml/

License: Other

OCaml 99.99% Shell 0.01%

tyxml's Introduction

TypedXML

TyXML allows you to build XML trees whose validity is ensured by the typechecker. It's based on a traduction of XML types into polymorphic variants, originally written by Thorsten Ohl. Currently, the transcription has been done for XHTML 1.0 and 1.1, HTML5 and SVG (partial).

TyXML also provides a generic printer and some low-level (and untyped) iterators over XML trees. The printer has options for printing XHTML in more browser-friendly way when served as "text/html" (instead of "text/xml"). HTML5 is always printed with those options.

All modules provided by TyXML are also provided in functorial interface, where every module is parameterised by the underlying XML representation.

A camlp4 extension, named Pa_tyxml, allows to write HTML pages or HTML fragments with the usual syntax. For creating HTML5-, XHTML-, or SVG-nodes, the syntax extension relies on the presence of a module called Html5, Xhtml, or Svg which keeps the actual implementation, e.g.

let module Html5 = Eliom_content.Html5.F in
<:html5< <div>xyz</div> >>

You can find the documentation here.

How to

Installation

tyxml is available in opam : opam install tyxml

You can also use the ocsigen opam repository for the dev version : opam repository add opamocsigen http://ocsigen.org/opam

Manual build

Requirements:

  • ocaml and camlp4
  • findlib
  • ocamlduce (optional)

Build instructions:

${EDITOR} Makefile.config
make
make install

API documentation:

make doc
${BROWSER} doc/api-html/index.html

tyxml's People

Contributors

glondu avatar yakobowski avatar hnrgrgr avatar chambart avatar krys27 avatar vouillon avatar drup avatar benozol avatar nurpax avatar hhugo avatar mfp avatar kit-ty-kate avatar kerneis avatar florentbecker avatar hoshin avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.