Home > Contents > Index >
XMLUTILS.TRANSFORM
Reads XML data from an input file according to specified parameters, transforms it using an XSLT style sheet, and returns the transformed XML.
Syntax
<XMLUTILS.TRANSFORM INPUTVALTYPE="input_value_type
" INPUTVAL="xml_content
" STYLESHEET="stylesheet_location
" OUTPUTVALTYPE ="output_value_type
" OUTPUTVAL="variable_name
"/>Parameters
INPUTVALTYPE
(required)- Description of the XML data to be passed to the
INPUTVAL
parameter and transformed. Data can be referenced as an XML string only. Specify the following valid type:
stream
Indicates that the input data is actual XML content in string format.
INPUTVAL
(required)- Specifies input data, which must correspond to the specified
INPUTVALTYPE
. Input data, which takes the following form:
- XML string
STYLESHEET
(required for explicit style sheets)- Use this parameter to specify a style sheet that is external to the input XML. As a value, enter a URI that represents the style sheet. A URI is a string that conforms to URI syntax.
- Note that this parameter does not apply to implicit style sheets, which are included in the input XML. When the
STYLESHEET
parameter is omitted, the style sheet is assumed to be implicit by default.
OUTPUTVALTYPE (required)
- Specification for the XML format that the output (transformed data) takes. Data can be returned as either an XML DOM or XML string. Depending on the XML format you want as output from your style sheet, specify either of the following valid types:
dom
Indicates that the transformed XML content is an XML DOM object.
stream
Indicates that the output data is a string containing the transformed XML content.
OUTPUTVAL (required)
- Name of the variable that contains the resulting transformed output.
Description
The
XMLUTILS.TRANSFORM
tag reads XML data according to specified type of XML (string), transforms it using an XSLT style sheet, and returns the transformed XML. During transformation, the input XML is also checked and validated against referenced DTDs, if any. The style sheet specified for the transformation can be implicit (included in the XML file) or explicit (included as a separate file). The parameters you specify determine how the input data is read and how the output is returned. If the style sheet is included in a separate file, you must set theSTYLESHEET
parameter. If the style sheet is included in the XML file, the tag reads the style sheet from the input XML.The output of the
XMLUTILS.TRANSFORM
tag is a variable.Error Numbers
The possible values of
errno
include:
Value Description 0 Success. The XML input was successfully transformed. -100 General exception failure.Examples
The following examples demonstrate syntax and parameters when the input file is is an XML string.
Input XML file is a string, an explicit style sheet is applied, and the output is specified as an XML string:
<XMLUTILS.TRANSFORM INPUTVALTYPE="stream" INPUTVAL="<?xml version . . . > . . . " STYLESHEET="file:///location/filename.xsl" OUTPUTVALTYPE = "stream" OUTPUTVAL="transformedOutputVar"/>Accepts the input XML file in the form of a string. Note that the transformation is done using a separate style sheet, specified with the
STYLESHEET
parameter. The output, specified by thestream
value, is a string.
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.