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
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY
and
append
assign
avg
boolean
ceiling
concat
contains
count
create-attribute
create-comment
create-element
create-pi
current
distinct
doc
document
document-literal
empty
ends-with
every
except
false
filter
floor
fn:collection
for
format-number
function-available
generate-id
id
if
intersect
is_after()
is_before()
key
lang
last
let
list()
local-name
max
min
name
namespace-uri
normalize-space
not
number
or
position
processxquery
processxslt
processxsql
progn()
replace()
round
serialize
shallow
some
starts-with
string
string-length
substring
substring-after
substring-before
sum
system-property
text_contains()
translate
true
tuple()
union
unordered
unparsed-entity-uri
urlify
xmlview

Functions Index

processXSQL

Executes XSQL page and returns the result.
entity processXSQL ( xsql_page_uri string);
Description

This function takes a URI of an XSQL page, compiles the page into a Virtuoso/PL procedure (if not compiled earlier) and executes the compiled procedure. The current entity is passed to the page procedure as "context XML" argument. The function returns the XML document composed by page procedure. The result tree is separate from the argument tree and the only reference to it is the returned entity.

For compatibility, the processXSQL() function can also be called as http://schemas.oracle.com/xpath/extension:processXSQL().

Parameters
xsql_page_uri – URI pointing to the location of an XSQL page. It can be absolute or relative. Relative xsql_page_uri should be resolved before use, this requires base URI information. Base URI can be declared explicitly by "__base_uri" parameter in XPATH or "declare base-uri" setter in XQuery. If this is not declared but the expression is a part of some stylesheet or XQuery module then the URI of the stylesheet or module is used as a base URI. A run-time error is signalled if the URI is relative and the expression does not contain explicit declaration and the expression is neither in a stylesheet nor in a module. In current version of Virtuoso, XSQL page should be either a file (with URI like "file://...") or a DAV resource (with URI like "virt://WS.WS.SYS_DAV_RES.RES_FULL_PATH.RES_CONTENT:...")
Return Types

The function returns an XML entity that is the root entity of the resulting document of an XSQL page.

Examples
Simple call

The query passes its argument to the XSQL page and returns its result. This is the simplest way of calling an XSQL page.

processXSQL ("file://sample.xsql")
See Also

processXSLT()

processXQuery()