X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2FqName.mli;fp=src%2FqName.mli;h=978ba3c664d918ffe9983246213650e02caa8255;hp=0000000000000000000000000000000000000000;hb=b00bff88c7902e828804c06b7f9dc55222fdc84e;hpb=03b6a364e7240ca827585e7baff225a0aaa33bc6 diff --git a/src/qName.mli b/src/qName.mli new file mode 100644 index 0000000..978ba3c --- /dev/null +++ b/src/qName.mli @@ -0,0 +1,70 @@ +(***********************************************************************) +(* *) +(* TAToo *) +(* *) +(* Kim Nguyen, LRI UMR8623 *) +(* Université Paris-Sud & CNRS *) +(* *) +(* Copyright 2010-2012 Université Paris-Sud and Centre National de la *) +(* Recherche Scientifique. All rights reserved. This file is *) +(* distributed under the terms of the GNU Lesser General Public *) +(* License, with the special exception on linking described in file *) +(* ../LICENSE. *) +(* *) +(***********************************************************************) + +(* + Time-stamp: +*) + +(** Implementation of qualified names as hashconsed strings *) + +include Hcons.S with type data = string +include Common_sig.Printable with type t := t + + +val of_string : string -> t +(** Utility function, equivalent to [make] *) + +val to_string : t -> string +(** Utility function, equivalent to [node] *) + + +(** Special constants, that denote the QName of nodes that are not + elements (using the nodeValue property of DOM for such nodes. +*) + +val document : t +(** Represents the QName of a document node. Equivalent to + [of_string "#document"] +*) + +val text : t +(** Represents the QName of a text node. Equivalent to + [of_string "#text"] +*) + +val comment : t +(** Represents the QName of a comment node. Equivalent to + [of_string "#comment"] +*) + +val nil : t +(** Represents the QName of a nil node. Equivalent to + [of_string "#"] +*) + +val attribute : t -> t +(** Adds a prefix character (@) to distinguish the name + from an element name +*) + +val processing_instruction : t -> t +(** Adds a prefix character (?) to distinguish the name + from an element name +*) + +val remove_prefix : t -> t +(** Removes the prefix of the qname given as argument. Does not + do anything if there is no prefix. +*)