www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Virtuoso Functions Guide

Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Phrases
RDF data
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
VAD
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web & Internet
dav add & update fun...
dav lock manipulatio...
dav manipulation fun...
dav search functions
dav_exp
lfs_exp
serv_queue_top
urlrewrite_create_re...
user_key_load
vhost_define
vhost_remove
webdav users & group...
client_attr
connection_get
connection_id
connection_is_dirty
connection_set
connection_vars
connection_vars_set
dbname
ftp_get
ftp_ls
ftp_put
get_certificate_info
get_keyword
get_keyword_ucase
http
http_acl_get
http_acl_remove
http_acl_set
http_body_read
http_client
http_client_ext
http_client_ip
http_debug_log
http_enable_gz
http_file
http_flush
http_get
http_header
http_header_get
http_kill
http_listen_host
http_lock
http_map_get
http_map_table
http_param
http_path
http_pending_req
http_physical_path
http_proxy
http_request_get
http_request_header
http_request_status
http_rewrite
http_root
http_unlock
http_url
http_value
http_xslt
json_parse
ses_connect
ses_disconnect
ses_read_line
ses_write
tcpip_gethostbyaddr
tcpip_gethostbyname
vsp_calculate_digest
wsdl_import_udt
XML
XPATH & XQUERY

Functions Index

http_value

write to HTTP client or string output stream with HTML escapes
http_value (in val_exprany, [in tag varchar], [in stream any]);
Description

The http_value is used to write to an HTTP client (when in a VSP context) or a specified string output stream. http_value uses HTML-escapes for characters that should be escaped according to the HTML spec.

Parameters
val_expr – A value expression. May be any string expression. If val_expr is an XML entity, a serialization of the entity is written to the stream. This is not the string value of the XML fragment, but a serialization of the XML fragment as text including all the markup, i.e. elements, attributes, namespaces, text nodes, etc. To get the string value of an XML entity, convert it to a varchar using cast. Casting as varchar will only produce a concatenation of the text nodes in the XML fragment, leaving out elements, attributes, name spaces, etc.
tag – Optional. If present and is a string, the output will be enclosed in tags named as the string content of tag. If the expression evaluates to 0 or null, it will be ignored.
stream – Optional parameter. If omitted or is 0 and the function is executed within a VSP context, the val_expr will be written to the HTTP client. If present and non-zero, val_expr will be written to the specified stream. If non-zero, the value must be a valid stream obtained from function string_output
Return Values

None

Errors
SQLSTATE Error Code Error Text Description
37000 HT006 http output function outside of http context and no stream specified: %s occurs if called outside VSP and no string session is given
22023 SR066 Unsupported case in CONVERT (<data_type_of 1st arg> -> VARCHAR): %s if the value passed as the 1st argument can't be converted to a VARCHAR value and it's not a XML/XQUERY tree

Using http_value()
HTTP output

Output of various flavours of http. See string_output and string_output_string for examples how to use http to write to streams other than the HTTP output.

http (' % <b>')     ' <b>
http_value (' % <b>')   % &lt;b&gt;
http_url (' % <b>')  +%25+<b>
http_value (12, 'li')  <li>12</li>
See Also

http, http_url, string_output, http_rewrite.