Go to the first, previous, next, last section, table of contents.


The Pxp_codewriter module

open Pxp_document
open Pxp_yacc
open Pxp_dtd

val write_document : out_channel -> 'ext document -> unit

Writes O'Caml code to the out_channel that is a top-level function creating a fresh document which is equal to the passed document:

"let create_document warner spec = ...;;"

If you compile the code and call "create_document warner map" the function creates a document tree which is (almost) equal to the passed document.

The following properties may not be equal: - Parsed entities - Whether a declaration occurs in an external entity or not

'warner': a collect_warnings object 'spec': a Pxp_document.spec

val write_dtd : out_channel -> dtd -> unit

Writes O'Caml code to the out_channel that is a top-level function creating a fresh DTD which is equal to the passed DTD:

"let create_dtd warner = ...;;"

If you compile the code and call "create_dtd warner" the function creates a DTD object which is (almost) equal to the passed object.

The following properties may not be equal: - Parsed entities - Whether a declaration occurs in an external entity or not

'warner': a collect_warnings object

val write_subtree : out_channel -> 'ext node -> unit

Writes O'Caml code to the out_channel that is a top-level function creating a fresh node tree which is equal to the passed tree:

"let create_subtree dtd map = ...;;"

If you compile the code and call "create_subtree dtd map" the function creates a DTD object which is equal to the passed object.

'dtd': a DTD object 'map': a domspec


Go to the first, previous, next, last section, table of contents.