A | |
allocate_private_id [Pxp_core_types.S] |
Get a new unique private ID
|
attribute_name [Pxp_document] | attribute_name n
Returns the name of the attribute contained in an attribute
node.
|
attribute_string_value [Pxp_document] | attribute_string_value n :
Returns the string value of the attribute contained in an attribute
node.
|
attribute_value [Pxp_document] | attribute_value n :
Returns the value of the attribute contained in an attribute
node.
|
C | |
close_entities [Pxp_ev_parser] |
Closes all entities managed by this entity manager, and frees
operating system resources like open files.
|
compare [Pxp_document] | compare n1 n2 :
Returns -1 if n1 occurs before n2 , or +1 if n1 occurs
after n2 , or 0 if both nodes are identical.
|
concat [Pxp_event] | let p = concat l : The pull functions contained in the list l are
concatenated, and a new pull function p is created that pulls from
the functions of the list in turn (when one function indicates
the end of the events, it is continued with the next function in the
list).
|
create_comment_node [Pxp_document] | create_comment_node ~position spec dtd commentstring :
Creates a new comment node from the exemplar contained in
spec .
|
create_data_node [Pxp_document] | create_data_node spec dtd datastring :
Creates a new data node from the exemplar contained in spec .
|
create_dtd [Pxp_dtd] |
Preferred way of creating a DTD.
|
create_element_node [Pxp_document] | create_element_node ~name_pool_for_attribute_values
~position ~valcheck ~att_values spec dtd eltype
att_list :
Creates a new element node from the exemplar(s) contained in
spec : The new node will be connected to the passed dtd ., The new node will have the element type eltype ., The attributes of the new node will be the concatenation of
att_list and att_values ; att_list passes attribute values
as strings while att_values passes attribute values as
type att_value , The source position is set to ~position (if passed), The ~name_pool_for_attribute_values will be used, if passed., If ~valcheck = true (the default), the attribute list is
immediately validated. If ~valcheck = false , the validation
is left out; in this case you can pass any element type and
and any attributes, and it does not matter whether and how
they are declared.
Even in well-formedness mode, it is ok to pass valcheck=true
as this mode is implemented by weakening the validation
constraints in the DTD object.
|
create_empty_dtd [Pxp_dtd_parser] |
Create an empty DTD.
|
create_entity_id [Pxp_dtd.Entity] |
Create a new abstract entity ID.
|
create_entity_manager [Pxp_ev_parser] |
Creates an entity manager that is initialized with the toplevel
entity referenced by the source argument.
|
create_external_entity [Pxp_dtd.Entity] |
Creates a reference to an external entity.
|
create_internal_entity [Pxp_dtd.Entity] |
Creates an internal entity.
|
create_namespace_manager [Pxp_dtd] |
Preferred way of creating a
namespace_manager
|
create_namespace_scope [Pxp_dtd] |
Preferred way of creating a
namespace_scope
|
create_ndata_entity [Pxp_dtd.Entity] |
Creates an NDATA entity.
|
create_no_node [Pxp_document] |
Creates a T_none node with limited functionality.
|
create_ord_index [Pxp_document] | create_ord_index startnode :
Creates an ordinal index for the subtree starting at startnode .
|
create_pinstr_node [Pxp_document] | create_pinstr_node ~position spec dtd pi :
Creates a new processing instruction node from the exemplar
contained in spec .
|
create_pull_parser [Pxp_ev_parser] |
Invoke the event parser using the pull model.
|
create_super_root_node [Pxp_document] | create_super_root_node ~position spec dtd :
Creates a new super root node from the exemplar contained in
spec .
|
D | |
default_config [Pxp_yacc] |
Same as
Pxp_types.default_config
|
default_config [Pxp_types] |
Default configuration.
|
default_extension [Pxp_yacc] | |
default_extension [Pxp_tree_parser] |
A "null" extension; an extension that does not extend the functionality
|
default_namespace_config [Pxp_yacc] | |
default_namespace_config [Pxp_types] |
Deprecated.
|
default_namespace_spec [Pxp_yacc] | |
default_namespace_spec [Pxp_tree_parser] |
Specifies that you want to use namespace, but not extensions
|
default_spec [Pxp_yacc] |
Same as
Pxp_tree_parser.default_spec
|
default_spec [Pxp_tree_parser] |
Specifies that you do not want to use extensions.
|
display_events [Pxp_event] |
Writes the events to the
output_stream .
|
document_from_channel [Pxp_marshal] |
The same for documents.
|
document_from_cmd_sequence [Pxp_marshal] |
The same for documents
|
document_to_channel [Pxp_marshal] |
The same for documents.
|
document_to_cmd_sequence [Pxp_marshal] |
The same for documents
|
drop_ignorable_whitespace_filter [Pxp_event] |
This filter checks whether character data between elements in a
"regexp" or "non-PCDATA mixed" content model consists
only of whitespace, and, removes these whitespace characters from the event stream.
If the check fails, a
WF_Error will be raised.
|
E | |
entity_id [Pxp_dtd.Entity] |
Returns the abstract entity ID
|
extract [Pxp_event] | let next' = extract e next :
Extracts a subexpression from the pull function next prepended by e .
|
extract_dtd_from_document_entity [Pxp_yacc] | |
extract_dtd_from_document_entity [Pxp_dtd_parser] |
Parses a closed document, i.e.
|
extract_prefix [Pxp_event] |
Returns the prefix in the name, or
"" if there is no prefix.
|
F | |
find [Pxp_document] | find ~deeply f startnode
Searches the first node in the tree below startnode for which
the predicate f is true, and returns it.
|
find_all [Pxp_document] | find_all ~deeply f startnode :
Searches all nodes in the tree below startnode for which
the predicate f is true, and returns them.
|
find_all_elements [Pxp_document] | find_all_elements ~deeply eltype startnode :
Searches all elements in the tree below startnode
having the element type eltype , and returns them.
|
find_element [Pxp_document] | find_element ~deeply eltype startnode :
Searches the first element in the tree below startnode
that has the element type eltype , and returns it.
|
from_channel [Pxp_yacc] |
Same as
Pxp_types.from_channel
|
from_channel [Pxp_types] |
This function creates a source that reads the XML text from the
passed
in_channel .
|
from_external_source [Pxp_dtd.Entity] |
Creates an external entity that reads from the passed
Pxp_types.source
|
from_file [Pxp_yacc] |
Same as
Pxp_types.from_file
|
from_file [Pxp_types] |
This source reads initially from the file whose name is passed as
string argument.
|
from_obj_channel [Pxp_yacc] |
Same as
Pxp_types.from_obj_channel
|
from_obj_channel [Pxp_types] |
Similar to
from_channel , but reads from an Ocamlnet netchannel
instead.
|
from_string [Pxp_yacc] |
Same as
Pxp_types.from_string
|
from_string [Pxp_types] |
Similar to
from_channel , but reads from a string.
|
G | |
get_comment_exemplar [Pxp_document] | |
get_data_exemplar [Pxp_document] | |
get_element_exemplar [Pxp_document] | |
get_encoding [Pxp_dtd.Entity] |
Return the encoding of the internal representation of the entity
|
get_full_name [Pxp_dtd.Entity] |
The full name includes the ID, too (for diagnostics messages)
|
get_name [Pxp_dtd.Entity] |
Return the name of the entity.
|
get_notation [Pxp_dtd.Entity] |
Returns the notation of NDATA entities, and None for the other
entity types
|
get_pinstr_exemplar [Pxp_document] |
These functions just return the exemplars (or raise
Not_found ).
|
get_resolver_id [Pxp_dtd.Entity] |
Returns the resolver ID for external entities, and None for other
entities.
|
get_super_root_exemplar [Pxp_document] | |
get_type [Pxp_dtd.Entity] |
Returns the type of the entity.
|
get_xid [Pxp_dtd.Entity] |
Returns the external ID for external and NDATA entities, and None
for internal entities
|
I | |
iter [Pxp_event] | iter f p : The pull function p is repeatedly called to get a
stream of events e .
|
iter_tree [Pxp_document] | iter_tree ~pre ~post startnode :
Iterates over the tree beginning at startnode
using the following algorithm.
|
iter_tree_sibl [Pxp_document] | iter_tree_sibl ~pre ~post startnode :
Iterates over the tree beginning at startnode
using the following algorithm.
|
L | |
liquefy [Pxp_document] |
The converse of
solidify : The passed node or document is transformed
into an event stream.
|
lookup [Pxp_dtd.Entity] |
Looks the entity up for an entitiy ID
|
M | |
make_file_url [Pxp_reader] |
This is a convenience function to create a file URL (for localhost).
|
make_probabilistic_pool [Pxp_core_types.S] |
A probalistic string pool tries to map strings to pool strings in order
to make it more likely that equal strings are stored in the same memory
block.
|
make_spec_from_alist [Pxp_document] | make_spec_from_alist
~super_root_exemplar ~comment_exemplar ~default_pinstr_exemplar
~pinstr_alist ~data_exemplar ~default_element_exemplar
~element_alist
() :
Creates a spec from the arguments.
|
make_spec_from_mapping [Pxp_document] | make_spec_from_mapping
~super_root_exemplar ~comment_exemplar ~default_pinstr_exemplar
~pinstr_mapping ~data_exemplar ~default_element_exemplar
~element_mapping
() :
Creates a spec from the arguments.
|
map_tree [Pxp_document] | map_tree ~pre ~post startnode
Maps the tree beginning at startnode to a second tree
using the following algorithm.
|
map_tree_sibl [Pxp_document] | map_tree_sibl ~pre ~post startnode :
Maps the tree beginning at startnode to a second tree
using the following algorithm.
|
N | |
namespace_display_prefix [Pxp_document] |
Returns the display prefix of a namespace node .
|
namespace_normprefix [Pxp_document] |
Returns the normprefix of a namespace node.
|
namespace_split [Pxp_event] | let (p,l) = namespace_split name : Splits name into the prefix
p and the local name l .
|
namespace_uri [Pxp_document] |
Retruns the namespace URI of a namespace node .
|
norm_cdata_filter [Pxp_event] |
This filter removes empty
E_char_data events, concatenates adjacent E_char_data events
but does not touch any other parts of the event stream.
|
normalize [Pxp_document] |
Normalizes the tree denoted by
startnode such that
neither empty data nodes nor adjacent data nodes exist.
|
O | |
of_list [Pxp_event] | of_list l : Create a pull function fetching the events from l
|
open_source [Pxp_types] |
Returns the resolver and the entity for a source.
|
ord_compare [Pxp_document] | ord_compare idx n1 n2 :
Compares two nodes like compare :
Returns -1 if n1 occurs before n2 , or +1 if n1 occurs
after n2 , or 0 if both nodes are identical.
|
ord_number [Pxp_document] |
Returns the ordinal number of the node, or raises
Not_found .
|
P | |
parse_content_entity [Pxp_yacc] | |
parse_content_entity [Pxp_tree_parser] |
Parse a file representing a well-formed fragment of a document.
|
parse_document_entity [Pxp_yacc] | |
parse_document_entity [Pxp_tree_parser] |
Parse a closed document,
and validate the contents of the document against the DTD contained
and/or referenced in the document.
|
parse_dtd_entity [Pxp_yacc] |
Same as
Pxp_dtd_parser.parse_dtd_entity
|
parse_dtd_entity [Pxp_dtd_parser] |
Parse an entity containing a DTD (external subset), and return this DTD.
|
parse_wfcontent_entity [Pxp_yacc] | |
parse_wfcontent_entity [Pxp_tree_parser] |
Parse a file representing a well-formed fragment of a document.
|
parse_wfdocument_entity [Pxp_yacc] | |
parse_wfdocument_entity [Pxp_tree_parser] |
Parse a closed document, but do not
validate it.
|
pfilter [Pxp_event] |
Filters an event stream by a predicate
|
pinstr [Pxp_document] | pinstr n :
Returns the processing instruction contained in a
processing instruction node.
|
pool_string [Pxp_core_types.S] |
Tries to find the passed string in the pool; if the string is in the
pool, the pool string is returned.
|
print_doc [Pxp_document] | |
print_node [Pxp_document] | |
process_entity [Pxp_ev_parser] |
Parses a document or a document fragment in push mode.
|
process_expr [Pxp_ev_parser] |
This is a special parsing function that corresponds to the entry
`Entry_expr , i.e.
|
R | |
relocate_document [Pxp_marshal] |
Creates a copy of the passed document by marshalling it, and
restoring the document.
|
relocate_subtree [Pxp_marshal] |
Creates a copy of the passed subtree by marshalling the tree, and
restoring the marshaled tree.
|
replacement_text [Pxp_dtd.Entity] |
Return the replacement text of the entity.
|
resolver_id_of_ext_id [Pxp_core_types.S] |
The standard way of converting an ext_id into a resolver ID.
|
S | |
solidify [Pxp_document] |
Reads the event stream by calling the
unit->event function, and
creates a node tree according to config, dtd, spec.
|
string_of_event [Pxp_event] |
Returns a string representation of events, for debugging
|
string_of_exn [Pxp_core_types.S] |
Converts a PXP exception into a readable string
|
string_of_warning [Pxp_core_types.S] |
Turn the warning into a human-readable message
|
strip_whitespace [Pxp_document] | strip_whitespace ~force ~left ~right ~delete_empty_nodes startnode :
Modifies the passed tree in-place by the following rules: In general, whitespace stripping is not applied to nodes inside
an xml:space="preserve" region, unless ~force:true is passed
to the function (default is ~force:false ). Only if whitespace
stripping is allowed, the following rules are carried out.
Note that the detection of regions with preserved whitespace takes
the parent nodes of the passed startnode into account., If applied to a data node, whitespace at the beginning of the node
is removed according to ~left , and whitespace at the end of the node
is removed according to ~right ., If applied to an element, whitespace at the beginning of the first
data subnode is removed according to ~left , and whitespace at the end
of the last data subnode is removed according to ~right . Furthermore,
these rules are recursively applied to all subelements (but not to
other node types)., If applied to the super root node, this node is treated as if it
were an element., Whitespace of other node types is left as-is, as whitespace occuring
in attributes., Option ~delete_empty_nodes (default true):
If data nodes become empty after removal of whitespace, they are
deleted from the XML tree.
Defaults: ~force:false , ~left:`Disabled , ~right:`Disabled
|
subtree_from_channel [Pxp_marshal] |
Reconstructs the subtree from an
in_channel .
|
subtree_from_cmd_sequence [Pxp_marshal] |
Reconstructs the subtree from a sequence of
reconstruction_cmd values.
|
subtree_to_channel [Pxp_marshal] | subtree_to_channel ch n :
The node n is the root of the subtree to be marshaled; the external
representation is written to ch (which must have been opened
in binary mode).
|
subtree_to_cmd_sequence [Pxp_marshal] | subtree_to_cmd_sequence f n :
The passed node n is the root of the subtree to be marshaled.
|
T | |
to_list [Pxp_event] |
Fetch all events from the pull function, and return the corresponding
list of events.
|
U | |
unwrap_document [Pxp_event] |
This filter removes the document wrapping from the stream
(see The wrapping for closed documents for a definition what this is).
|
V | |
validate [Pxp_document] | validate startnode :
Validates the tree denoted by startnode .
|
W | |
warn [Pxp_core_types.S] |
Send a warning to the
symbolic_warnings object, and then to the
collect_warnings object.
|
write [Pxp_core_types.S] | write os s pos len : Writes the string (portion) to the
buffer/channel/stream
|
write_document [Pxp_codewriter] |
Writes O'Caml code to the
out_channel so that when the code
is compiled and executed, a fresh document is created with the
same contents as the passed document:
|
write_events [Pxp_event] |
Writes the events to the
output_stream .
|
write_subtree [Pxp_codewriter] |
Writes O'Caml code to the
out_channel so that when the code
is compiled and executed, a fresh tree is created with the
same contents as the passed tree:
|