Name

http_xslt — applies an XSLT stylesheet to the output of a VSP page

Synopsis

http_xslt ( in xslt_uri varchar ,
in params any );

Description

This function can be called inside a VSP page to apply an XSLT stylesheet to the output of the page once the page is complete. This function will return immediately and the stylesheet will not be applied until the page is successfully formed. Any errors arising in the stylesheet processing will be reported to the web client.

The stylesheet does not have to be previously defined. The URI supplied will be used to locate the stylesheet. This can be a file, an HTTP URL or a virt:// URI for a stylesheet stored in a local table. Virtuoso will cache the stylesheet after first use. You can clear the cache entry with the xslt_stale() function.

For this to work the text generated by the VSP page should be well-formed XML.

This function is only valid in a VSP context. The xsl:output element will control the Content-Type sent to the user agent.

Parameters

xslt_uri

Absolute URI of the XSL stylesheet

params

Even length array of name/value pairs.

Examples

Example24.183.Performing XSLT Transformation of VSP Output

  <?vsp
    http ('<a><b>simple XML document</b></a>');
    http_xslt ('file://');
  ?>