class['a node #extension as 'a]
document :?swarner:Pxp_core_types.symbolic_warnings -> Pxp_core_types.collect_warnings -> Pxp_core_types.rep_encoding ->
object
..end
Important invariant: A document is either empty (no root element, no DTD), or it has both a root element and a DTD.
A fresh document created by 'new' is empty.
method init_xml_version : string -> unit
method init_root : 'a node -> string -> unit
method xml_version : string
method xml_standalone : bool
method dtd : Pxp_dtd.dtd
method encoding : Pxp_core_types.rep_encoding
method root : 'a node
method raw_root_name : string
method add_pinstr : Pxp_dtd.proc_instruction -> unit
method pinstr : string -> Pxp_dtd.proc_instruction list
method pinstr_names : string list
method write : ?default:string ->
?prefer_dtd_reference:bool ->
?dtd_style:[ `Auto | `Included | `Omit | `Reference ] ->
?minimization:[ `AllEmpty | `DeclaredEmpty | `None ] ->
Pxp_core_types.output_stream -> Pxp_core_types.encoding -> unit
Option ~default
: Specifies the normprefix that becomes the
default namespace in the output.
Option ~dtd_style
: Selects how to print the DTD. `Omit
means
to omit the DTD at all (no DOCTYPE clause).
`Reference
prints the DTD reference to an
external entity (using SYSTEM or PUBLIC identifier), if possible,
and falls back to `Included
otherwise. `Included
means to
always include the DTD as internal subset. `Auto
tries to find
the best way: If there is a DTD, try `Reference
then `Included
.
Otherwise, `Omit
. The default is `Included
.
Option ~prefer_dtd_reference
: Same as ~dtd_style:`Reference
(backward-compatible).
Option ~minimization
: How to write out empty elements. `AllEmpty
means that all empty elements are minimized (using the <name/>
form). `DeclaredEmpty
minimizes only empty elements that are
declared as empty in the DTD. `None
does not minimize at all
and is the default.
method display : ?prefer_dtd_reference:bool ->
?dtd_style:[ `Auto | `Included | `Omit | `Reference ] ->
?minimization:[ `AllEmpty | `DeclaredEmpty | `None ] ->
Pxp_core_types.output_stream -> Pxp_core_types.encoding -> unit
write
, this method uses the display namespace
prefixes instead of the normprefixes.
Option ~dtd_style
: Same meaning as in write
.
Option ~prefer_dtd_reference
: Same meaning as in write
.
Option ~minimization
: Same meaning as in write
.
method dump : Format.formatter -> unit