Implement set-theoretic operation on 2WSATA (union, intersection,
[tatoo.git] / src / qName.mli
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                               TAToo                                 *)
4 (*                                                                     *)
5 (*                     Kim Nguyen, LRI UMR8623                         *)
6 (*                   Université Paris-Sud & CNRS                       *)
7 (*                                                                     *)
8 (*  Copyright 2010-2012 Université Paris-Sud and Centre National de la *)
9 (*  Recherche Scientifique. All rights reserved.  This file is         *)
10 (*  distributed under the terms of the GNU Lesser General Public       *)
11 (*  License, with the special exception on linking described in file   *)
12 (*  ../LICENSE.                                                        *)
13 (*                                                                     *)
14 (***********************************************************************)
15
16 (** Implementation of qualified names as hashconsed strings *)
17
18 include Hcons.S with type data = string
19 include Common_sig.Printable with type t := t
20
21
22 val of_string : string -> t
23 (** Utility function, equivalent to [make] *)
24
25 val to_string : t -> string
26 (** Utility function, equivalent to [node] *)
27
28
29 (** Special constants, that denote the QName of nodes that are not
30     elements (using the nodeValue property of DOM for such nodes.
31 *)
32
33 val document : t
34 (** Represents the QName of a document node. Equivalent to
35     [of_string "#document"]
36 *)
37
38 val text : t
39 (** Represents the QName of a text node. Equivalent to
40     [of_string "#text"]
41 *)
42
43 val comment : t
44 (** Represents the QName of a comment node. Equivalent to
45     [of_string "#comment"]
46 *)
47
48 val nil : t
49 (** Represents the QName of a nil node. Equivalent to
50     [of_string "#"]
51 *)
52
53 val attribute : t -> t
54 (** Adds a prefix character (@) to distinguish the name
55     from an element name
56 *)
57
58 val processing_instruction : t -> t
59 (** Adds a prefix character (?) to distinguish the name
60     from an element name
61 *)
62
63 val remove_prefix : t -> t
64 (** Removes the prefix of the qname given as argument. Does not
65     do anything if there is no prefix.
66 *)