doTranslateToNative
This function translates the input DOM to a string or attachment. The targetType can be a STRING or ATTACHMENT.
Signature:
med:doTranslateToNative('input','nxsdTemplate','nxsdRoot','targetType','attachment element'?)
Arguments:
-
input: The input data of the XPath function. The data can either be DOM or SDOM data that must be translated to a native format such as comma-separated values (CSV).The input node is usually the root element of the incoming DOM, as shown in the following example:
med:doTranslateToNative($in.request/inp1:Root-Element, 'xsd/address_csv.xsd', @ 'Root-Element','STRING')"However, the input node can also be a subelement and not the root element of the incoming DOM, as shown in the following example:
med:doTranslateToNative($in.request/inp1:requestToNative/ns1:Root-Element, 'xsd/address_csv.xsd', 'Root-Element','ATTACHMENT', $in.request/inp1:requestToNative/inp1:attachment)In this case, you must set the
useArrayIdenitiferproperty totruein the schema node of the NXSD, as shown below.nxsd:useArrayIdentifiers="true"
This setting can adversely impact the performance of this function for very large inputs. You can use the
dostreamingxlatefunction in this case. -
nxsdTemplate: The NXSD schema to use to translate the input data to XML format. -
nxsdRoot: The root element in the NXSD schema. -
targetType: Determines how the XPath function translates the native data into XML. -
attachment element: The attachment for the returned XML. This parameter is optional.
Property IDs:
-
namespace-uri:http://schemas.oracle.com/xpath/extension -
namespace-prefix:med
Example:
med:doTranslateToNative($in.request/inp1:Root-Element,'xsd/address_csv.xsd','Root-Element','STRING')