This function returns the media type in effect for the result of the xslt() (XSL-T) transformation , based on xsl:output "media-type" and "method" attributes of the XSL-T style-sheet applied. It accepts an entity (potentially resulting from using xslt()) as a argument and will return a string containing the media-type.
If xsl:output "media-type" specified in XSL-T sheet it's value will be returned. If no "media-type" is specified, the valid results dependant on the <xsl:output "method" attribute are:
This function can generate the following errors:
22023 SR003 Function xml_tree_doc_media_type needs an XML entity as argument 1, not an arg of type <type_name> (<type>)
-- x.xsl -- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text" /> .... </xsl:stylesheet> -- execute a simple transformation via ISQL tool SQL> select xml_tree_doc_media_type (xslt ('file:/x.xsl',xml_tree_doc ('<A />'))); Connected to OpenLink Virtuoso Driver: 03.00.2310 OpenLink Virtuoso ODBC Driver callret VARCHAR _______________________________________________________________________________ text/plain 1 Rows. -- 95 msec.