Library
Module
Module type
Parameter
Class
Class type
Simple content-type parsing/printing. Tries to implement RFC 2045.
Non-empty string containing only ascii CHAR except SPACE, CTLs, or tspecials as defined here.
type subty = token
type error = string * Lexing.position
val string_of_error : error -> string
create ?paramers ty subty
creates a new content-type.
val default : t
Default content-type is text/plain
with charset
parameter set to "us-ascii"
.
val to_string : t -> string
value p t
returns value associated to parameter p
in t
, if any.
value p def t
returns value associated to p
in t
, or def
if there is no parameter p
in t
.
val mime_to_string : mime -> string
has_mime ct mime
returns true
is type and subtype of mime
are the same as in ct
, else false
.
val ct_turtle : t
text/turtle
val ct_xmlrdf : t
application/rdf+xml
val ct_sparql_update : t
application/sparql-update
val ct_text : t
text/plain
val ct_xhtml : t
application/xhtml+xml
val mime_turtle : mime
text/turtle
val mime_xmlrdf : mime
application/rdf+xml
val mime_sparql_update : mime
application/sparql-update
val mime_text : mime
text/plain
val mime_xhtml : mime
application/xhtml+xml