15.92 SEM_APIS.ESCAPE_RDF_VALUE

Format

SEM_APIS.ESCAPE_RDF_VALUE(
     val         IN VARCHAR2 CHARACTER SET ANY_CS, 
     utf_encode  IN NUMBER DEFAULT 1,
     allow_long  IN NUMBER DEFAULT 0,
     options     IN VARCHAR2 DEFAULT NULL,
     max_vc_len  IN NUMBER DEFAULT 4000 
     ) RETURN VARCHAR2 CHARACTER SET val%CHARSET;

Description

Returns the input CLOB value with special characters and non-ASCII characters escaped as specified by the W3C N-Triples format (http://www.w3.org/TR/rdf-testcases/#ntriples).

Parameters

val

The text to escape.

utf_encode

Set to 1 (the default) if non-ASCII characters and non-printable ASCII characters other than chr(8), chr(9), chr(10), chr(12), and chr(13) should be escaped. Otherwise, such characters will not be escaped.

allow_long

Set to 1 (default 0) if values longer than 4000 bytes should be allowed.

options

Reserved for future use.

max_vc_len

The maximum allowed length of a VARCHAR RDF term - 32767 or 4000 (the default).

Usage Notes

For information about using the DO_UNESCAPE keyword in the options parameter of the SEM_MATCH table function, see Using the SEM_MATCH Table Function to Query Semantic Data.

Examples

The following example escapes an input character string containing TAB and NEWLINE characters.

SELECT SEM_APIS.ESCAPE_RDF_VALUE('abc' || chr(9) || 'def' || chr(10) || 'hij')
  FROM DUAL;