About Entity-to-Entity Advanced Mapping XQuery Expressions

This topic describes how to use the Mapping Rule editor, Mapping tab, Mapping subtab, Mapping Rule Item area, XQuery subtab to write an expression that defines an advanced mapping between two entities. This field is displayed when you select the target of an entity-to-entity mapping. This is the only type of mapping available for entity-to-entity mapping.

  • Context: The input document is a source order item.

  • Prolog: You can declare any namespaces needed to construct the target property (or properties) in the XQuery prolog. For example:

    declare namespace prop='http://oracle.communications.cso;
    
  • Body: The XQuery body returns a list of order item properties to be set on the target order item. If the property already exists on the target order item, it will be overwritten by the value returned from this XQuery expression.

The following example shows an XQuery expression that returns the structured Parameters property for the target order item.

declare namespace prop='http://oracle.communications.cso;
<prop:Parameters xmlns:param="http://oracle.communications.broadband">
   <parm:AAAAccount>Account1</parm:AAAAccount>
   <parm:DownloadSpeed>6</parm:DownloadSpeed>
   <parm:UploadSpeed>0.6</parm:UploadSpeed>
   <parm:MAC/>
   <parm:Brand>Siemens</param:Brand>
   <parm:Model>4200</parm:Model>
   <parm:Firewall>Y</parm:Firewall>
</prop:Parameters>