module Entity:sig
..end
Pxp_entity
to access entities.
Note that the types entity
and entity_id
are also exported
by Pxp_types
.
val get_name : Pxp_entity.entity -> string
val get_full_name : Pxp_entity.entity -> string
val get_encoding : Pxp_entity.entity -> Pxp_core_types.I.rep_encoding
val get_type : Pxp_entity.entity -> [ `External | `Internal | `NDATA ]
val replacement_text : Pxp_entity.entity -> string
val get_xid : Pxp_entity.entity -> Pxp_core_types.I.ext_id option
TRAP: The external ID may be a relative SYSTEM ID, and it is not
known to which base ID the relative ID must be resolved. So the
external ID may be meaningless.
val get_resolver_id : Pxp_entity.entity -> Pxp_core_types.I.resolver_id option
active_id
method
by the resolver.
The resolver ID contains more information than the external ID,
for example the base URL relative to which SYSTEM IDs should
be interpreted.val get_notation : Pxp_entity.entity -> string option
val create_internal_entity : name:string -> value:string -> Pxp_dtd.dtd -> Pxp_entity.entity
val create_ndata_entity : name:string ->
xid:Pxp_core_types.I.ext_id ->
notation:string -> Pxp_dtd.dtd -> Pxp_entity.entity
val create_external_entity : ?doc_entity:bool ->
?system_base:string ->
name:string ->
xid:Pxp_core_types.I.ext_id ->
resolver:Pxp_reader.resolver -> Pxp_dtd.dtd -> Pxp_entity.entity
doc_entity
: If true, the entity is a document entity. XML requires
some additional restrictions for document entities. The default for
the argument is false.system_base
: The base URL if SYSTEM identifiers are passed
as xid
val from_external_source : ?doc_entity:bool ->
name:string -> Pxp_dtd.dtd -> Pxp_dtd.source -> Pxp_entity.entity
Pxp_types.source
val entity_id : Pxp_entity.entity -> Pxp_lexer_types.entity_id
val lookup : Pxp_lexer_types.entity_id -> Pxp_entity.entity
val create_entity_id : unit -> Pxp_lexer_types.entity_id
entity_id
is expected but no entity is available, except that
the back coercion lookup
is not supported, and will raise
Invalid_argument
.