module Pxp_marshal:TODO:sig
..end
The subtree is converted into a sequence of reconstruction_cmd values which can be marshaled using the standard implementation.
While the tree is written or read it is possible to change the character
encoding. Furthermore, the namespace prefixes can be changed to other
conventions.
type
reconstruction_cmd
val subtree_to_cmd_sequence : ?omit_positions:bool ->
?enc:Netconversion.encoding ->
(reconstruction_cmd -> unit) ->
('a Pxp_document.node #Pxp_document.extension as 'a) Pxp_document.node ->
unit
~omit_positions: If true, the position strings of the nodes which contain line numbers are omitted. Default: false
~enc: if passed, the character encoding is changed to this type. If
omitted, the written sequence is encoded in the same manner as the
node tree.
val subtree_to_channel : ?omit_positions:bool ->
?enc:Netconversion.encoding ->
Pervasives.out_channel ->
('a Pxp_document.node #Pxp_document.extension as 'a) Pxp_document.node ->
unit
~omit_positions: If true, the position strings of the nodes which contain line numbers are omitted. Default: false
~enc: if passed, the character encoding is changed to this type. If
omitted, the written sequence is encoded in the same manner as the
node tree.
val document_to_cmd_sequence : ?omit_positions:bool ->
?enc:Netconversion.encoding ->
(reconstruction_cmd -> unit) ->
('a Pxp_document.node #Pxp_document.extension as 'a) Pxp_document.document ->
unit
val document_to_channel : ?omit_positions:bool ->
?enc:Netconversion.encoding ->
Pervasives.out_channel ->
('a Pxp_document.node #Pxp_document.extension as 'a) Pxp_document.document ->
unit
val subtree_from_cmd_sequence : (unit -> reconstruction_cmd) ->
Pxp_dtd.dtd ->
('a Pxp_document.node #Pxp_document.extension as 'a) Pxp_document.spec ->
'a Pxp_document.node
If the DTD contains a namespace_manager: You must pass a namespace_manager to enable the namespace code. Note that the normprefixes found in the input stream are remapped to unique normprefixes, if this is necessary. This means that the namespace_manager should be filled with (normprefix, uri) pairs if you want to ensure that certain normprefixes are used. If you pass an empty namespace_manager, it is guaranteed that such remapping is not necessary, so the normprefixes are the same as in the original document.
The character encoding of the node tree is set to the encoding of the
DTD. If necessary, the read strings are recoded.
val subtree_from_channel : Pervasives.in_channel ->
Pxp_dtd.dtd ->
('a Pxp_document.node #Pxp_document.extension as 'a) Pxp_document.spec ->
'a Pxp_document.node
val document_from_cmd_sequence : (unit -> reconstruction_cmd) ->
Pxp_yacc.config ->
('a Pxp_document.node #Pxp_document.extension as 'a) Pxp_document.spec ->
'a Pxp_document.document
val document_from_channel : Pervasives.in_channel ->
Pxp_yacc.config ->
('a Pxp_document.node #Pxp_document.extension as 'a) Pxp_document.spec ->
'a Pxp_document.document
The character encoding of the node tree is set to the encoding of the
configuration. If necessary, the read strings are recoded.
val relocate_subtree : ('a Pxp_document.node #Pxp_document.extension as 'a) Pxp_document.node ->
Pxp_dtd.dtd ->
('b Pxp_document.node #Pxp_document.extension as 'b) Pxp_document.spec ->
'b Pxp_document.node
val relocate_document : ('a Pxp_document.node #Pxp_document.extension as 'a) Pxp_document.document ->
Pxp_yacc.config ->
('b Pxp_document.node #Pxp_document.extension as 'b) Pxp_document.spec ->
'b Pxp_document.document
KNOWN BUG: The new DTD is not really a copy, because the entities are
missing. This will be solved when it is possible to copy entities.