[Ocaml-pxp-users] adding comment to a document

Stefano Zacchiroli zack at debian.org
Mon Jun 30 09:45:04 PDT 2003


I would like to create a PXP document representing the following XML
document:

  <?xml version="1.0"?>
  <?foo an useless processing instruction?>
  <!-- an useless comment -->
  <empty />

The issue I'm facing is that the document object has a method to add
processing instruction, but seems to have no method to add comments ...

BTW a changelog entry in pxp_document.mli states that
init_xml_standalone method has been removed from the document class. I
guess this is because the standalone declaration is accessibile trhough
Pxp_dtd.dtd objects.
Two questions at this regard:
- is therefore still useful to have both standalone and dtd values in
  the E_start_tag events of the event based parser? (or is only kept for
  backward compatibility?)
- is there no way to set a standalone declaration for a document without
  a DTD? (I know that this is really useless because you must have a DTD
  as soon as you init the root element, but ... just for curiosity :-)

Many TIA,
Cheers.

-- 
Stefano Zacchiroli  --  Master in Computer Science @ Uni. Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it}  -  http://www.bononia.it/zack/
"  I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant!  " -- G.Romney



More information about the Ocaml-pxp-users mailing list