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


The Xpath_names module

type 'a context

expanded_name = (namespace URI, local part)

type expanded_name = string * string
type 'a attribute   = 'a * string * string

context management

the basic_context contains only the binding for "xml"

val basic_context   : 'a -> 'a context

val dummy_context   : 'a context

val remove_prefix   : 'a context -> string -> 'a context

add_declaration context info prefix name: - overiddes existing binding - if prefix = "" , name = "": remove the default namespace

val add_declaration : 'a context -> 'a -> string -> string -> 'a context

Applying namespace

raise Not_found if the prefix is not declared violation of NSC: Prefix Declared

val expand_prefix_default : 'a context -> string -> string

val expand_prefix : 'a context -> string -> string

Cutting qname to (prefix,localpart)

val cut_qname : string -> string * string

val expanded_name_default : 'a context -> string -> expanded_name

val expanded_name         : 'a context -> string -> expanded_name

val check_NSC_Prefix_Declared : 'a context -> string -> unit

Filtering an attibute list: removes namespace declaration and enrich the context

attributes are triple (info,key,value); the returned attribute list is in reverse order

TODO : Uniqueness of Attributes

val filter_attributes : 'a context -> 'a attribute list -> 
  ('a context * 'a attribute list)

Extracting declaration

get the declarations (info,prefix,name) active in the context; in reverse adjunction order

val declarations_of_context  : 'a context -> ('a * string * string) list


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