Top

Name

xml_uri_get — Retrieve a resource based on a URI

Synopsis

varchar DB.DBA. xml_uri_get ( in base varchar ,
  in ref varchar );
 

Description

This function combines a base URI and a relative URI and returns the referenced resource.

The supported protocol identifiers are http: file: and virt:. The virt: allows referencing data stored in local Virtuoso tables without passing through HTTP. See 'Entity References in Stored XML' for details.

The effective URI will be the reference if the URI of the reference is absolute. Otherwise it will be the base URI modified by the relative reference.

Authorization is derived from the SQL or DAV identification of the caller. The DAV identification is used if processing DAV content in response to a DAV request. The SQL user account is used otherwise.

xml_uri_get returns the text of the requested resource. If specific encodings or special authentication schemes are desired one may use http_get directly.

Parameters

base

A string containing the name of the location (URI) of the resource to be referenced.

ref

The name of the resource as a relative reference from the base URI.

Return Types

The referenced resource.

Errors

Table 24.131. Errors signalled by

SQL State Error Code Error Text Description
 

Examples

Example 24.520. Basic Application of xml_uri_get()

declare doc_base varchar;
declare doc_tree any;

doc_base := 'virt://WS.WS.SYS_DAV_RES.RES_FULL_PATH.RES_CONTENT:/DAV/docsrc/';
doc_tree := xml_tree_doc(xml_tree(
    xml_uri_get(doc_base, 'virtdocs.xml')
      ), doc_base);

http_value(
  xslt('virt://WS.WS.SYS_DAV_RES.RES_FULL_PATH.RES_CONTENT:/DAV/stylesheets/html_chapter.xsl',
    doc_tree
  )
);


See Also

??? xslt()

??? http_value()

??? xml_tree_doc()

??? xml_tree()