[Ocaml-pxp-users] Ignore Listed DTD, Validate Against Different, Local DTD

Jeff Wheeler jeff at nokrev.com
Sat Dec 22 18:47:19 PST 2007


Hey,

I'm new to this list, and for the most part have only played with OCaml
a week or so, but I'm having some trouble with Pxp in OCaml.

I'm trying to validate a document with a PUBLIC DTD (to be specific, the
menu XML representation in ~/.config/menus/gnome-applications.menu),
which starts with this:

<!DOCTYPE Menu
  PUBLIC '-//freedesktop//DTD Menu 1.0//EN'
  'http://standards.freedesktop.org/menu-spec/menu-1.0.dtd'>

It makes no sense to try and download this doctype every time I load up
the script (and Pxp seems to make that awkward, requiring a custom
resolver), so I'd like to save that document locally and validate
against that SYSTEM DTD instead.

So far, I haven't found any way to make the Pxp parser even get past the
doctype in there without choking.

Anyways, I'd like to replace the doctype Pxp uses to validate the tree
with before it starts parsing, and not even look at the PUBLIC one that
it currently chokes on. Any hints for starting?

Thanks a lot,
Jeff Wheeler

(P.S., I've sent this twice, because I think I got an error the first
time, although I'm not certain. Many apologies if I've double-posted!)




More information about the Ocaml-pxp-users mailing list