rasqal_new_string_literal

Name

rasqal_new_string_literal --  Constructor - Create a new Rasqal string literal

Synopsis

rasqal_literal* rasqal_new_string_literal (const unsigned char * string, const char * language, raptor_uri * datatype, const unsigned char * datatype_qname);

Arguments

string

UTF-8 string lexical form

language

RDF language (xml:lang) (or NULL)

datatype

datatype URI (or NULL)

datatype_qname

datatype qname string (or NULL)

Description

All parameters are input parameters and if present are stored in the literal, not copied.

The datatype and datatype_qname parameters are alternatives; the qname is a datatype that cannot be resolved till later since the prefixes have not yet been declared or checked.

If the string literal is datatyped and of certain types recognised it may be converted to a different literal type by rasqal_literal_string_to_native.

Return value

New rasqal_literal or NULL on failure