Thursday, September 12, 2024

OIC Gen 3 - Working with XSLT constructors

If we open toggle function pallet, by default we would not see the XSL constructors, we have to click the XSLT button to enable to see it.



If we drag the xsl statement and hover or drop it in front of the element, then it will be added as child component of the element.



If we drag the xsl statement and hover or drop it at the back of the element name, then it willbe added as parent component of the element.



Note:

  • Select If statement to specify single condition
  • use choose when otherwise to specify multiple conditions. 
  • For looping logic, use for-each statment. 
  • We can also use xslt output >> literal, text, attribute, copy-of and value- of  to set default values in the mapper. 
  • Using a copy-of element, we can perform a deep copy of elements from source to target with a copy-of constructor if both have same set of elements.


Xslt code editor use cases:
  • Create internal variables
  • Correlate multiple data  sources grouped by key field using the xsl for each group constructor.
  • Create target name value pairs.
  • Implement push style xslt (call template, apply template)
  • Write custom xslt functions
  • Copy node sets

Edit xslt code in oracle jdeveloper:
  • Export the code.
    • Design the integration flow logic
    • Open the empty map action
    • Map one data value from each required structure to the target
    • Validate and clodw the mapper
    • Save and the close the integration
    • Export the entire integration archive (.iar file), for projects export the .car file.
  • Import the iar file oracle jdeveloper
    • Create an OSB application and project
    • Import the integration archive to the osb project.(service bus resources >> select zipped or archived files >> selct file >> import.
  • Locate and open to edit the .xsl file
  • Import the .xsl file(not the entire integration) back to the oic mapper.

No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...