Refactor the code to have a unique place for signature definition.
[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 Sigs.HCONS.S with type data = string
19 include Sigs.AUX.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 cdata_section : t
44 (** Represents the QName of a document node. Equivalent to
45     [of_string "#cdata-section"]
46 *)
47
48 val comment : t
49 (** Represents the QName of a comment node. Equivalent to
50     [of_string "#cdata-section"]
51 *)
52
53 val document_fragment : t
54 (** Represents the QName of a document fragment. Equivalent to
55     [of_string "#document-fragment"]
56 *)
57
58 val attribute_map : t
59 (** Represents the QName of a dummy document node holding the
60     attributes of the current element. Equivalent to
61     [of_string "#attribute-map"]
62 *)
63
64 val nil : t
65 (** Represents the QName of a nil node. Equivalent to
66     [of_string "#"]
67 *)