[Ocaml-pxp-users] Listing the namespaces in a dtd...

Till Varoquaux till.varoquaux at gmail.com
Wed Mar 8 09:46:48 PST 2006


I want to list all the namespaces in a dtd. To do so I use:

let man = dtd#namespace_manager in
man#iter_namespaces(
    fun np ->
      Format.fprintf ppf "namespace %s=\"%s\"\n" np (man#get_primary_uri np)
  );

However the only namespace that turns up is:
namespace xml="http://www.w3.org/XML/1998/namespace"

I am parsing the official Xhtml1 dtd, I should see at least:
http://www.w3.org/1999/xhtml
which is the default namespace. Is there something I'm missing here?

Regards,
Till




More information about the Ocaml-pxp-users mailing list