Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Corrected links that should have been relative instead of absolute.

Following are the guidelines or rules that a user must follow while enabling streaming for both existing and new mappings

Mapping Rules

Given below is a mapping example that would simplify and explain the rules to be followed for streaming.

                                   

  1. To map leaf nodes from source to targetdestinationyou should map their parent nodes first.
    For example
    , in the above scenario, to map Address1 in source to Address1 in targetdestination, you should first map their parent nodes, that is the branch node ‘AddressDetails’ of source to the branch node ‘Address’ of targetnode ‘Address’ of destination.



  2. You can map the leaf nodes from source to target destination whose parents are mapped together.
    For example, in the above scenario, you can map a leaf node of ‘AddressDetails’ branch (Address1, Address2, City or Country) to any leaf node of ‘Address’ branch only (Address1, Address2, City or Country) given the fact that you have mapped AddressDetails to Address branch. You cannot map any node of AddressDetails to a node of ‘Personal’ or ‘Item’ branches.
     
  3. You can map a branch node from source to only one branch node at targetdestination.
    For example,
     Since AddressDetails is already mapped with Address branch, you cannot map ‘AddressDetails’ to ‘Personal’

  4. You cannot use For-each rule to map multiple branch nodes of a Root node.
    For example, it is not possible to apply For-each rule on ‘Person’ in target destination of ‘Person’ in source and apply For-each rule on ‘Order’ in target destination of ‘OrderDetails’ in source at the same time.

  5. You can apply For-each rule on a branch node whose parent branch is mapped to the branch in target but destination but is NOT recommended since the mapping might falter in a complex hierarchy.
    For example, it is possible to apply a For-each rule on Address of AddressDetails and map Address1 but is not recommended.



    Remember while using For-each rule, check the output of mapping in debugger and make sure it is correct.

  6. To duplicate a source branch node at the targetat the destination, simply map the branch nodes to each other.
    For example, if you want ‘Item’ to occur the same number of times as ‘ItemDetails’ then,simply map ‘ItemDetails’ node of source to ‘Item’ node in targetdestination.



    Note that the parent branches of ‘ItemDetails’ node, namely, ‘OrderDetails’ and ‘BillDetails’ nodes are mapped to ‘Order’ and ‘Bill’ nodes respectively at the target following destination following the Rule #1.

  7. You can formulate the textual rules only within those branches that are mapped to each other.
    For example, in ‘Item’ branch, you can formulate the textual rules using leaf nodes of ‘ItemDetails’ of source following Rule #1.



  8. You cannot create a global variable and initialize it with a source value.
    For example,
    You cannot create a global variable in mapping and store the value of ‘ItemColor’ from source in it.

  9. Once a leaf node is mapped from source to targetdestination, the parent is loaded into memory. Remember, if the parent contains huge data, streaming may not work. This limitation applies only to schemas with a complex hierarchy.
    For example, in the above scenario, BillingAddress and ItemDetails node will be loaded into memory as their leaf nodes are mapped. Also note- BillDetails Node (Parent Node of BillingAddress and ItemDetaIls) will not be loaded in memory. 

 

Info
titleNotes to success

If the mapping created is not in sync with the above rules, the output will not be generated. You can manage the errors (if any) from the debugger.

To enable streaming in an existing or a new mapping, follow Enabling Streaming. 

XSL limitations

Due to limitations of XSL, the following functions are not supported in streaming mode:

  • AXIS functions 
  • Aggregate functions 
  • Key functions