Tuesday, January 13, 2015

Sub Templates in Oracle XML BI Publisher

There May be scenarios that where and when we have some part of XML data needs to be represent in fixed format and remaining XML data needs to be represent in multiple formats based on some conditions (let us say for each country specific remaining data XML data needs to be processed) in that case  once after registering the concurrent program (either rdf or Data template type) we can create one Default data template for the concurrent program  and other multiple sub templates for each country specific .

 Create one Default or main Data template for concurrent program along with the multiple sub templates for the same data definition in oracle apps.

We can create sub templates in the oracle apps by selecting sub template option as "Yes" while creating template using Xml Publisher Administrator responsibility.

While creating the main or Default Data template RTF file first we have to import all the sub templates that are going to be called in this as below.

<?import:xdo://XXPIC.TEST_FRT.en.us?>

xxpic ->Application Shortname
TEST_FRT-> Subtemplate Code.

After Importing all required sub templates  next we have to design the layout that is common in all cases.

Now based on conditions we have to call different sub templates.

<?IF:SUBTEMPLATE='TEST_FRT'?> <?call-template:TEST?> <?END IF?>
<?IF:SUBTEMPLATE='TEST_FRT2'?><?call-template:TEST1?><?END IF?>

Here TEST and TEST 1 are Sub template Names

This concludes the creation of the Main RTF template.

Now in each Sub template we have to design the layout between below tags.

<?TEMPLATE:TEST?>
----Layout design---
<?END TEMPLATE?>

TEST : Sub template Name


Please See this Oracle white Paper on Sub templates

No comments:

Post a Comment