This blog is for a new feature coming out in Oracle Integration Cloud (OIC) February 2021 release.
Previously the XSLT source code corresponding to a map, was available in readonly mode in Mapper UI. With this new feature, the editing of the XSL source code is allowed in the Mapper UI in the 'Code' tab like below:
This action is useful for use cases in which mapping is not possible in the graphical mapper. This eliminates the need to export your XSLT code from Oracle Integration, edit the code manually in a text editor or in a separate graphical tool such as Eclipse or Oracle JDeveloper and then re-import the code into the mapper in Oracle Integration.
Some examples of the use cases in which the mapping not possible in the graphical mapper and the editing in the Code tab can be used are:
When the Mapper UI is launched for a map, the default tab is 'Designer' tab. However if the map contains reference to unsupported constructs, i.e constructs which are not recognised or allowed by the Designer tab of the Mapper, then the 'Code' tab is launched by default. In such a use case, an informational message is displayed to indicate the reason clearly like below:
Click on the number to the left of the message to view the reasons why the graphical view is not available, like below:
A few sections of the map are not allowed for editing and are rendered in readonly mode in the Code tab. Those sections are listed below:
The 'version' attribute of the 'xsl:stylesheet' element in the map is not allowed for editing, hence displayed in the view only mode like below:
The section where the map's sources and target are specified, under the '
oracle-xsl-mapper:schema' is not allowed for editing and is rendered in read only mode in the Code tab like below:
The statements declaring the global params in the map is not allowed for editing and displayed in readonly mode.
The remaining sections in the map are allowed for editing in the Code tab.
The user can edit the mappings or create new mappings in the Code tab and navigate to other tabs if needed. If the edit made in the Code tab results in any xml syntax error, for example, there is no matching closing tag found for an opening tag, then the navigation to other tabs like Test, Designer, Recommend is not allowed until the syntax error is fixed. The error is indicated with an error message in the banner of the page as well as the text below the line where the matching closing tag is not found, is highlighted in red font. Below is a sample screenshot demonstrating this use case:
In the screenshot above, there is no matching closing tag found for the opening tag '<xsl:if>' at line no.34 and there is an attempt made to navigate to 'Recommend' tab which is prevented and the message is displayed.
If the map refers to any constructs not supported in the Designer Tab, then on trying to navigate to the Designer/Recommend Tab, the tab is disabled and messages explaining the reason is displayed, like described in the 'Availability of Designer Tab (Graphical UI) in Mapper' section. If the unsupported constructs are removed, on trying to navigate to the Designer/Recommend tab, the tab becomes available again.
The user can navigate to the 'Test' tab any time while editing the source code in the Code tab. If there are any XSLT validation errors, like a required attribute for a XSLT construct being empty, those error/warning messages are displayed in the banner of the page and the test tab is displayed.
|Undo your last editing changes to the XSLT code.|
|Redo your last editing changes to the XSLT code.|
|Search for specific entries in your XSLT code. Use the next () and previous () buttons to navigate through the code.|
|Find and replace specific entries in your XSLT code.
|Enter the line number in your XSLT code to access.|
PS: Undo/Redo history is reset each time the user navigates to other tabs i.e the undo/redo history of the edits made in a tab is local to the tab and works as long as the user stays on the same tab and is lost if the user navigates to other tabs and returns to the tab where the user was editing the mappings. The undo/redo becomes available for the new changes again.
Once the source code is edited, the changes can be saved by clicking on the 'Validate' button at the top right corner. This triggers the validation process on the edited source code and if any error/warning exists, the corresponding message is displayed in the banner.
If any xml syntax errors are found on validating, for example, no matching closing tag found for an opening tag, the error message is displayed in the UI and the changes made are not saved to the map. The errors need to be fixed in order to save the changes. If the user chooses to exit the mapper ui, without fixing the errors, then the changes made in the code tab are not saved to the map.
If there are any xsl syntax errors found in the validation of the source code, for ex, a typographical error in the xsl construct name or a required attribute of a xsl construct missing its value, then the changes are saved to the map and the corresponding error/warning message is displayed in the UI. If the user chooses to exit the mapper UI without fixing the errors/warnings, then the map action is marked with a error/warning badge in the integration layout screen. However the changes made by the user would be saved to the map and the user can always revisit the mapper UI to fix the errors/warnings.