Evan Martin (evan) wrote in evan_tech,
Evan Martin

ocaml + xml

I was bitching to gaal about the usefulness of LogJam's XML output in generating PDFs, when I started Googling for "ocaml xml".

OX uses OCaml's meta-language support to support XML terms in the language directly (see tutorial for some EBNF¹). They also have some regular-expression-like pattern matching over XML.

CDuce isn't really ocaml-related (besides being written in it) but appears to use DTDs to statically verify / optimize XML processing. They say "a CDuce program can run faster (30% to 60%) than an equivalent XSLT style-sheet" but I don't really understand how valid the comparison is.

I've played with PXP before but it hurt my head. But I think they were doing what seemed to me to be the sensible goal: use the DTD to process the XML directly into a data structure. A straight DOM tree is annoying to work with, because every node must have a list of children, even for the common cases where they only have one string child; using a DTD allows you to specialize your tree to the document format.
(LogJam's XML processing is really painful and makes me feel gross because it's so repetitive. But that's in C and I don't expect much out of C.)

1 I hate it when people introduce language features via EBNF. It's much easier for me to see some examples and infer abstraction than it is for me to see abstraction and generate examples.

  • memcache job offers

    I get occasional recruiter spam that specifically calls out "my work on memcached". This is pretty funny because all I did was make some trivial…

  • application stack

    "Put yourself in 1995. I'm going to tell the you of 1995 that in 2010, there will be a software platform with the following properties:" Luis Villa…

  • bsd license advertising

    Did you know that the 3-clause BSD (that is, the one with the "advertising" clause stripped) license still has an advertising requirement? Read it…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.