1 (***********************************************************************)
5 (* Kim Nguyen, LRI UMR8623 *)
6 (* Université Paris-Sud & CNRS *)
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 *)
14 (***********************************************************************)
17 Time-stamp: <Last modified on 2013-02-14 16:14:44 CET by Kim Nguyen>
20 include Hcons.Make (struct
22 let hash s = Hashtbl.hash s
23 let equal s1 s2 = s1 = s2
26 let print pp s = Format.fprintf pp "%s" s.node
31 let document = of_string "#document"
32 let text = of_string "#text"
33 let cdata_section = of_string "#cdata-section"
34 let comment = of_string "#comment"
35 let document_fragment = of_string "#document-fragment"
36 let attribute_map = of_string "#attribute-map"
37 let nil = of_string "#"
38 let attribute_prefix = of_string "@"
39 let has_attribute_prefix s =
41 String.length s > 0 && s.[0] = '@'
43 let add_attribute_prefix s =
44 of_string ("@" ^ (node s))