[Ocaml-pxp-users] Dtd and parse_wfdocuments

Till Varoquaux till.varoquaux at gmail.com
Tue Feb 7 04:05:47 PST 2006


Reforwarding this to the caml mailling list:...

On 2/7/06, Gerd Stolpmann <info at gerd-stolpmann.de> wrote:
> Am Dienstag, den 07.02.2006, 11:48 +0100 schrieb Till Varoquaux:
> > I had a small problem figuring out the dtd creation...
> >
> > The manual (taken from the .mli) states:
> >
> > class dtd :
> >   (* Creation:
> >    *   new dtd
> >    * creates a new, empty DTD object without any declaration, without a root
> >    * element, without an ID.
> >    *)
> >
> > Which might be the wrong signature. So I had to grep the sources to
> > figure out how to use it...
>
> Better use Pxp_dtd.create_dtd, is is less likely that this function is
> every changed in an incompatible way.
Ok I will do so...
(...)
> > worked out fine for me... However I guess CDATA elements are now
> > parsed as PCDATA... Thus the question: how does parse_wfdocument
> > handle this issue?
>
> You mean these constructs: <![CDATA[...]]>?
No I'm talking about stuff like:

<?xml version="1.0"?>
<!DOCTYPE cdata [
   <!ELEMENT cdata      (#CDATA)>
  ]>
  <cdata><problem></cdata>

However I'm not 100% positive it is correct anyways...
_http://www.xmlfiles.com/dtd/dtd_elements.asp tells me it should be.
_Validators I've used tell me it is not...

Cheers,
Till
> There is no difference, Pxp always incorporates CDATA elements into
> normal text (transparent to the user).
>
> Gerd
> --
> ------------------------------------------------------------
> Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany
> gerd at gerd-stolpmann.de          http://www.gerd-stolpmann.de
> Telefon: 06151/153855                  Telefax: 06151/997714
> ------------------------------------------------------------
>
>




More information about the Ocaml-pxp-users mailing list