text
stringlengths 65
20k
|
---|
6.Drag and drop the choose statement as a child of phone .Chapter 4 Use Conditional Mappings 4-2 The cursor position surrounding phone indicates whether the choose statement can be inserted as a child (bottom left) or a parent (upper right).For this case, choose is inserted as a child.7.Drag and drop a when statement as a child of the choose statement three times to create placeholders for the three conditions.You can also drop a when statement as a sibling before or as a sibling after another when statement.Chapter 4 Use Conditional Mappings 4-3 Each condition also needs a corresponding mapping value.8.Drag and drop a value-of statement as a child of each when statement.The tree structure needed to create conditional expressions and mapping expressions is now complete.Expressions for the first condition and mapping can now be created.if PER03 == 'TE' { Contact.Phone = PER04 }Chapter 4 Use Conditional Mappings 4-49.Select the first when statement in the target tree to create the first condition.10.Drag and drop PER03 from the source tree into the expression.11.Enter = "TE" to complete the expression.12.Click the checkmark to save the expression.13.To create the mapping, select the value-of statement under the first when .14.Drag and drop PER04 into the target value-of statement. |
Chapter 4 Use Conditional Mappings 4-2 The cursor position surrounding phone indicates whether the choose statement can be inserted as a child (bottom left) or a parent (upper right).For this case, choose is inserted as a child.7.Drag and drop a when statement as a child of the choose statement three times to create placeholders for the three conditions.You can also drop a when statement as a sibling before or as a sibling after another when statement.Chapter 4 Use Conditional Mappings 4-3 Each condition also needs a corresponding mapping value.8.Drag and drop a value-of statement as a child of each when statement.The tree structure needed to create conditional expressions and mapping expressions is now complete.Expressions for the first condition and mapping can now be created.if PER03 == 'TE' { Contact.Phone = PER04 }Chapter 4 Use Conditional Mappings 4-49.Select the first when statement in the target tree to create the first condition.10.Drag and drop PER03 from the source tree into the expression.11.Enter = "TE" to complete the expression.12.Click the checkmark to save the expression.13.To create the mapping, select the value-of statement under the first when .14.Drag and drop PER04 into the target value-of statement.The first conditional mapping is complete. |
For this case, choose is inserted as a child.7.Drag and drop a when statement as a child of the choose statement three times to create placeholders for the three conditions.You can also drop a when statement as a sibling before or as a sibling after another when statement.Chapter 4 Use Conditional Mappings 4-3 Each condition also needs a corresponding mapping value.8.Drag and drop a value-of statement as a child of each when statement.The tree structure needed to create conditional expressions and mapping expressions is now complete.Expressions for the first condition and mapping can now be created.if PER03 == 'TE' { Contact.Phone = PER04 }Chapter 4 Use Conditional Mappings 4-49.Select the first when statement in the target tree to create the first condition.10.Drag and drop PER03 from the source tree into the expression.11.Enter = "TE" to complete the expression.12.Click the checkmark to save the expression.13.To create the mapping, select the value-of statement under the first when .14.Drag and drop PER04 into the target value-of statement.The first conditional mapping is complete.15.Repeat these steps for the second and third conditional mappings to complete the mapping logic. |
7.Drag and drop a when statement as a child of the choose statement three times to create placeholders for the three conditions.You can also drop a when statement as a sibling before or as a sibling after another when statement.Chapter 4 Use Conditional Mappings 4-3 Each condition also needs a corresponding mapping value.8.Drag and drop a value-of statement as a child of each when statement.The tree structure needed to create conditional expressions and mapping expressions is now complete.Expressions for the first condition and mapping can now be created.if PER03 == 'TE' { Contact.Phone = PER04 }Chapter 4 Use Conditional Mappings 4-49.Select the first when statement in the target tree to create the first condition.10.Drag and drop PER03 from the source tree into the expression.11.Enter = "TE" to complete the expression.12.Click the checkmark to save the expression.13.To create the mapping, select the value-of statement under the first when .14.Drag and drop PER04 into the target value-of statement.The first conditional mapping is complete.15.Repeat these steps for the second and third conditional mappings to complete the mapping logic.if PER05 == 'TE' { Contact.Phone = PER06 } if PER07 == 'TE' { Contact.Phone = PER08 } 16.Save the mapping and integration. |
You can also drop a when statement as a sibling before or as a sibling after another when statement.Chapter 4 Use Conditional Mappings 4-3 Each condition also needs a corresponding mapping value.8.Drag and drop a value-of statement as a child of each when statement.The tree structure needed to create conditional expressions and mapping expressions is now complete.Expressions for the first condition and mapping can now be created.if PER03 == 'TE' { Contact.Phone = PER04 }Chapter 4 Use Conditional Mappings 4-49.Select the first when statement in the target tree to create the first condition.10.Drag and drop PER03 from the source tree into the expression.11.Enter = "TE" to complete the expression.12.Click the checkmark to save the expression.13.To create the mapping, select the value-of statement under the first when .14.Drag and drop PER04 into the target value-of statement.The first conditional mapping is complete.15.Repeat these steps for the second and third conditional mappings to complete the mapping logic.if PER05 == 'TE' { Contact.Phone = PER06 } if PER07 == 'TE' { Contact.Phone = PER08 } 16.Save the mapping and integration.The completed design looks as follows. |
Chapter 4 Use Conditional Mappings 4-3 Each condition also needs a corresponding mapping value.8.Drag and drop a value-of statement as a child of each when statement.The tree structure needed to create conditional expressions and mapping expressions is now complete.Expressions for the first condition and mapping can now be created.if PER03 == 'TE' { Contact.Phone = PER04 }Chapter 4 Use Conditional Mappings 4-49.Select the first when statement in the target tree to create the first condition.10.Drag and drop PER03 from the source tree into the expression.11.Enter = "TE" to complete the expression.12.Click the checkmark to save the expression.13.To create the mapping, select the value-of statement under the first when .14.Drag and drop PER04 into the target value-of statement.The first conditional mapping is complete.15.Repeat these steps for the second and third conditional mappings to complete the mapping logic.if PER05 == 'TE' { Contact.Phone = PER06 } if PER07 == 'TE' { Contact.Phone = PER08 } 16.Save the mapping and integration.The completed design looks as follows.Chapter 4 Use Conditional Mappings 4-5 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations You can use a counter inside a for-each loop to track the number of iterations processed by the loop. |
8.Drag and drop a value-of statement as a child of each when statement.The tree structure needed to create conditional expressions and mapping expressions is now complete.Expressions for the first condition and mapping can now be created.if PER03 == 'TE' { Contact.Phone = PER04 }Chapter 4 Use Conditional Mappings 4-49.Select the first when statement in the target tree to create the first condition.10.Drag and drop PER03 from the source tree into the expression.11.Enter = "TE" to complete the expression.12.Click the checkmark to save the expression.13.To create the mapping, select the value-of statement under the first when .14.Drag and drop PER04 into the target value-of statement.The first conditional mapping is complete.15.Repeat these steps for the second and third conditional mappings to complete the mapping logic.if PER05 == 'TE' { Contact.Phone = PER06 } if PER07 == 'TE' { Contact.Phone = PER08 } 16.Save the mapping and integration.The completed design looks as follows.Chapter 4 Use Conditional Mappings 4-5 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations You can use a counter inside a for-each loop to track the number of iterations processed by the loop.This task can be achieved with an xsl:variable through direct edit of the XSLT code. |
The tree structure needed to create conditional expressions and mapping expressions is now complete.Expressions for the first condition and mapping can now be created.if PER03 == 'TE' { Contact.Phone = PER04 }Chapter 4 Use Conditional Mappings 4-49.Select the first when statement in the target tree to create the first condition.10.Drag and drop PER03 from the source tree into the expression.11.Enter = "TE" to complete the expression.12.Click the checkmark to save the expression.13.To create the mapping, select the value-of statement under the first when .14.Drag and drop PER04 into the target value-of statement.The first conditional mapping is complete.15.Repeat these steps for the second and third conditional mappings to complete the mapping logic.if PER05 == 'TE' { Contact.Phone = PER06 } if PER07 == 'TE' { Contact.Phone = PER08 } 16.Save the mapping and integration.The completed design looks as follows.Chapter 4 Use Conditional Mappings 4-5 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations You can use a counter inside a for-each loop to track the number of iterations processed by the loop.This task can be achieved with an xsl:variable through direct edit of the XSLT code.For example: Use the count() and position() XPath functions. |
Expressions for the first condition and mapping can now be created.if PER03 == 'TE' { Contact.Phone = PER04 }Chapter 4 Use Conditional Mappings 4-49.Select the first when statement in the target tree to create the first condition.10.Drag and drop PER03 from the source tree into the expression.11.Enter = "TE" to complete the expression.12.Click the checkmark to save the expression.13.To create the mapping, select the value-of statement under the first when .14.Drag and drop PER04 into the target value-of statement.The first conditional mapping is complete.15.Repeat these steps for the second and third conditional mappings to complete the mapping logic.if PER05 == 'TE' { Contact.Phone = PER06 } if PER07 == 'TE' { Contact.Phone = PER08 } 16.Save the mapping and integration.The completed design looks as follows.Chapter 4 Use Conditional Mappings 4-5 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations You can use a counter inside a for-each loop to track the number of iterations processed by the loop.This task can be achieved with an xsl:variable through direct edit of the XSLT code.For example: Use the count() and position() XPath functions.The count(location path to the element) returns the number of instances for the node-set (for the element). |
if PER03 == 'TE' { Contact.Phone = PER04 }Chapter 4 Use Conditional Mappings 4-49.Select the first when statement in the target tree to create the first condition.10.Drag and drop PER03 from the source tree into the expression.11.Enter = "TE" to complete the expression.12.Click the checkmark to save the expression.13.To create the mapping, select the value-of statement under the first when .14.Drag and drop PER04 into the target value-of statement.The first conditional mapping is complete.15.Repeat these steps for the second and third conditional mappings to complete the mapping logic.if PER05 == 'TE' { Contact.Phone = PER06 } if PER07 == 'TE' { Contact.Phone = PER08 } 16.Save the mapping and integration.The completed design looks as follows.Chapter 4 Use Conditional Mappings 4-5 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations You can use a counter inside a for-each loop to track the number of iterations processed by the loop.This task can be achieved with an xsl:variable through direct edit of the XSLT code.For example: Use the count() and position() XPath functions.The count(location path to the element) returns the number of instances for the node-set (for the element).Within an <xsl:for-each> loop, the position() function returns the iteration number. |
10.Drag and drop PER03 from the source tree into the expression.11.Enter = "TE" to complete the expression.12.Click the checkmark to save the expression.13.To create the mapping, select the value-of statement under the first when .14.Drag and drop PER04 into the target value-of statement.The first conditional mapping is complete.15.Repeat these steps for the second and third conditional mappings to complete the mapping logic.if PER05 == 'TE' { Contact.Phone = PER06 } if PER07 == 'TE' { Contact.Phone = PER08 } 16.Save the mapping and integration.The completed design looks as follows.Chapter 4 Use Conditional Mappings 4-5 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations You can use a counter inside a for-each loop to track the number of iterations processed by the loop.This task can be achieved with an xsl:variable through direct edit of the XSLT code.For example: Use the count() and position() XPath functions.The count(location path to the element) returns the number of instances for the node-set (for the element).Within an <xsl:for-each> loop, the position() function returns the iteration number.The XSL code snippet for the payload looks as follows: The pseudo XSL code snippet looks as follows: Chapter 4 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations 4-6 The output looks as follows: See Edit XSLT Code in the Mapper . |
11.Enter = "TE" to complete the expression.12.Click the checkmark to save the expression.13.To create the mapping, select the value-of statement under the first when .14.Drag and drop PER04 into the target value-of statement.The first conditional mapping is complete.15.Repeat these steps for the second and third conditional mappings to complete the mapping logic.if PER05 == 'TE' { Contact.Phone = PER06 } if PER07 == 'TE' { Contact.Phone = PER08 } 16.Save the mapping and integration.The completed design looks as follows.Chapter 4 Use Conditional Mappings 4-5 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations You can use a counter inside a for-each loop to track the number of iterations processed by the loop.This task can be achieved with an xsl:variable through direct edit of the XSLT code.For example: Use the count() and position() XPath functions.The count(location path to the element) returns the number of instances for the node-set (for the element).Within an <xsl:for-each> loop, the position() function returns the iteration number.The XSL code snippet for the payload looks as follows: The pseudo XSL code snippet looks as follows: Chapter 4 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations 4-6 The output looks as follows: See Edit XSLT Code in the Mapper .Create an XSLT Map to Read Multiple Correlated Payloads You can create XSLT maps to loop thought different sources (input payloads) with instances that are correlated by key fields. |
12.Click the checkmark to save the expression.13.To create the mapping, select the value-of statement under the first when .14.Drag and drop PER04 into the target value-of statement.The first conditional mapping is complete.15.Repeat these steps for the second and third conditional mappings to complete the mapping logic.if PER05 == 'TE' { Contact.Phone = PER06 } if PER07 == 'TE' { Contact.Phone = PER08 } 16.Save the mapping and integration.The completed design looks as follows.Chapter 4 Use Conditional Mappings 4-5 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations You can use a counter inside a for-each loop to track the number of iterations processed by the loop.This task can be achieved with an xsl:variable through direct edit of the XSLT code.For example: Use the count() and position() XPath functions.The count(location path to the element) returns the number of instances for the node-set (for the element).Within an <xsl:for-each> loop, the position() function returns the iteration number.The XSL code snippet for the payload looks as follows: The pseudo XSL code snippet looks as follows: Chapter 4 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations 4-6 The output looks as follows: See Edit XSLT Code in the Mapper .Create an XSLT Map to Read Multiple Correlated Payloads You can create XSLT maps to loop thought different sources (input payloads) with instances that are correlated by key fields.Example for 1:0.. n and 1:1 Relationships Between Sources The following business units and employees example is provided: Each business unit can have 0.. n employees (1:0.. n relationship). |
13.To create the mapping, select the value-of statement under the first when .14.Drag and drop PER04 into the target value-of statement.The first conditional mapping is complete.15.Repeat these steps for the second and third conditional mappings to complete the mapping logic.if PER05 == 'TE' { Contact.Phone = PER06 } if PER07 == 'TE' { Contact.Phone = PER08 } 16.Save the mapping and integration.The completed design looks as follows.Chapter 4 Use Conditional Mappings 4-5 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations You can use a counter inside a for-each loop to track the number of iterations processed by the loop.This task can be achieved with an xsl:variable through direct edit of the XSLT code.For example: Use the count() and position() XPath functions.The count(location path to the element) returns the number of instances for the node-set (for the element).Within an <xsl:for-each> loop, the position() function returns the iteration number.The XSL code snippet for the payload looks as follows: The pseudo XSL code snippet looks as follows: Chapter 4 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations 4-6 The output looks as follows: See Edit XSLT Code in the Mapper .Create an XSLT Map to Read Multiple Correlated Payloads You can create XSLT maps to loop thought different sources (input payloads) with instances that are correlated by key fields.Example for 1:0.. n and 1:1 Relationships Between Sources The following business units and employees example is provided: Each business unit can have 0.. n employees (1:0.. n relationship).The G/L accounts source with a 1:1 correlation with business units. |
14.Drag and drop PER04 into the target value-of statement.The first conditional mapping is complete.15.Repeat these steps for the second and third conditional mappings to complete the mapping logic.if PER05 == 'TE' { Contact.Phone = PER06 } if PER07 == 'TE' { Contact.Phone = PER08 } 16.Save the mapping and integration.The completed design looks as follows.Chapter 4 Use Conditional Mappings 4-5 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations You can use a counter inside a for-each loop to track the number of iterations processed by the loop.This task can be achieved with an xsl:variable through direct edit of the XSLT code.For example: Use the count() and position() XPath functions.The count(location path to the element) returns the number of instances for the node-set (for the element).Within an <xsl:for-each> loop, the position() function returns the iteration number.The XSL code snippet for the payload looks as follows: The pseudo XSL code snippet looks as follows: Chapter 4 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations 4-6 The output looks as follows: See Edit XSLT Code in the Mapper .Create an XSLT Map to Read Multiple Correlated Payloads You can create XSLT maps to loop thought different sources (input payloads) with instances that are correlated by key fields.Example for 1:0.. n and 1:1 Relationships Between Sources The following business units and employees example is provided: Each business unit can have 0.. n employees (1:0.. n relationship).The G/L accounts source with a 1:1 correlation with business units.You can create an XSLT map that combines them. |
The first conditional mapping is complete.15.Repeat these steps for the second and third conditional mappings to complete the mapping logic.if PER05 == 'TE' { Contact.Phone = PER06 } if PER07 == 'TE' { Contact.Phone = PER08 } 16.Save the mapping and integration.The completed design looks as follows.Chapter 4 Use Conditional Mappings 4-5 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations You can use a counter inside a for-each loop to track the number of iterations processed by the loop.This task can be achieved with an xsl:variable through direct edit of the XSLT code.For example: Use the count() and position() XPath functions.The count(location path to the element) returns the number of instances for the node-set (for the element).Within an <xsl:for-each> loop, the position() function returns the iteration number.The XSL code snippet for the payload looks as follows: The pseudo XSL code snippet looks as follows: Chapter 4 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations 4-6 The output looks as follows: See Edit XSLT Code in the Mapper .Create an XSLT Map to Read Multiple Correlated Payloads You can create XSLT maps to loop thought different sources (input payloads) with instances that are correlated by key fields.Example for 1:0.. n and 1:1 Relationships Between Sources The following business units and employees example is provided: Each business unit can have 0.. n employees (1:0.. n relationship).The G/L accounts source with a 1:1 correlation with business units.You can create an XSLT map that combines them.The sources (input payloads) for this example are as follows: $BusinessUnits <company> <bu> <id>SD</id> <name>Software Development</name> <accounbtid>i9</accountid> </bu> <bu> <id>BS</id> <name>Sales</name> <accounbtid>i1</accountid> </bu> <bu> <id>MD</id> <name>Marketing</name> <accounbtid>i2</accountid> </bu> </company> $Employees <people> <emp> <buid>SD</buid> <name>Joe Smith</name> </emp> <emp> <buid>SD</buid> <name>Mike Jones</name> </emp>Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-7 <emp> <buid>BS</buid> <name>Dave Johnson</name> </emp> </people> $GLAccounts <gl> <account> <id>i1</id> <number>001.345</number> </account> <account> <id>i2</id> <number>001.477</number> </account> <account> <id>i9</id> <number>001.223</number> </account> </gl> The link between $BusinessUnits and $Employees is the business unit ID. |
15.Repeat these steps for the second and third conditional mappings to complete the mapping logic.if PER05 == 'TE' { Contact.Phone = PER06 } if PER07 == 'TE' { Contact.Phone = PER08 } 16.Save the mapping and integration.The completed design looks as follows.Chapter 4 Use Conditional Mappings 4-5 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations You can use a counter inside a for-each loop to track the number of iterations processed by the loop.This task can be achieved with an xsl:variable through direct edit of the XSLT code.For example: Use the count() and position() XPath functions.The count(location path to the element) returns the number of instances for the node-set (for the element).Within an <xsl:for-each> loop, the position() function returns the iteration number.The XSL code snippet for the payload looks as follows: The pseudo XSL code snippet looks as follows: Chapter 4 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations 4-6 The output looks as follows: See Edit XSLT Code in the Mapper .Create an XSLT Map to Read Multiple Correlated Payloads You can create XSLT maps to loop thought different sources (input payloads) with instances that are correlated by key fields.Example for 1:0.. n and 1:1 Relationships Between Sources The following business units and employees example is provided: Each business unit can have 0.. n employees (1:0.. n relationship).The G/L accounts source with a 1:1 correlation with business units.You can create an XSLT map that combines them.The sources (input payloads) for this example are as follows: $BusinessUnits <company> <bu> <id>SD</id> <name>Software Development</name> <accounbtid>i9</accountid> </bu> <bu> <id>BS</id> <name>Sales</name> <accounbtid>i1</accountid> </bu> <bu> <id>MD</id> <name>Marketing</name> <accounbtid>i2</accountid> </bu> </company> $Employees <people> <emp> <buid>SD</buid> <name>Joe Smith</name> </emp> <emp> <buid>SD</buid> <name>Mike Jones</name> </emp>Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-7 <emp> <buid>BS</buid> <name>Dave Johnson</name> </emp> </people> $GLAccounts <gl> <account> <id>i1</id> <number>001.345</number> </account> <account> <id>i2</id> <number>001.477</number> </account> <account> <id>i9</id> <number>001.223</number> </account> </gl> The link between $BusinessUnits and $Employees is the business unit ID.The header is $BusinessUnit and the detail is $Employees . |
if PER05 == 'TE' { Contact.Phone = PER06 } if PER07 == 'TE' { Contact.Phone = PER08 } 16.Save the mapping and integration.The completed design looks as follows.Chapter 4 Use Conditional Mappings 4-5 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations You can use a counter inside a for-each loop to track the number of iterations processed by the loop.This task can be achieved with an xsl:variable through direct edit of the XSLT code.For example: Use the count() and position() XPath functions.The count(location path to the element) returns the number of instances for the node-set (for the element).Within an <xsl:for-each> loop, the position() function returns the iteration number.The XSL code snippet for the payload looks as follows: The pseudo XSL code snippet looks as follows: Chapter 4 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations 4-6 The output looks as follows: See Edit XSLT Code in the Mapper .Create an XSLT Map to Read Multiple Correlated Payloads You can create XSLT maps to loop thought different sources (input payloads) with instances that are correlated by key fields.Example for 1:0.. n and 1:1 Relationships Between Sources The following business units and employees example is provided: Each business unit can have 0.. n employees (1:0.. n relationship).The G/L accounts source with a 1:1 correlation with business units.You can create an XSLT map that combines them.The sources (input payloads) for this example are as follows: $BusinessUnits <company> <bu> <id>SD</id> <name>Software Development</name> <accounbtid>i9</accountid> </bu> <bu> <id>BS</id> <name>Sales</name> <accounbtid>i1</accountid> </bu> <bu> <id>MD</id> <name>Marketing</name> <accounbtid>i2</accountid> </bu> </company> $Employees <people> <emp> <buid>SD</buid> <name>Joe Smith</name> </emp> <emp> <buid>SD</buid> <name>Mike Jones</name> </emp>Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-7 <emp> <buid>BS</buid> <name>Dave Johnson</name> </emp> </people> $GLAccounts <gl> <account> <id>i1</id> <number>001.345</number> </account> <account> <id>i2</id> <number>001.477</number> </account> <account> <id>i9</id> <number>001.223</number> </account> </gl> The link between $BusinessUnits and $Employees is the business unit ID.The header is $BusinessUnit and the detail is $Employees .The link for the GL accounts and business units is the account ID. |
The completed design looks as follows.Chapter 4 Use Conditional Mappings 4-5 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations You can use a counter inside a for-each loop to track the number of iterations processed by the loop.This task can be achieved with an xsl:variable through direct edit of the XSLT code.For example: Use the count() and position() XPath functions.The count(location path to the element) returns the number of instances for the node-set (for the element).Within an <xsl:for-each> loop, the position() function returns the iteration number.The XSL code snippet for the payload looks as follows: The pseudo XSL code snippet looks as follows: Chapter 4 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations 4-6 The output looks as follows: See Edit XSLT Code in the Mapper .Create an XSLT Map to Read Multiple Correlated Payloads You can create XSLT maps to loop thought different sources (input payloads) with instances that are correlated by key fields.Example for 1:0.. n and 1:1 Relationships Between Sources The following business units and employees example is provided: Each business unit can have 0.. n employees (1:0.. n relationship).The G/L accounts source with a 1:1 correlation with business units.You can create an XSLT map that combines them.The sources (input payloads) for this example are as follows: $BusinessUnits <company> <bu> <id>SD</id> <name>Software Development</name> <accounbtid>i9</accountid> </bu> <bu> <id>BS</id> <name>Sales</name> <accounbtid>i1</accountid> </bu> <bu> <id>MD</id> <name>Marketing</name> <accounbtid>i2</accountid> </bu> </company> $Employees <people> <emp> <buid>SD</buid> <name>Joe Smith</name> </emp> <emp> <buid>SD</buid> <name>Mike Jones</name> </emp>Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-7 <emp> <buid>BS</buid> <name>Dave Johnson</name> </emp> </people> $GLAccounts <gl> <account> <id>i1</id> <number>001.345</number> </account> <account> <id>i2</id> <number>001.477</number> </account> <account> <id>i9</id> <number>001.223</number> </account> </gl> The link between $BusinessUnits and $Employees is the business unit ID.The header is $BusinessUnit and the detail is $Employees .The link for the GL accounts and business units is the account ID.The following output is needed: <xxx> <yyy> <BU id='SD'>Software Development</BU> <empName>Joe Smith</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='SD'>Software Development</BU> <empName>Mike Jones</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='BS'>Sales</BU> <empName>Dave Johnson</empName> <accNumber>001.345</accNumber> </yyy> </xxx> Solution When the instances (records) of the sources have a 1:1 correlation, you can use a predicate. |
Chapter 4 Use Conditional Mappings 4-5 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations You can use a counter inside a for-each loop to track the number of iterations processed by the loop.This task can be achieved with an xsl:variable through direct edit of the XSLT code.For example: Use the count() and position() XPath functions.The count(location path to the element) returns the number of instances for the node-set (for the element).Within an <xsl:for-each> loop, the position() function returns the iteration number.The XSL code snippet for the payload looks as follows: The pseudo XSL code snippet looks as follows: Chapter 4 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations 4-6 The output looks as follows: See Edit XSLT Code in the Mapper .Create an XSLT Map to Read Multiple Correlated Payloads You can create XSLT maps to loop thought different sources (input payloads) with instances that are correlated by key fields.Example for 1:0.. n and 1:1 Relationships Between Sources The following business units and employees example is provided: Each business unit can have 0.. n employees (1:0.. n relationship).The G/L accounts source with a 1:1 correlation with business units.You can create an XSLT map that combines them.The sources (input payloads) for this example are as follows: $BusinessUnits <company> <bu> <id>SD</id> <name>Software Development</name> <accounbtid>i9</accountid> </bu> <bu> <id>BS</id> <name>Sales</name> <accounbtid>i1</accountid> </bu> <bu> <id>MD</id> <name>Marketing</name> <accounbtid>i2</accountid> </bu> </company> $Employees <people> <emp> <buid>SD</buid> <name>Joe Smith</name> </emp> <emp> <buid>SD</buid> <name>Mike Jones</name> </emp>Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-7 <emp> <buid>BS</buid> <name>Dave Johnson</name> </emp> </people> $GLAccounts <gl> <account> <id>i1</id> <number>001.345</number> </account> <account> <id>i2</id> <number>001.477</number> </account> <account> <id>i9</id> <number>001.223</number> </account> </gl> The link between $BusinessUnits and $Employees is the business unit ID.The header is $BusinessUnit and the detail is $Employees .The link for the GL accounts and business units is the account ID.The following output is needed: <xxx> <yyy> <BU id='SD'>Software Development</BU> <empName>Joe Smith</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='SD'>Software Development</BU> <empName>Mike Jones</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='BS'>Sales</BU> <empName>Dave Johnson</empName> <accNumber>001.345</accNumber> </yyy> </xxx> Solution When the instances (records) of the sources have a 1:1 correlation, you can use a predicate.When the instances have 1:0.. n correlation, using an xsl:for-each-group performs better than using predicates because it avoids overparsing the source. |
This task can be achieved with an xsl:variable through direct edit of the XSLT code.For example: Use the count() and position() XPath functions.The count(location path to the element) returns the number of instances for the node-set (for the element).Within an <xsl:for-each> loop, the position() function returns the iteration number.The XSL code snippet for the payload looks as follows: The pseudo XSL code snippet looks as follows: Chapter 4 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations 4-6 The output looks as follows: See Edit XSLT Code in the Mapper .Create an XSLT Map to Read Multiple Correlated Payloads You can create XSLT maps to loop thought different sources (input payloads) with instances that are correlated by key fields.Example for 1:0.. n and 1:1 Relationships Between Sources The following business units and employees example is provided: Each business unit can have 0.. n employees (1:0.. n relationship).The G/L accounts source with a 1:1 correlation with business units.You can create an XSLT map that combines them.The sources (input payloads) for this example are as follows: $BusinessUnits <company> <bu> <id>SD</id> <name>Software Development</name> <accounbtid>i9</accountid> </bu> <bu> <id>BS</id> <name>Sales</name> <accounbtid>i1</accountid> </bu> <bu> <id>MD</id> <name>Marketing</name> <accounbtid>i2</accountid> </bu> </company> $Employees <people> <emp> <buid>SD</buid> <name>Joe Smith</name> </emp> <emp> <buid>SD</buid> <name>Mike Jones</name> </emp>Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-7 <emp> <buid>BS</buid> <name>Dave Johnson</name> </emp> </people> $GLAccounts <gl> <account> <id>i1</id> <number>001.345</number> </account> <account> <id>i2</id> <number>001.477</number> </account> <account> <id>i9</id> <number>001.223</number> </account> </gl> The link between $BusinessUnits and $Employees is the business unit ID.The header is $BusinessUnit and the detail is $Employees .The link for the GL accounts and business units is the account ID.The following output is needed: <xxx> <yyy> <BU id='SD'>Software Development</BU> <empName>Joe Smith</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='SD'>Software Development</BU> <empName>Mike Jones</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='BS'>Sales</BU> <empName>Dave Johnson</empName> <accNumber>001.345</accNumber> </yyy> </xxx> Solution When the instances (records) of the sources have a 1:1 correlation, you can use a predicate.When the instances have 1:0.. n correlation, using an xsl:for-each-group performs better than using predicates because it avoids overparsing the source.The XSLT content is as follows: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="BusinessUnits" /> <xsl:param name="Employees" /> <xsl:param name="GLAccounts"/> <xsl:template match="/" >Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-8 <xxx> <xsl:for-each-group select=" $Employees/people/employee" group- by="buid"> <!-- this section will be executed only once per 'buid' --> <!-- Store the Business Unit Record in a variable --> <xsl:variable name="BURecord"> <xsl:copy-of select=" $BusinessUnits/company/bu[id = fn:current-grouping-key()]"/> </xsl:variable> <!-- Store the GL Account Record in a variable --> <xsl:variable name="GLAccountRecord"> <xsl:copy-of select=" $GLAccounts/gl/account[id = $BURecord/bu/ accountid]" /> </xsl:variable> <!-- end: executed only once per 'buid' --> <xsl:for-each select="current-group()"> <!-- iterates the employees within the current 'buid' --> <yyy> <BU id="{./buid}"> <xsl:value-of select=" $BURecord/bu/name" /> </BU> <empName> <xsl:value-of select="./name" /> </empName> <accNumber> <xsl:value-of select=" $GLAccountRecord/account/ number"/> </accNumber> </yyy> </xsl:for-each> </xsl:for-each-group> </xxx> </xsl:template> </xsl:stylesheet> Summary When there is a 1:1 relationship, using predicates instead of <xsl:for-each-group> is faster because XSLT does not need to sort the data to create the group. |
For example: Use the count() and position() XPath functions.The count(location path to the element) returns the number of instances for the node-set (for the element).Within an <xsl:for-each> loop, the position() function returns the iteration number.The XSL code snippet for the payload looks as follows: The pseudo XSL code snippet looks as follows: Chapter 4 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations 4-6 The output looks as follows: See Edit XSLT Code in the Mapper .Create an XSLT Map to Read Multiple Correlated Payloads You can create XSLT maps to loop thought different sources (input payloads) with instances that are correlated by key fields.Example for 1:0.. n and 1:1 Relationships Between Sources The following business units and employees example is provided: Each business unit can have 0.. n employees (1:0.. n relationship).The G/L accounts source with a 1:1 correlation with business units.You can create an XSLT map that combines them.The sources (input payloads) for this example are as follows: $BusinessUnits <company> <bu> <id>SD</id> <name>Software Development</name> <accounbtid>i9</accountid> </bu> <bu> <id>BS</id> <name>Sales</name> <accounbtid>i1</accountid> </bu> <bu> <id>MD</id> <name>Marketing</name> <accounbtid>i2</accountid> </bu> </company> $Employees <people> <emp> <buid>SD</buid> <name>Joe Smith</name> </emp> <emp> <buid>SD</buid> <name>Mike Jones</name> </emp>Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-7 <emp> <buid>BS</buid> <name>Dave Johnson</name> </emp> </people> $GLAccounts <gl> <account> <id>i1</id> <number>001.345</number> </account> <account> <id>i2</id> <number>001.477</number> </account> <account> <id>i9</id> <number>001.223</number> </account> </gl> The link between $BusinessUnits and $Employees is the business unit ID.The header is $BusinessUnit and the detail is $Employees .The link for the GL accounts and business units is the account ID.The following output is needed: <xxx> <yyy> <BU id='SD'>Software Development</BU> <empName>Joe Smith</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='SD'>Software Development</BU> <empName>Mike Jones</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='BS'>Sales</BU> <empName>Dave Johnson</empName> <accNumber>001.345</accNumber> </yyy> </xxx> Solution When the instances (records) of the sources have a 1:1 correlation, you can use a predicate.When the instances have 1:0.. n correlation, using an xsl:for-each-group performs better than using predicates because it avoids overparsing the source.The XSLT content is as follows: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="BusinessUnits" /> <xsl:param name="Employees" /> <xsl:param name="GLAccounts"/> <xsl:template match="/" >Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-8 <xxx> <xsl:for-each-group select=" $Employees/people/employee" group- by="buid"> <!-- this section will be executed only once per 'buid' --> <!-- Store the Business Unit Record in a variable --> <xsl:variable name="BURecord"> <xsl:copy-of select=" $BusinessUnits/company/bu[id = fn:current-grouping-key()]"/> </xsl:variable> <!-- Store the GL Account Record in a variable --> <xsl:variable name="GLAccountRecord"> <xsl:copy-of select=" $GLAccounts/gl/account[id = $BURecord/bu/ accountid]" /> </xsl:variable> <!-- end: executed only once per 'buid' --> <xsl:for-each select="current-group()"> <!-- iterates the employees within the current 'buid' --> <yyy> <BU id="{./buid}"> <xsl:value-of select=" $BURecord/bu/name" /> </BU> <empName> <xsl:value-of select="./name" /> </empName> <accNumber> <xsl:value-of select=" $GLAccountRecord/account/ number"/> </accNumber> </yyy> </xsl:for-each> </xsl:for-each-group> </xxx> </xsl:template> </xsl:stylesheet> Summary When there is a 1:1 relationship, using predicates instead of <xsl:for-each-group> is faster because XSLT does not need to sort the data to create the group.When there is a 1:0.. n relationship, using <xsl:for-each-group> performs faster than using predicates. |
The count(location path to the element) returns the number of instances for the node-set (for the element).Within an <xsl:for-each> loop, the position() function returns the iteration number.The XSL code snippet for the payload looks as follows: The pseudo XSL code snippet looks as follows: Chapter 4 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations 4-6 The output looks as follows: See Edit XSLT Code in the Mapper .Create an XSLT Map to Read Multiple Correlated Payloads You can create XSLT maps to loop thought different sources (input payloads) with instances that are correlated by key fields.Example for 1:0.. n and 1:1 Relationships Between Sources The following business units and employees example is provided: Each business unit can have 0.. n employees (1:0.. n relationship).The G/L accounts source with a 1:1 correlation with business units.You can create an XSLT map that combines them.The sources (input payloads) for this example are as follows: $BusinessUnits <company> <bu> <id>SD</id> <name>Software Development</name> <accounbtid>i9</accountid> </bu> <bu> <id>BS</id> <name>Sales</name> <accounbtid>i1</accountid> </bu> <bu> <id>MD</id> <name>Marketing</name> <accounbtid>i2</accountid> </bu> </company> $Employees <people> <emp> <buid>SD</buid> <name>Joe Smith</name> </emp> <emp> <buid>SD</buid> <name>Mike Jones</name> </emp>Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-7 <emp> <buid>BS</buid> <name>Dave Johnson</name> </emp> </people> $GLAccounts <gl> <account> <id>i1</id> <number>001.345</number> </account> <account> <id>i2</id> <number>001.477</number> </account> <account> <id>i9</id> <number>001.223</number> </account> </gl> The link between $BusinessUnits and $Employees is the business unit ID.The header is $BusinessUnit and the detail is $Employees .The link for the GL accounts and business units is the account ID.The following output is needed: <xxx> <yyy> <BU id='SD'>Software Development</BU> <empName>Joe Smith</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='SD'>Software Development</BU> <empName>Mike Jones</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='BS'>Sales</BU> <empName>Dave Johnson</empName> <accNumber>001.345</accNumber> </yyy> </xxx> Solution When the instances (records) of the sources have a 1:1 correlation, you can use a predicate.When the instances have 1:0.. n correlation, using an xsl:for-each-group performs better than using predicates because it avoids overparsing the source.The XSLT content is as follows: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="BusinessUnits" /> <xsl:param name="Employees" /> <xsl:param name="GLAccounts"/> <xsl:template match="/" >Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-8 <xxx> <xsl:for-each-group select=" $Employees/people/employee" group- by="buid"> <!-- this section will be executed only once per 'buid' --> <!-- Store the Business Unit Record in a variable --> <xsl:variable name="BURecord"> <xsl:copy-of select=" $BusinessUnits/company/bu[id = fn:current-grouping-key()]"/> </xsl:variable> <!-- Store the GL Account Record in a variable --> <xsl:variable name="GLAccountRecord"> <xsl:copy-of select=" $GLAccounts/gl/account[id = $BURecord/bu/ accountid]" /> </xsl:variable> <!-- end: executed only once per 'buid' --> <xsl:for-each select="current-group()"> <!-- iterates the employees within the current 'buid' --> <yyy> <BU id="{./buid}"> <xsl:value-of select=" $BURecord/bu/name" /> </BU> <empName> <xsl:value-of select="./name" /> </empName> <accNumber> <xsl:value-of select=" $GLAccountRecord/account/ number"/> </accNumber> </yyy> </xsl:for-each> </xsl:for-each-group> </xxx> </xsl:template> </xsl:stylesheet> Summary When there is a 1:1 relationship, using predicates instead of <xsl:for-each-group> is faster because XSLT does not need to sort the data to create the group.When there is a 1:0.. n relationship, using <xsl:for-each-group> performs faster than using predicates.This is because predicates, in the above example, parse the entire business unit source and GL account source per every employee. |
Within an <xsl:for-each> loop, the position() function returns the iteration number.The XSL code snippet for the payload looks as follows: The pseudo XSL code snippet looks as follows: Chapter 4 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations 4-6 The output looks as follows: See Edit XSLT Code in the Mapper .Create an XSLT Map to Read Multiple Correlated Payloads You can create XSLT maps to loop thought different sources (input payloads) with instances that are correlated by key fields.Example for 1:0.. n and 1:1 Relationships Between Sources The following business units and employees example is provided: Each business unit can have 0.. n employees (1:0.. n relationship).The G/L accounts source with a 1:1 correlation with business units.You can create an XSLT map that combines them.The sources (input payloads) for this example are as follows: $BusinessUnits <company> <bu> <id>SD</id> <name>Software Development</name> <accounbtid>i9</accountid> </bu> <bu> <id>BS</id> <name>Sales</name> <accounbtid>i1</accountid> </bu> <bu> <id>MD</id> <name>Marketing</name> <accounbtid>i2</accountid> </bu> </company> $Employees <people> <emp> <buid>SD</buid> <name>Joe Smith</name> </emp> <emp> <buid>SD</buid> <name>Mike Jones</name> </emp>Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-7 <emp> <buid>BS</buid> <name>Dave Johnson</name> </emp> </people> $GLAccounts <gl> <account> <id>i1</id> <number>001.345</number> </account> <account> <id>i2</id> <number>001.477</number> </account> <account> <id>i9</id> <number>001.223</number> </account> </gl> The link between $BusinessUnits and $Employees is the business unit ID.The header is $BusinessUnit and the detail is $Employees .The link for the GL accounts and business units is the account ID.The following output is needed: <xxx> <yyy> <BU id='SD'>Software Development</BU> <empName>Joe Smith</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='SD'>Software Development</BU> <empName>Mike Jones</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='BS'>Sales</BU> <empName>Dave Johnson</empName> <accNumber>001.345</accNumber> </yyy> </xxx> Solution When the instances (records) of the sources have a 1:1 correlation, you can use a predicate.When the instances have 1:0.. n correlation, using an xsl:for-each-group performs better than using predicates because it avoids overparsing the source.The XSLT content is as follows: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="BusinessUnits" /> <xsl:param name="Employees" /> <xsl:param name="GLAccounts"/> <xsl:template match="/" >Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-8 <xxx> <xsl:for-each-group select=" $Employees/people/employee" group- by="buid"> <!-- this section will be executed only once per 'buid' --> <!-- Store the Business Unit Record in a variable --> <xsl:variable name="BURecord"> <xsl:copy-of select=" $BusinessUnits/company/bu[id = fn:current-grouping-key()]"/> </xsl:variable> <!-- Store the GL Account Record in a variable --> <xsl:variable name="GLAccountRecord"> <xsl:copy-of select=" $GLAccounts/gl/account[id = $BURecord/bu/ accountid]" /> </xsl:variable> <!-- end: executed only once per 'buid' --> <xsl:for-each select="current-group()"> <!-- iterates the employees within the current 'buid' --> <yyy> <BU id="{./buid}"> <xsl:value-of select=" $BURecord/bu/name" /> </BU> <empName> <xsl:value-of select="./name" /> </empName> <accNumber> <xsl:value-of select=" $GLAccountRecord/account/ number"/> </accNumber> </yyy> </xsl:for-each> </xsl:for-each-group> </xxx> </xsl:template> </xsl:stylesheet> Summary When there is a 1:1 relationship, using predicates instead of <xsl:for-each-group> is faster because XSLT does not need to sort the data to create the group.When there is a 1:0.. n relationship, using <xsl:for-each-group> performs faster than using predicates.This is because predicates, in the above example, parse the entire business unit source and GL account source per every employee.See: XPath predicates xsl:for-each example Perform Date Conversions in the Mapper You can perform date conversion tasks in the mapper such as converting dates in different time zones, formats, and timestamps. |
The XSL code snippet for the payload looks as follows: The pseudo XSL code snippet looks as follows: Chapter 4 Use a Counter Inside a For-Each Loop to Track the Number of Loop Iterations 4-6 The output looks as follows: See Edit XSLT Code in the Mapper .Create an XSLT Map to Read Multiple Correlated Payloads You can create XSLT maps to loop thought different sources (input payloads) with instances that are correlated by key fields.Example for 1:0.. n and 1:1 Relationships Between Sources The following business units and employees example is provided: Each business unit can have 0.. n employees (1:0.. n relationship).The G/L accounts source with a 1:1 correlation with business units.You can create an XSLT map that combines them.The sources (input payloads) for this example are as follows: $BusinessUnits <company> <bu> <id>SD</id> <name>Software Development</name> <accounbtid>i9</accountid> </bu> <bu> <id>BS</id> <name>Sales</name> <accounbtid>i1</accountid> </bu> <bu> <id>MD</id> <name>Marketing</name> <accounbtid>i2</accountid> </bu> </company> $Employees <people> <emp> <buid>SD</buid> <name>Joe Smith</name> </emp> <emp> <buid>SD</buid> <name>Mike Jones</name> </emp>Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-7 <emp> <buid>BS</buid> <name>Dave Johnson</name> </emp> </people> $GLAccounts <gl> <account> <id>i1</id> <number>001.345</number> </account> <account> <id>i2</id> <number>001.477</number> </account> <account> <id>i9</id> <number>001.223</number> </account> </gl> The link between $BusinessUnits and $Employees is the business unit ID.The header is $BusinessUnit and the detail is $Employees .The link for the GL accounts and business units is the account ID.The following output is needed: <xxx> <yyy> <BU id='SD'>Software Development</BU> <empName>Joe Smith</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='SD'>Software Development</BU> <empName>Mike Jones</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='BS'>Sales</BU> <empName>Dave Johnson</empName> <accNumber>001.345</accNumber> </yyy> </xxx> Solution When the instances (records) of the sources have a 1:1 correlation, you can use a predicate.When the instances have 1:0.. n correlation, using an xsl:for-each-group performs better than using predicates because it avoids overparsing the source.The XSLT content is as follows: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="BusinessUnits" /> <xsl:param name="Employees" /> <xsl:param name="GLAccounts"/> <xsl:template match="/" >Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-8 <xxx> <xsl:for-each-group select=" $Employees/people/employee" group- by="buid"> <!-- this section will be executed only once per 'buid' --> <!-- Store the Business Unit Record in a variable --> <xsl:variable name="BURecord"> <xsl:copy-of select=" $BusinessUnits/company/bu[id = fn:current-grouping-key()]"/> </xsl:variable> <!-- Store the GL Account Record in a variable --> <xsl:variable name="GLAccountRecord"> <xsl:copy-of select=" $GLAccounts/gl/account[id = $BURecord/bu/ accountid]" /> </xsl:variable> <!-- end: executed only once per 'buid' --> <xsl:for-each select="current-group()"> <!-- iterates the employees within the current 'buid' --> <yyy> <BU id="{./buid}"> <xsl:value-of select=" $BURecord/bu/name" /> </BU> <empName> <xsl:value-of select="./name" /> </empName> <accNumber> <xsl:value-of select=" $GLAccountRecord/account/ number"/> </accNumber> </yyy> </xsl:for-each> </xsl:for-each-group> </xxx> </xsl:template> </xsl:stylesheet> Summary When there is a 1:1 relationship, using predicates instead of <xsl:for-each-group> is faster because XSLT does not need to sort the data to create the group.When there is a 1:0.. n relationship, using <xsl:for-each-group> performs faster than using predicates.This is because predicates, in the above example, parse the entire business unit source and GL account source per every employee.See: XPath predicates xsl:for-each example Perform Date Conversions in the Mapper You can perform date conversion tasks in the mapper such as converting dates in different time zones, formats, and timestamps.Convert Date from One Time Zone to Another Time ZoneChapter 4 Perform Date Conversions in the Mapper 4-9Convert Date from One Format to Another Format Add and Subtract Dates from the Current Date Time Convert dateTime to and from Epoch Time Convert a Date Timestamp to a UNIX Timestamp Convert a Month Number to a Month Name Convert Date from One Time Zone to Another Time Zone For example, to convert between India Standard Time (IST) and Greenwich Mean Time (GMT): IST to GMT: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:49:07.859+05:30'), xsd:dayTimeDuration('PT0H')) GMT to IST: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:00:00Z'), xsd:dayTimeDuration('PT5H30M')) Convert Date from One Format to Another Format Format DefinitionXSLT Mapping Explanation Source Format: DD- MON-YYYY 19- Nov-2021 Target Format: YYYY-MM-DD 2021-11-1 9<xsl:variable name="monthListByNum"> <months> <month id="1" value="jan"/><month id="2" value="feb"/><month id="3" value="mar"/ ><month id="4" value="apr"/> <month id="5" value="may"/><month id="6" value="jun"/><month id="7" value="jul"/ ><month id="8" value="aug"/> <month id="9" value="sep"/><month id="10" value="oct"/><month id="11" value="nov"/ ><month id="12" value="dec"/> </months> </xsl:variable> <xsl:value-of select="concat (substring- after (substring-after ( $srcDateString, '-' ), '-' ), '-', $monthListByNum/months/month[@value=fn:lower- case (substring-before (substring-after ($srcDateString, '-' ), '-' ) )]/@id, '-', substring-before ( $srcDateString, '-' ) )" xml:id="id_18"/>Use an XSLT variable to hold the MON to MM conversion. |
Create an XSLT Map to Read Multiple Correlated Payloads You can create XSLT maps to loop thought different sources (input payloads) with instances that are correlated by key fields.Example for 1:0.. n and 1:1 Relationships Between Sources The following business units and employees example is provided: Each business unit can have 0.. n employees (1:0.. n relationship).The G/L accounts source with a 1:1 correlation with business units.You can create an XSLT map that combines them.The sources (input payloads) for this example are as follows: $BusinessUnits <company> <bu> <id>SD</id> <name>Software Development</name> <accounbtid>i9</accountid> </bu> <bu> <id>BS</id> <name>Sales</name> <accounbtid>i1</accountid> </bu> <bu> <id>MD</id> <name>Marketing</name> <accounbtid>i2</accountid> </bu> </company> $Employees <people> <emp> <buid>SD</buid> <name>Joe Smith</name> </emp> <emp> <buid>SD</buid> <name>Mike Jones</name> </emp>Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-7 <emp> <buid>BS</buid> <name>Dave Johnson</name> </emp> </people> $GLAccounts <gl> <account> <id>i1</id> <number>001.345</number> </account> <account> <id>i2</id> <number>001.477</number> </account> <account> <id>i9</id> <number>001.223</number> </account> </gl> The link between $BusinessUnits and $Employees is the business unit ID.The header is $BusinessUnit and the detail is $Employees .The link for the GL accounts and business units is the account ID.The following output is needed: <xxx> <yyy> <BU id='SD'>Software Development</BU> <empName>Joe Smith</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='SD'>Software Development</BU> <empName>Mike Jones</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='BS'>Sales</BU> <empName>Dave Johnson</empName> <accNumber>001.345</accNumber> </yyy> </xxx> Solution When the instances (records) of the sources have a 1:1 correlation, you can use a predicate.When the instances have 1:0.. n correlation, using an xsl:for-each-group performs better than using predicates because it avoids overparsing the source.The XSLT content is as follows: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="BusinessUnits" /> <xsl:param name="Employees" /> <xsl:param name="GLAccounts"/> <xsl:template match="/" >Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-8 <xxx> <xsl:for-each-group select=" $Employees/people/employee" group- by="buid"> <!-- this section will be executed only once per 'buid' --> <!-- Store the Business Unit Record in a variable --> <xsl:variable name="BURecord"> <xsl:copy-of select=" $BusinessUnits/company/bu[id = fn:current-grouping-key()]"/> </xsl:variable> <!-- Store the GL Account Record in a variable --> <xsl:variable name="GLAccountRecord"> <xsl:copy-of select=" $GLAccounts/gl/account[id = $BURecord/bu/ accountid]" /> </xsl:variable> <!-- end: executed only once per 'buid' --> <xsl:for-each select="current-group()"> <!-- iterates the employees within the current 'buid' --> <yyy> <BU id="{./buid}"> <xsl:value-of select=" $BURecord/bu/name" /> </BU> <empName> <xsl:value-of select="./name" /> </empName> <accNumber> <xsl:value-of select=" $GLAccountRecord/account/ number"/> </accNumber> </yyy> </xsl:for-each> </xsl:for-each-group> </xxx> </xsl:template> </xsl:stylesheet> Summary When there is a 1:1 relationship, using predicates instead of <xsl:for-each-group> is faster because XSLT does not need to sort the data to create the group.When there is a 1:0.. n relationship, using <xsl:for-each-group> performs faster than using predicates.This is because predicates, in the above example, parse the entire business unit source and GL account source per every employee.See: XPath predicates xsl:for-each example Perform Date Conversions in the Mapper You can perform date conversion tasks in the mapper such as converting dates in different time zones, formats, and timestamps.Convert Date from One Time Zone to Another Time ZoneChapter 4 Perform Date Conversions in the Mapper 4-9Convert Date from One Format to Another Format Add and Subtract Dates from the Current Date Time Convert dateTime to and from Epoch Time Convert a Date Timestamp to a UNIX Timestamp Convert a Month Number to a Month Name Convert Date from One Time Zone to Another Time Zone For example, to convert between India Standard Time (IST) and Greenwich Mean Time (GMT): IST to GMT: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:49:07.859+05:30'), xsd:dayTimeDuration('PT0H')) GMT to IST: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:00:00Z'), xsd:dayTimeDuration('PT5H30M')) Convert Date from One Format to Another Format Format DefinitionXSLT Mapping Explanation Source Format: DD- MON-YYYY 19- Nov-2021 Target Format: YYYY-MM-DD 2021-11-1 9<xsl:variable name="monthListByNum"> <months> <month id="1" value="jan"/><month id="2" value="feb"/><month id="3" value="mar"/ ><month id="4" value="apr"/> <month id="5" value="may"/><month id="6" value="jun"/><month id="7" value="jul"/ ><month id="8" value="aug"/> <month id="9" value="sep"/><month id="10" value="oct"/><month id="11" value="nov"/ ><month id="12" value="dec"/> </months> </xsl:variable> <xsl:value-of select="concat (substring- after (substring-after ( $srcDateString, '-' ), '-' ), '-', $monthListByNum/months/month[@value=fn:lower- case (substring-before (substring-after ($srcDateString, '-' ), '-' ) )]/@id, '-', substring-before ( $srcDateString, '-' ) )" xml:id="id_18"/>Use an XSLT variable to hold the MON to MM conversion.Use string manipulation to get the correct format.Chapter 4 Perform Date Conversions in the Mapper 4-10Add and Subtract Dates from the Current Date Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Add 10 days to the current date time: fn:current-dateTime() + xsd:dayTimeDuration('P10D') Add one year to the current date time: fn:current-dateTime() + xsd:yearMonthDuration('P1Y') Subtract 10 days from the current date time: fn:current-dateTime() - xsd:dayTimeDuration('P10D') Subtract one year from the current date time: fn:current-dateTime() - xsd:yearMonthDuration('P1Y') If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) . |
Example for 1:0.. n and 1:1 Relationships Between Sources The following business units and employees example is provided: Each business unit can have 0.. n employees (1:0.. n relationship).The G/L accounts source with a 1:1 correlation with business units.You can create an XSLT map that combines them.The sources (input payloads) for this example are as follows: $BusinessUnits <company> <bu> <id>SD</id> <name>Software Development</name> <accounbtid>i9</accountid> </bu> <bu> <id>BS</id> <name>Sales</name> <accounbtid>i1</accountid> </bu> <bu> <id>MD</id> <name>Marketing</name> <accounbtid>i2</accountid> </bu> </company> $Employees <people> <emp> <buid>SD</buid> <name>Joe Smith</name> </emp> <emp> <buid>SD</buid> <name>Mike Jones</name> </emp>Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-7 <emp> <buid>BS</buid> <name>Dave Johnson</name> </emp> </people> $GLAccounts <gl> <account> <id>i1</id> <number>001.345</number> </account> <account> <id>i2</id> <number>001.477</number> </account> <account> <id>i9</id> <number>001.223</number> </account> </gl> The link between $BusinessUnits and $Employees is the business unit ID.The header is $BusinessUnit and the detail is $Employees .The link for the GL accounts and business units is the account ID.The following output is needed: <xxx> <yyy> <BU id='SD'>Software Development</BU> <empName>Joe Smith</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='SD'>Software Development</BU> <empName>Mike Jones</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='BS'>Sales</BU> <empName>Dave Johnson</empName> <accNumber>001.345</accNumber> </yyy> </xxx> Solution When the instances (records) of the sources have a 1:1 correlation, you can use a predicate.When the instances have 1:0.. n correlation, using an xsl:for-each-group performs better than using predicates because it avoids overparsing the source.The XSLT content is as follows: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="BusinessUnits" /> <xsl:param name="Employees" /> <xsl:param name="GLAccounts"/> <xsl:template match="/" >Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-8 <xxx> <xsl:for-each-group select=" $Employees/people/employee" group- by="buid"> <!-- this section will be executed only once per 'buid' --> <!-- Store the Business Unit Record in a variable --> <xsl:variable name="BURecord"> <xsl:copy-of select=" $BusinessUnits/company/bu[id = fn:current-grouping-key()]"/> </xsl:variable> <!-- Store the GL Account Record in a variable --> <xsl:variable name="GLAccountRecord"> <xsl:copy-of select=" $GLAccounts/gl/account[id = $BURecord/bu/ accountid]" /> </xsl:variable> <!-- end: executed only once per 'buid' --> <xsl:for-each select="current-group()"> <!-- iterates the employees within the current 'buid' --> <yyy> <BU id="{./buid}"> <xsl:value-of select=" $BURecord/bu/name" /> </BU> <empName> <xsl:value-of select="./name" /> </empName> <accNumber> <xsl:value-of select=" $GLAccountRecord/account/ number"/> </accNumber> </yyy> </xsl:for-each> </xsl:for-each-group> </xxx> </xsl:template> </xsl:stylesheet> Summary When there is a 1:1 relationship, using predicates instead of <xsl:for-each-group> is faster because XSLT does not need to sort the data to create the group.When there is a 1:0.. n relationship, using <xsl:for-each-group> performs faster than using predicates.This is because predicates, in the above example, parse the entire business unit source and GL account source per every employee.See: XPath predicates xsl:for-each example Perform Date Conversions in the Mapper You can perform date conversion tasks in the mapper such as converting dates in different time zones, formats, and timestamps.Convert Date from One Time Zone to Another Time ZoneChapter 4 Perform Date Conversions in the Mapper 4-9Convert Date from One Format to Another Format Add and Subtract Dates from the Current Date Time Convert dateTime to and from Epoch Time Convert a Date Timestamp to a UNIX Timestamp Convert a Month Number to a Month Name Convert Date from One Time Zone to Another Time Zone For example, to convert between India Standard Time (IST) and Greenwich Mean Time (GMT): IST to GMT: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:49:07.859+05:30'), xsd:dayTimeDuration('PT0H')) GMT to IST: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:00:00Z'), xsd:dayTimeDuration('PT5H30M')) Convert Date from One Format to Another Format Format DefinitionXSLT Mapping Explanation Source Format: DD- MON-YYYY 19- Nov-2021 Target Format: YYYY-MM-DD 2021-11-1 9<xsl:variable name="monthListByNum"> <months> <month id="1" value="jan"/><month id="2" value="feb"/><month id="3" value="mar"/ ><month id="4" value="apr"/> <month id="5" value="may"/><month id="6" value="jun"/><month id="7" value="jul"/ ><month id="8" value="aug"/> <month id="9" value="sep"/><month id="10" value="oct"/><month id="11" value="nov"/ ><month id="12" value="dec"/> </months> </xsl:variable> <xsl:value-of select="concat (substring- after (substring-after ( $srcDateString, '-' ), '-' ), '-', $monthListByNum/months/month[@value=fn:lower- case (substring-before (substring-after ($srcDateString, '-' ), '-' ) )]/@id, '-', substring-before ( $srcDateString, '-' ) )" xml:id="id_18"/>Use an XSLT variable to hold the MON to MM conversion.Use string manipulation to get the correct format.Chapter 4 Perform Date Conversions in the Mapper 4-10Add and Subtract Dates from the Current Date Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Add 10 days to the current date time: fn:current-dateTime() + xsd:dayTimeDuration('P10D') Add one year to the current date time: fn:current-dateTime() + xsd:yearMonthDuration('P1Y') Subtract 10 days from the current date time: fn:current-dateTime() - xsd:dayTimeDuration('P10D') Subtract one year from the current date time: fn:current-dateTime() - xsd:yearMonthDuration('P1Y') If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() . |
The G/L accounts source with a 1:1 correlation with business units.You can create an XSLT map that combines them.The sources (input payloads) for this example are as follows: $BusinessUnits <company> <bu> <id>SD</id> <name>Software Development</name> <accounbtid>i9</accountid> </bu> <bu> <id>BS</id> <name>Sales</name> <accounbtid>i1</accountid> </bu> <bu> <id>MD</id> <name>Marketing</name> <accounbtid>i2</accountid> </bu> </company> $Employees <people> <emp> <buid>SD</buid> <name>Joe Smith</name> </emp> <emp> <buid>SD</buid> <name>Mike Jones</name> </emp>Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-7 <emp> <buid>BS</buid> <name>Dave Johnson</name> </emp> </people> $GLAccounts <gl> <account> <id>i1</id> <number>001.345</number> </account> <account> <id>i2</id> <number>001.477</number> </account> <account> <id>i9</id> <number>001.223</number> </account> </gl> The link between $BusinessUnits and $Employees is the business unit ID.The header is $BusinessUnit and the detail is $Employees .The link for the GL accounts and business units is the account ID.The following output is needed: <xxx> <yyy> <BU id='SD'>Software Development</BU> <empName>Joe Smith</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='SD'>Software Development</BU> <empName>Mike Jones</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='BS'>Sales</BU> <empName>Dave Johnson</empName> <accNumber>001.345</accNumber> </yyy> </xxx> Solution When the instances (records) of the sources have a 1:1 correlation, you can use a predicate.When the instances have 1:0.. n correlation, using an xsl:for-each-group performs better than using predicates because it avoids overparsing the source.The XSLT content is as follows: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="BusinessUnits" /> <xsl:param name="Employees" /> <xsl:param name="GLAccounts"/> <xsl:template match="/" >Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-8 <xxx> <xsl:for-each-group select=" $Employees/people/employee" group- by="buid"> <!-- this section will be executed only once per 'buid' --> <!-- Store the Business Unit Record in a variable --> <xsl:variable name="BURecord"> <xsl:copy-of select=" $BusinessUnits/company/bu[id = fn:current-grouping-key()]"/> </xsl:variable> <!-- Store the GL Account Record in a variable --> <xsl:variable name="GLAccountRecord"> <xsl:copy-of select=" $GLAccounts/gl/account[id = $BURecord/bu/ accountid]" /> </xsl:variable> <!-- end: executed only once per 'buid' --> <xsl:for-each select="current-group()"> <!-- iterates the employees within the current 'buid' --> <yyy> <BU id="{./buid}"> <xsl:value-of select=" $BURecord/bu/name" /> </BU> <empName> <xsl:value-of select="./name" /> </empName> <accNumber> <xsl:value-of select=" $GLAccountRecord/account/ number"/> </accNumber> </yyy> </xsl:for-each> </xsl:for-each-group> </xxx> </xsl:template> </xsl:stylesheet> Summary When there is a 1:1 relationship, using predicates instead of <xsl:for-each-group> is faster because XSLT does not need to sort the data to create the group.When there is a 1:0.. n relationship, using <xsl:for-each-group> performs faster than using predicates.This is because predicates, in the above example, parse the entire business unit source and GL account source per every employee.See: XPath predicates xsl:for-each example Perform Date Conversions in the Mapper You can perform date conversion tasks in the mapper such as converting dates in different time zones, formats, and timestamps.Convert Date from One Time Zone to Another Time ZoneChapter 4 Perform Date Conversions in the Mapper 4-9Convert Date from One Format to Another Format Add and Subtract Dates from the Current Date Time Convert dateTime to and from Epoch Time Convert a Date Timestamp to a UNIX Timestamp Convert a Month Number to a Month Name Convert Date from One Time Zone to Another Time Zone For example, to convert between India Standard Time (IST) and Greenwich Mean Time (GMT): IST to GMT: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:49:07.859+05:30'), xsd:dayTimeDuration('PT0H')) GMT to IST: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:00:00Z'), xsd:dayTimeDuration('PT5H30M')) Convert Date from One Format to Another Format Format DefinitionXSLT Mapping Explanation Source Format: DD- MON-YYYY 19- Nov-2021 Target Format: YYYY-MM-DD 2021-11-1 9<xsl:variable name="monthListByNum"> <months> <month id="1" value="jan"/><month id="2" value="feb"/><month id="3" value="mar"/ ><month id="4" value="apr"/> <month id="5" value="may"/><month id="6" value="jun"/><month id="7" value="jul"/ ><month id="8" value="aug"/> <month id="9" value="sep"/><month id="10" value="oct"/><month id="11" value="nov"/ ><month id="12" value="dec"/> </months> </xsl:variable> <xsl:value-of select="concat (substring- after (substring-after ( $srcDateString, '-' ), '-' ), '-', $monthListByNum/months/month[@value=fn:lower- case (substring-before (substring-after ($srcDateString, '-' ), '-' ) )]/@id, '-', substring-before ( $srcDateString, '-' ) )" xml:id="id_18"/>Use an XSLT variable to hold the MON to MM conversion.Use string manipulation to get the correct format.Chapter 4 Perform Date Conversions in the Mapper 4-10Add and Subtract Dates from the Current Date Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Add 10 days to the current date time: fn:current-dateTime() + xsd:dayTimeDuration('P10D') Add one year to the current date time: fn:current-dateTime() + xsd:yearMonthDuration('P1Y') Subtract 10 days from the current date time: fn:current-dateTime() - xsd:dayTimeDuration('P10D') Subtract one year from the current date time: fn:current-dateTime() - xsd:yearMonthDuration('P1Y') If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Convert dateTime to and from Epoch Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Convert the current dateTime to epoch time: (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert epoch time to dateTime : (xsd:dateTime('1970-01-01T00:00:00') + ( $epochTime * xsd:dayTimeDuration('PT1S'))) If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) . |
You can create an XSLT map that combines them.The sources (input payloads) for this example are as follows: $BusinessUnits <company> <bu> <id>SD</id> <name>Software Development</name> <accounbtid>i9</accountid> </bu> <bu> <id>BS</id> <name>Sales</name> <accounbtid>i1</accountid> </bu> <bu> <id>MD</id> <name>Marketing</name> <accounbtid>i2</accountid> </bu> </company> $Employees <people> <emp> <buid>SD</buid> <name>Joe Smith</name> </emp> <emp> <buid>SD</buid> <name>Mike Jones</name> </emp>Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-7 <emp> <buid>BS</buid> <name>Dave Johnson</name> </emp> </people> $GLAccounts <gl> <account> <id>i1</id> <number>001.345</number> </account> <account> <id>i2</id> <number>001.477</number> </account> <account> <id>i9</id> <number>001.223</number> </account> </gl> The link between $BusinessUnits and $Employees is the business unit ID.The header is $BusinessUnit and the detail is $Employees .The link for the GL accounts and business units is the account ID.The following output is needed: <xxx> <yyy> <BU id='SD'>Software Development</BU> <empName>Joe Smith</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='SD'>Software Development</BU> <empName>Mike Jones</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='BS'>Sales</BU> <empName>Dave Johnson</empName> <accNumber>001.345</accNumber> </yyy> </xxx> Solution When the instances (records) of the sources have a 1:1 correlation, you can use a predicate.When the instances have 1:0.. n correlation, using an xsl:for-each-group performs better than using predicates because it avoids overparsing the source.The XSLT content is as follows: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="BusinessUnits" /> <xsl:param name="Employees" /> <xsl:param name="GLAccounts"/> <xsl:template match="/" >Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-8 <xxx> <xsl:for-each-group select=" $Employees/people/employee" group- by="buid"> <!-- this section will be executed only once per 'buid' --> <!-- Store the Business Unit Record in a variable --> <xsl:variable name="BURecord"> <xsl:copy-of select=" $BusinessUnits/company/bu[id = fn:current-grouping-key()]"/> </xsl:variable> <!-- Store the GL Account Record in a variable --> <xsl:variable name="GLAccountRecord"> <xsl:copy-of select=" $GLAccounts/gl/account[id = $BURecord/bu/ accountid]" /> </xsl:variable> <!-- end: executed only once per 'buid' --> <xsl:for-each select="current-group()"> <!-- iterates the employees within the current 'buid' --> <yyy> <BU id="{./buid}"> <xsl:value-of select=" $BURecord/bu/name" /> </BU> <empName> <xsl:value-of select="./name" /> </empName> <accNumber> <xsl:value-of select=" $GLAccountRecord/account/ number"/> </accNumber> </yyy> </xsl:for-each> </xsl:for-each-group> </xxx> </xsl:template> </xsl:stylesheet> Summary When there is a 1:1 relationship, using predicates instead of <xsl:for-each-group> is faster because XSLT does not need to sort the data to create the group.When there is a 1:0.. n relationship, using <xsl:for-each-group> performs faster than using predicates.This is because predicates, in the above example, parse the entire business unit source and GL account source per every employee.See: XPath predicates xsl:for-each example Perform Date Conversions in the Mapper You can perform date conversion tasks in the mapper such as converting dates in different time zones, formats, and timestamps.Convert Date from One Time Zone to Another Time ZoneChapter 4 Perform Date Conversions in the Mapper 4-9Convert Date from One Format to Another Format Add and Subtract Dates from the Current Date Time Convert dateTime to and from Epoch Time Convert a Date Timestamp to a UNIX Timestamp Convert a Month Number to a Month Name Convert Date from One Time Zone to Another Time Zone For example, to convert between India Standard Time (IST) and Greenwich Mean Time (GMT): IST to GMT: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:49:07.859+05:30'), xsd:dayTimeDuration('PT0H')) GMT to IST: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:00:00Z'), xsd:dayTimeDuration('PT5H30M')) Convert Date from One Format to Another Format Format DefinitionXSLT Mapping Explanation Source Format: DD- MON-YYYY 19- Nov-2021 Target Format: YYYY-MM-DD 2021-11-1 9<xsl:variable name="monthListByNum"> <months> <month id="1" value="jan"/><month id="2" value="feb"/><month id="3" value="mar"/ ><month id="4" value="apr"/> <month id="5" value="may"/><month id="6" value="jun"/><month id="7" value="jul"/ ><month id="8" value="aug"/> <month id="9" value="sep"/><month id="10" value="oct"/><month id="11" value="nov"/ ><month id="12" value="dec"/> </months> </xsl:variable> <xsl:value-of select="concat (substring- after (substring-after ( $srcDateString, '-' ), '-' ), '-', $monthListByNum/months/month[@value=fn:lower- case (substring-before (substring-after ($srcDateString, '-' ), '-' ) )]/@id, '-', substring-before ( $srcDateString, '-' ) )" xml:id="id_18"/>Use an XSLT variable to hold the MON to MM conversion.Use string manipulation to get the correct format.Chapter 4 Perform Date Conversions in the Mapper 4-10Add and Subtract Dates from the Current Date Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Add 10 days to the current date time: fn:current-dateTime() + xsd:dayTimeDuration('P10D') Add one year to the current date time: fn:current-dateTime() + xsd:yearMonthDuration('P1Y') Subtract 10 days from the current date time: fn:current-dateTime() - xsd:dayTimeDuration('P10D') Subtract one year from the current date time: fn:current-dateTime() - xsd:yearMonthDuration('P1Y') If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Convert dateTime to and from Epoch Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Convert the current dateTime to epoch time: (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert epoch time to dateTime : (xsd:dateTime('1970-01-01T00:00:00') + ( $epochTime * xsd:dayTimeDuration('PT1S'))) If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Chapter 4 Perform Date Conversions in the Mapper 4-11Convert a Date Timestamp to a UNIX Timestamp (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert a Month Number to a Month Name If you have the exact date and time, you can use the format-dateTime function. |
The sources (input payloads) for this example are as follows: $BusinessUnits <company> <bu> <id>SD</id> <name>Software Development</name> <accounbtid>i9</accountid> </bu> <bu> <id>BS</id> <name>Sales</name> <accounbtid>i1</accountid> </bu> <bu> <id>MD</id> <name>Marketing</name> <accounbtid>i2</accountid> </bu> </company> $Employees <people> <emp> <buid>SD</buid> <name>Joe Smith</name> </emp> <emp> <buid>SD</buid> <name>Mike Jones</name> </emp>Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-7 <emp> <buid>BS</buid> <name>Dave Johnson</name> </emp> </people> $GLAccounts <gl> <account> <id>i1</id> <number>001.345</number> </account> <account> <id>i2</id> <number>001.477</number> </account> <account> <id>i9</id> <number>001.223</number> </account> </gl> The link between $BusinessUnits and $Employees is the business unit ID.The header is $BusinessUnit and the detail is $Employees .The link for the GL accounts and business units is the account ID.The following output is needed: <xxx> <yyy> <BU id='SD'>Software Development</BU> <empName>Joe Smith</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='SD'>Software Development</BU> <empName>Mike Jones</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='BS'>Sales</BU> <empName>Dave Johnson</empName> <accNumber>001.345</accNumber> </yyy> </xxx> Solution When the instances (records) of the sources have a 1:1 correlation, you can use a predicate.When the instances have 1:0.. n correlation, using an xsl:for-each-group performs better than using predicates because it avoids overparsing the source.The XSLT content is as follows: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="BusinessUnits" /> <xsl:param name="Employees" /> <xsl:param name="GLAccounts"/> <xsl:template match="/" >Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-8 <xxx> <xsl:for-each-group select=" $Employees/people/employee" group- by="buid"> <!-- this section will be executed only once per 'buid' --> <!-- Store the Business Unit Record in a variable --> <xsl:variable name="BURecord"> <xsl:copy-of select=" $BusinessUnits/company/bu[id = fn:current-grouping-key()]"/> </xsl:variable> <!-- Store the GL Account Record in a variable --> <xsl:variable name="GLAccountRecord"> <xsl:copy-of select=" $GLAccounts/gl/account[id = $BURecord/bu/ accountid]" /> </xsl:variable> <!-- end: executed only once per 'buid' --> <xsl:for-each select="current-group()"> <!-- iterates the employees within the current 'buid' --> <yyy> <BU id="{./buid}"> <xsl:value-of select=" $BURecord/bu/name" /> </BU> <empName> <xsl:value-of select="./name" /> </empName> <accNumber> <xsl:value-of select=" $GLAccountRecord/account/ number"/> </accNumber> </yyy> </xsl:for-each> </xsl:for-each-group> </xxx> </xsl:template> </xsl:stylesheet> Summary When there is a 1:1 relationship, using predicates instead of <xsl:for-each-group> is faster because XSLT does not need to sort the data to create the group.When there is a 1:0.. n relationship, using <xsl:for-each-group> performs faster than using predicates.This is because predicates, in the above example, parse the entire business unit source and GL account source per every employee.See: XPath predicates xsl:for-each example Perform Date Conversions in the Mapper You can perform date conversion tasks in the mapper such as converting dates in different time zones, formats, and timestamps.Convert Date from One Time Zone to Another Time ZoneChapter 4 Perform Date Conversions in the Mapper 4-9Convert Date from One Format to Another Format Add and Subtract Dates from the Current Date Time Convert dateTime to and from Epoch Time Convert a Date Timestamp to a UNIX Timestamp Convert a Month Number to a Month Name Convert Date from One Time Zone to Another Time Zone For example, to convert between India Standard Time (IST) and Greenwich Mean Time (GMT): IST to GMT: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:49:07.859+05:30'), xsd:dayTimeDuration('PT0H')) GMT to IST: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:00:00Z'), xsd:dayTimeDuration('PT5H30M')) Convert Date from One Format to Another Format Format DefinitionXSLT Mapping Explanation Source Format: DD- MON-YYYY 19- Nov-2021 Target Format: YYYY-MM-DD 2021-11-1 9<xsl:variable name="monthListByNum"> <months> <month id="1" value="jan"/><month id="2" value="feb"/><month id="3" value="mar"/ ><month id="4" value="apr"/> <month id="5" value="may"/><month id="6" value="jun"/><month id="7" value="jul"/ ><month id="8" value="aug"/> <month id="9" value="sep"/><month id="10" value="oct"/><month id="11" value="nov"/ ><month id="12" value="dec"/> </months> </xsl:variable> <xsl:value-of select="concat (substring- after (substring-after ( $srcDateString, '-' ), '-' ), '-', $monthListByNum/months/month[@value=fn:lower- case (substring-before (substring-after ($srcDateString, '-' ), '-' ) )]/@id, '-', substring-before ( $srcDateString, '-' ) )" xml:id="id_18"/>Use an XSLT variable to hold the MON to MM conversion.Use string manipulation to get the correct format.Chapter 4 Perform Date Conversions in the Mapper 4-10Add and Subtract Dates from the Current Date Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Add 10 days to the current date time: fn:current-dateTime() + xsd:dayTimeDuration('P10D') Add one year to the current date time: fn:current-dateTime() + xsd:yearMonthDuration('P1Y') Subtract 10 days from the current date time: fn:current-dateTime() - xsd:dayTimeDuration('P10D') Subtract one year from the current date time: fn:current-dateTime() - xsd:yearMonthDuration('P1Y') If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Convert dateTime to and from Epoch Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Convert the current dateTime to epoch time: (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert epoch time to dateTime : (xsd:dateTime('1970-01-01T00:00:00') + ( $epochTime * xsd:dayTimeDuration('PT1S'))) If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Chapter 4 Perform Date Conversions in the Mapper 4-11Convert a Date Timestamp to a UNIX Timestamp (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert a Month Number to a Month Name If you have the exact date and time, you can use the format-dateTime function.xp20:format-dateTime ((fn:current-dateTime ( ), "[MNn" ) Perform Data Manipulations in the Mapper You can perform data manipulation tasks in the mapper such as padding characters, rounding numbers, extracting values, adding CDATA content, and calculating the sum of a node. |
The header is $BusinessUnit and the detail is $Employees .The link for the GL accounts and business units is the account ID.The following output is needed: <xxx> <yyy> <BU id='SD'>Software Development</BU> <empName>Joe Smith</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='SD'>Software Development</BU> <empName>Mike Jones</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='BS'>Sales</BU> <empName>Dave Johnson</empName> <accNumber>001.345</accNumber> </yyy> </xxx> Solution When the instances (records) of the sources have a 1:1 correlation, you can use a predicate.When the instances have 1:0.. n correlation, using an xsl:for-each-group performs better than using predicates because it avoids overparsing the source.The XSLT content is as follows: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="BusinessUnits" /> <xsl:param name="Employees" /> <xsl:param name="GLAccounts"/> <xsl:template match="/" >Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-8 <xxx> <xsl:for-each-group select=" $Employees/people/employee" group- by="buid"> <!-- this section will be executed only once per 'buid' --> <!-- Store the Business Unit Record in a variable --> <xsl:variable name="BURecord"> <xsl:copy-of select=" $BusinessUnits/company/bu[id = fn:current-grouping-key()]"/> </xsl:variable> <!-- Store the GL Account Record in a variable --> <xsl:variable name="GLAccountRecord"> <xsl:copy-of select=" $GLAccounts/gl/account[id = $BURecord/bu/ accountid]" /> </xsl:variable> <!-- end: executed only once per 'buid' --> <xsl:for-each select="current-group()"> <!-- iterates the employees within the current 'buid' --> <yyy> <BU id="{./buid}"> <xsl:value-of select=" $BURecord/bu/name" /> </BU> <empName> <xsl:value-of select="./name" /> </empName> <accNumber> <xsl:value-of select=" $GLAccountRecord/account/ number"/> </accNumber> </yyy> </xsl:for-each> </xsl:for-each-group> </xxx> </xsl:template> </xsl:stylesheet> Summary When there is a 1:1 relationship, using predicates instead of <xsl:for-each-group> is faster because XSLT does not need to sort the data to create the group.When there is a 1:0.. n relationship, using <xsl:for-each-group> performs faster than using predicates.This is because predicates, in the above example, parse the entire business unit source and GL account source per every employee.See: XPath predicates xsl:for-each example Perform Date Conversions in the Mapper You can perform date conversion tasks in the mapper such as converting dates in different time zones, formats, and timestamps.Convert Date from One Time Zone to Another Time ZoneChapter 4 Perform Date Conversions in the Mapper 4-9Convert Date from One Format to Another Format Add and Subtract Dates from the Current Date Time Convert dateTime to and from Epoch Time Convert a Date Timestamp to a UNIX Timestamp Convert a Month Number to a Month Name Convert Date from One Time Zone to Another Time Zone For example, to convert between India Standard Time (IST) and Greenwich Mean Time (GMT): IST to GMT: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:49:07.859+05:30'), xsd:dayTimeDuration('PT0H')) GMT to IST: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:00:00Z'), xsd:dayTimeDuration('PT5H30M')) Convert Date from One Format to Another Format Format DefinitionXSLT Mapping Explanation Source Format: DD- MON-YYYY 19- Nov-2021 Target Format: YYYY-MM-DD 2021-11-1 9<xsl:variable name="monthListByNum"> <months> <month id="1" value="jan"/><month id="2" value="feb"/><month id="3" value="mar"/ ><month id="4" value="apr"/> <month id="5" value="may"/><month id="6" value="jun"/><month id="7" value="jul"/ ><month id="8" value="aug"/> <month id="9" value="sep"/><month id="10" value="oct"/><month id="11" value="nov"/ ><month id="12" value="dec"/> </months> </xsl:variable> <xsl:value-of select="concat (substring- after (substring-after ( $srcDateString, '-' ), '-' ), '-', $monthListByNum/months/month[@value=fn:lower- case (substring-before (substring-after ($srcDateString, '-' ), '-' ) )]/@id, '-', substring-before ( $srcDateString, '-' ) )" xml:id="id_18"/>Use an XSLT variable to hold the MON to MM conversion.Use string manipulation to get the correct format.Chapter 4 Perform Date Conversions in the Mapper 4-10Add and Subtract Dates from the Current Date Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Add 10 days to the current date time: fn:current-dateTime() + xsd:dayTimeDuration('P10D') Add one year to the current date time: fn:current-dateTime() + xsd:yearMonthDuration('P1Y') Subtract 10 days from the current date time: fn:current-dateTime() - xsd:dayTimeDuration('P10D') Subtract one year from the current date time: fn:current-dateTime() - xsd:yearMonthDuration('P1Y') If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Convert dateTime to and from Epoch Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Convert the current dateTime to epoch time: (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert epoch time to dateTime : (xsd:dateTime('1970-01-01T00:00:00') + ( $epochTime * xsd:dayTimeDuration('PT1S'))) If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Chapter 4 Perform Date Conversions in the Mapper 4-11Convert a Date Timestamp to a UNIX Timestamp (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert a Month Number to a Month Name If you have the exact date and time, you can use the format-dateTime function.xp20:format-dateTime ((fn:current-dateTime ( ), "[MNn" ) Perform Data Manipulations in the Mapper You can perform data manipulation tasks in the mapper such as padding characters, rounding numbers, extracting values, adding CDATA content, and calculating the sum of a node.Pad Characters to a String Round a Number to the Required Digits Extract a Value for a Key-Value Pair Type of XML Add CDATA Content to an XML Element Calculate the Sum of a Node from a Group of Nodes Pad Characters to a String Left-pad zeroes to nine digits: fn:format-number (12345, '000000000') Right-pad zeroes to nine digits: concat(string(12345),substring-before(fn:format-number (12345, '000000000'), string(12345)) Round a Number to the Required Digits Round a number to two decimals: fn:format-number (12345.12345, '#.00')Chapter 4 Perform Data Manipulations in the Mapper 4-12Extract a Value for a Key-Value Pair Type of XML XML Snippet XPath Expression Explanation <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/some/ namespace"> <ns:ParameterList> <ns:Parameter> <ns:Name>ID</ns:Name> <ns:Value>1</ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>NAME</ns:Name> <ns:Value>Oracle</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>AGE</ns:Name> <ns:Value>25</ns:Value> </ns:Parameter> </ns:ParameterList> </ns:SomeElement>Extract the value of parameter name 'NAME': /ns:SomeElement/ ns:ParameterList /ns:Parameter[ns:Name='NAME']/ ns:ValueAnything within the set braces in an XPath is called a predicate. |
The link for the GL accounts and business units is the account ID.The following output is needed: <xxx> <yyy> <BU id='SD'>Software Development</BU> <empName>Joe Smith</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='SD'>Software Development</BU> <empName>Mike Jones</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='BS'>Sales</BU> <empName>Dave Johnson</empName> <accNumber>001.345</accNumber> </yyy> </xxx> Solution When the instances (records) of the sources have a 1:1 correlation, you can use a predicate.When the instances have 1:0.. n correlation, using an xsl:for-each-group performs better than using predicates because it avoids overparsing the source.The XSLT content is as follows: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="BusinessUnits" /> <xsl:param name="Employees" /> <xsl:param name="GLAccounts"/> <xsl:template match="/" >Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-8 <xxx> <xsl:for-each-group select=" $Employees/people/employee" group- by="buid"> <!-- this section will be executed only once per 'buid' --> <!-- Store the Business Unit Record in a variable --> <xsl:variable name="BURecord"> <xsl:copy-of select=" $BusinessUnits/company/bu[id = fn:current-grouping-key()]"/> </xsl:variable> <!-- Store the GL Account Record in a variable --> <xsl:variable name="GLAccountRecord"> <xsl:copy-of select=" $GLAccounts/gl/account[id = $BURecord/bu/ accountid]" /> </xsl:variable> <!-- end: executed only once per 'buid' --> <xsl:for-each select="current-group()"> <!-- iterates the employees within the current 'buid' --> <yyy> <BU id="{./buid}"> <xsl:value-of select=" $BURecord/bu/name" /> </BU> <empName> <xsl:value-of select="./name" /> </empName> <accNumber> <xsl:value-of select=" $GLAccountRecord/account/ number"/> </accNumber> </yyy> </xsl:for-each> </xsl:for-each-group> </xxx> </xsl:template> </xsl:stylesheet> Summary When there is a 1:1 relationship, using predicates instead of <xsl:for-each-group> is faster because XSLT does not need to sort the data to create the group.When there is a 1:0.. n relationship, using <xsl:for-each-group> performs faster than using predicates.This is because predicates, in the above example, parse the entire business unit source and GL account source per every employee.See: XPath predicates xsl:for-each example Perform Date Conversions in the Mapper You can perform date conversion tasks in the mapper such as converting dates in different time zones, formats, and timestamps.Convert Date from One Time Zone to Another Time ZoneChapter 4 Perform Date Conversions in the Mapper 4-9Convert Date from One Format to Another Format Add and Subtract Dates from the Current Date Time Convert dateTime to and from Epoch Time Convert a Date Timestamp to a UNIX Timestamp Convert a Month Number to a Month Name Convert Date from One Time Zone to Another Time Zone For example, to convert between India Standard Time (IST) and Greenwich Mean Time (GMT): IST to GMT: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:49:07.859+05:30'), xsd:dayTimeDuration('PT0H')) GMT to IST: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:00:00Z'), xsd:dayTimeDuration('PT5H30M')) Convert Date from One Format to Another Format Format DefinitionXSLT Mapping Explanation Source Format: DD- MON-YYYY 19- Nov-2021 Target Format: YYYY-MM-DD 2021-11-1 9<xsl:variable name="monthListByNum"> <months> <month id="1" value="jan"/><month id="2" value="feb"/><month id="3" value="mar"/ ><month id="4" value="apr"/> <month id="5" value="may"/><month id="6" value="jun"/><month id="7" value="jul"/ ><month id="8" value="aug"/> <month id="9" value="sep"/><month id="10" value="oct"/><month id="11" value="nov"/ ><month id="12" value="dec"/> </months> </xsl:variable> <xsl:value-of select="concat (substring- after (substring-after ( $srcDateString, '-' ), '-' ), '-', $monthListByNum/months/month[@value=fn:lower- case (substring-before (substring-after ($srcDateString, '-' ), '-' ) )]/@id, '-', substring-before ( $srcDateString, '-' ) )" xml:id="id_18"/>Use an XSLT variable to hold the MON to MM conversion.Use string manipulation to get the correct format.Chapter 4 Perform Date Conversions in the Mapper 4-10Add and Subtract Dates from the Current Date Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Add 10 days to the current date time: fn:current-dateTime() + xsd:dayTimeDuration('P10D') Add one year to the current date time: fn:current-dateTime() + xsd:yearMonthDuration('P1Y') Subtract 10 days from the current date time: fn:current-dateTime() - xsd:dayTimeDuration('P10D') Subtract one year from the current date time: fn:current-dateTime() - xsd:yearMonthDuration('P1Y') If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Convert dateTime to and from Epoch Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Convert the current dateTime to epoch time: (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert epoch time to dateTime : (xsd:dateTime('1970-01-01T00:00:00') + ( $epochTime * xsd:dayTimeDuration('PT1S'))) If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Chapter 4 Perform Date Conversions in the Mapper 4-11Convert a Date Timestamp to a UNIX Timestamp (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert a Month Number to a Month Name If you have the exact date and time, you can use the format-dateTime function.xp20:format-dateTime ((fn:current-dateTime ( ), "[MNn" ) Perform Data Manipulations in the Mapper You can perform data manipulation tasks in the mapper such as padding characters, rounding numbers, extracting values, adding CDATA content, and calculating the sum of a node.Pad Characters to a String Round a Number to the Required Digits Extract a Value for a Key-Value Pair Type of XML Add CDATA Content to an XML Element Calculate the Sum of a Node from a Group of Nodes Pad Characters to a String Left-pad zeroes to nine digits: fn:format-number (12345, '000000000') Right-pad zeroes to nine digits: concat(string(12345),substring-before(fn:format-number (12345, '000000000'), string(12345)) Round a Number to the Required Digits Round a number to two decimals: fn:format-number (12345.12345, '#.00')Chapter 4 Perform Data Manipulations in the Mapper 4-12Extract a Value for a Key-Value Pair Type of XML XML Snippet XPath Expression Explanation <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/some/ namespace"> <ns:ParameterList> <ns:Parameter> <ns:Name>ID</ns:Name> <ns:Value>1</ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>NAME</ns:Name> <ns:Value>Oracle</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>AGE</ns:Name> <ns:Value>25</ns:Value> </ns:Parameter> </ns:ParameterList> </ns:SomeElement>Extract the value of parameter name 'NAME': /ns:SomeElement/ ns:ParameterList /ns:Parameter[ns:Name='NAME']/ ns:ValueAnything within the set braces in an XPath is called a predicate.The expression finds the parameter value whose name is NAME.Chapter 4 Perform Data Manipulations in the Mapper 4-13Add CDATA Content to an XML Element XSLT Snippet Output XML Explanation Input XML: <?xml version = '1.0' encoding = 'UTF-8'?> <nstrgmpr:process> <nstrgmpr:input> <nstrgmpr:data>I SHOULD BE IN CDATA CONTENT<nstrgmpr:data> </nstrgmpr:input> </nstrgmpr:process> XSLT snippet: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http:// xmlns.oracle.com/simpleSvc/SyncSvc/ Sync" xmlns:oracle-xsl-mapper="http:// www.oracle.com/xsl/mapper/schemas" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" exclude-result-prefixes=" ora oracle-xsl-mapper oraext xsi fn xp20 xsl ignore01" xmlns:ignore01="http:// www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:xml="http://www.w3.org/XML/1998/ namespace"> <xsl:output method="xml" cdata- section-elements="nstrgmpr:result"/> <xsl:template match="/" xml:id="id_11"> <nstrgmpr:processResponse xml:id="id_12"> <nstrgmpr:result xml:id="id_16"> <xsl:value-of select="/ nstrgmpr:process/nstrgmpr:input/ nstrgmpr:data" xml:id="id_17"/> </nstrgmpr:result> </nstrgmpr:processResponse> </xsl:template> </xsl:stylesheet><nstrgmpr:proces sResponse> <nstrgmpr:result ><! |
The following output is needed: <xxx> <yyy> <BU id='SD'>Software Development</BU> <empName>Joe Smith</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='SD'>Software Development</BU> <empName>Mike Jones</empName> <accNumber>001.223</accNumber> </yyy> <yyy> <BU id='BS'>Sales</BU> <empName>Dave Johnson</empName> <accNumber>001.345</accNumber> </yyy> </xxx> Solution When the instances (records) of the sources have a 1:1 correlation, you can use a predicate.When the instances have 1:0.. n correlation, using an xsl:for-each-group performs better than using predicates because it avoids overparsing the source.The XSLT content is as follows: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="BusinessUnits" /> <xsl:param name="Employees" /> <xsl:param name="GLAccounts"/> <xsl:template match="/" >Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-8 <xxx> <xsl:for-each-group select=" $Employees/people/employee" group- by="buid"> <!-- this section will be executed only once per 'buid' --> <!-- Store the Business Unit Record in a variable --> <xsl:variable name="BURecord"> <xsl:copy-of select=" $BusinessUnits/company/bu[id = fn:current-grouping-key()]"/> </xsl:variable> <!-- Store the GL Account Record in a variable --> <xsl:variable name="GLAccountRecord"> <xsl:copy-of select=" $GLAccounts/gl/account[id = $BURecord/bu/ accountid]" /> </xsl:variable> <!-- end: executed only once per 'buid' --> <xsl:for-each select="current-group()"> <!-- iterates the employees within the current 'buid' --> <yyy> <BU id="{./buid}"> <xsl:value-of select=" $BURecord/bu/name" /> </BU> <empName> <xsl:value-of select="./name" /> </empName> <accNumber> <xsl:value-of select=" $GLAccountRecord/account/ number"/> </accNumber> </yyy> </xsl:for-each> </xsl:for-each-group> </xxx> </xsl:template> </xsl:stylesheet> Summary When there is a 1:1 relationship, using predicates instead of <xsl:for-each-group> is faster because XSLT does not need to sort the data to create the group.When there is a 1:0.. n relationship, using <xsl:for-each-group> performs faster than using predicates.This is because predicates, in the above example, parse the entire business unit source and GL account source per every employee.See: XPath predicates xsl:for-each example Perform Date Conversions in the Mapper You can perform date conversion tasks in the mapper such as converting dates in different time zones, formats, and timestamps.Convert Date from One Time Zone to Another Time ZoneChapter 4 Perform Date Conversions in the Mapper 4-9Convert Date from One Format to Another Format Add and Subtract Dates from the Current Date Time Convert dateTime to and from Epoch Time Convert a Date Timestamp to a UNIX Timestamp Convert a Month Number to a Month Name Convert Date from One Time Zone to Another Time Zone For example, to convert between India Standard Time (IST) and Greenwich Mean Time (GMT): IST to GMT: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:49:07.859+05:30'), xsd:dayTimeDuration('PT0H')) GMT to IST: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:00:00Z'), xsd:dayTimeDuration('PT5H30M')) Convert Date from One Format to Another Format Format DefinitionXSLT Mapping Explanation Source Format: DD- MON-YYYY 19- Nov-2021 Target Format: YYYY-MM-DD 2021-11-1 9<xsl:variable name="monthListByNum"> <months> <month id="1" value="jan"/><month id="2" value="feb"/><month id="3" value="mar"/ ><month id="4" value="apr"/> <month id="5" value="may"/><month id="6" value="jun"/><month id="7" value="jul"/ ><month id="8" value="aug"/> <month id="9" value="sep"/><month id="10" value="oct"/><month id="11" value="nov"/ ><month id="12" value="dec"/> </months> </xsl:variable> <xsl:value-of select="concat (substring- after (substring-after ( $srcDateString, '-' ), '-' ), '-', $monthListByNum/months/month[@value=fn:lower- case (substring-before (substring-after ($srcDateString, '-' ), '-' ) )]/@id, '-', substring-before ( $srcDateString, '-' ) )" xml:id="id_18"/>Use an XSLT variable to hold the MON to MM conversion.Use string manipulation to get the correct format.Chapter 4 Perform Date Conversions in the Mapper 4-10Add and Subtract Dates from the Current Date Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Add 10 days to the current date time: fn:current-dateTime() + xsd:dayTimeDuration('P10D') Add one year to the current date time: fn:current-dateTime() + xsd:yearMonthDuration('P1Y') Subtract 10 days from the current date time: fn:current-dateTime() - xsd:dayTimeDuration('P10D') Subtract one year from the current date time: fn:current-dateTime() - xsd:yearMonthDuration('P1Y') If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Convert dateTime to and from Epoch Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Convert the current dateTime to epoch time: (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert epoch time to dateTime : (xsd:dateTime('1970-01-01T00:00:00') + ( $epochTime * xsd:dayTimeDuration('PT1S'))) If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Chapter 4 Perform Date Conversions in the Mapper 4-11Convert a Date Timestamp to a UNIX Timestamp (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert a Month Number to a Month Name If you have the exact date and time, you can use the format-dateTime function.xp20:format-dateTime ((fn:current-dateTime ( ), "[MNn" ) Perform Data Manipulations in the Mapper You can perform data manipulation tasks in the mapper such as padding characters, rounding numbers, extracting values, adding CDATA content, and calculating the sum of a node.Pad Characters to a String Round a Number to the Required Digits Extract a Value for a Key-Value Pair Type of XML Add CDATA Content to an XML Element Calculate the Sum of a Node from a Group of Nodes Pad Characters to a String Left-pad zeroes to nine digits: fn:format-number (12345, '000000000') Right-pad zeroes to nine digits: concat(string(12345),substring-before(fn:format-number (12345, '000000000'), string(12345)) Round a Number to the Required Digits Round a number to two decimals: fn:format-number (12345.12345, '#.00')Chapter 4 Perform Data Manipulations in the Mapper 4-12Extract a Value for a Key-Value Pair Type of XML XML Snippet XPath Expression Explanation <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/some/ namespace"> <ns:ParameterList> <ns:Parameter> <ns:Name>ID</ns:Name> <ns:Value>1</ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>NAME</ns:Name> <ns:Value>Oracle</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>AGE</ns:Name> <ns:Value>25</ns:Value> </ns:Parameter> </ns:ParameterList> </ns:SomeElement>Extract the value of parameter name 'NAME': /ns:SomeElement/ ns:ParameterList /ns:Parameter[ns:Name='NAME']/ ns:ValueAnything within the set braces in an XPath is called a predicate.The expression finds the parameter value whose name is NAME.Chapter 4 Perform Data Manipulations in the Mapper 4-13Add CDATA Content to an XML Element XSLT Snippet Output XML Explanation Input XML: <?xml version = '1.0' encoding = 'UTF-8'?> <nstrgmpr:process> <nstrgmpr:input> <nstrgmpr:data>I SHOULD BE IN CDATA CONTENT<nstrgmpr:data> </nstrgmpr:input> </nstrgmpr:process> XSLT snippet: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http:// xmlns.oracle.com/simpleSvc/SyncSvc/ Sync" xmlns:oracle-xsl-mapper="http:// www.oracle.com/xsl/mapper/schemas" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" exclude-result-prefixes=" ora oracle-xsl-mapper oraext xsi fn xp20 xsl ignore01" xmlns:ignore01="http:// www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:xml="http://www.w3.org/XML/1998/ namespace"> <xsl:output method="xml" cdata- section-elements="nstrgmpr:result"/> <xsl:template match="/" xml:id="id_11"> <nstrgmpr:processResponse xml:id="id_12"> <nstrgmpr:result xml:id="id_16"> <xsl:value-of select="/ nstrgmpr:process/nstrgmpr:input/ nstrgmpr:data" xml:id="id_17"/> </nstrgmpr:result> </nstrgmpr:processResponse> </xsl:template> </xsl:stylesheet><nstrgmpr:proces sResponse> <nstrgmpr:result ><![CDATA[I SHOULD BE IN CDATA CONTENT]]></ nstrgmpr:result> </ nstrgmpr:process Response>You must manually add the xsl:output tag in the XSLT. |
When the instances have 1:0.. n correlation, using an xsl:for-each-group performs better than using predicates because it avoids overparsing the source.The XSLT content is as follows: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="BusinessUnits" /> <xsl:param name="Employees" /> <xsl:param name="GLAccounts"/> <xsl:template match="/" >Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-8 <xxx> <xsl:for-each-group select=" $Employees/people/employee" group- by="buid"> <!-- this section will be executed only once per 'buid' --> <!-- Store the Business Unit Record in a variable --> <xsl:variable name="BURecord"> <xsl:copy-of select=" $BusinessUnits/company/bu[id = fn:current-grouping-key()]"/> </xsl:variable> <!-- Store the GL Account Record in a variable --> <xsl:variable name="GLAccountRecord"> <xsl:copy-of select=" $GLAccounts/gl/account[id = $BURecord/bu/ accountid]" /> </xsl:variable> <!-- end: executed only once per 'buid' --> <xsl:for-each select="current-group()"> <!-- iterates the employees within the current 'buid' --> <yyy> <BU id="{./buid}"> <xsl:value-of select=" $BURecord/bu/name" /> </BU> <empName> <xsl:value-of select="./name" /> </empName> <accNumber> <xsl:value-of select=" $GLAccountRecord/account/ number"/> </accNumber> </yyy> </xsl:for-each> </xsl:for-each-group> </xxx> </xsl:template> </xsl:stylesheet> Summary When there is a 1:1 relationship, using predicates instead of <xsl:for-each-group> is faster because XSLT does not need to sort the data to create the group.When there is a 1:0.. n relationship, using <xsl:for-each-group> performs faster than using predicates.This is because predicates, in the above example, parse the entire business unit source and GL account source per every employee.See: XPath predicates xsl:for-each example Perform Date Conversions in the Mapper You can perform date conversion tasks in the mapper such as converting dates in different time zones, formats, and timestamps.Convert Date from One Time Zone to Another Time ZoneChapter 4 Perform Date Conversions in the Mapper 4-9Convert Date from One Format to Another Format Add and Subtract Dates from the Current Date Time Convert dateTime to and from Epoch Time Convert a Date Timestamp to a UNIX Timestamp Convert a Month Number to a Month Name Convert Date from One Time Zone to Another Time Zone For example, to convert between India Standard Time (IST) and Greenwich Mean Time (GMT): IST to GMT: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:49:07.859+05:30'), xsd:dayTimeDuration('PT0H')) GMT to IST: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:00:00Z'), xsd:dayTimeDuration('PT5H30M')) Convert Date from One Format to Another Format Format DefinitionXSLT Mapping Explanation Source Format: DD- MON-YYYY 19- Nov-2021 Target Format: YYYY-MM-DD 2021-11-1 9<xsl:variable name="monthListByNum"> <months> <month id="1" value="jan"/><month id="2" value="feb"/><month id="3" value="mar"/ ><month id="4" value="apr"/> <month id="5" value="may"/><month id="6" value="jun"/><month id="7" value="jul"/ ><month id="8" value="aug"/> <month id="9" value="sep"/><month id="10" value="oct"/><month id="11" value="nov"/ ><month id="12" value="dec"/> </months> </xsl:variable> <xsl:value-of select="concat (substring- after (substring-after ( $srcDateString, '-' ), '-' ), '-', $monthListByNum/months/month[@value=fn:lower- case (substring-before (substring-after ($srcDateString, '-' ), '-' ) )]/@id, '-', substring-before ( $srcDateString, '-' ) )" xml:id="id_18"/>Use an XSLT variable to hold the MON to MM conversion.Use string manipulation to get the correct format.Chapter 4 Perform Date Conversions in the Mapper 4-10Add and Subtract Dates from the Current Date Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Add 10 days to the current date time: fn:current-dateTime() + xsd:dayTimeDuration('P10D') Add one year to the current date time: fn:current-dateTime() + xsd:yearMonthDuration('P1Y') Subtract 10 days from the current date time: fn:current-dateTime() - xsd:dayTimeDuration('P10D') Subtract one year from the current date time: fn:current-dateTime() - xsd:yearMonthDuration('P1Y') If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Convert dateTime to and from Epoch Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Convert the current dateTime to epoch time: (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert epoch time to dateTime : (xsd:dateTime('1970-01-01T00:00:00') + ( $epochTime * xsd:dayTimeDuration('PT1S'))) If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Chapter 4 Perform Date Conversions in the Mapper 4-11Convert a Date Timestamp to a UNIX Timestamp (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert a Month Number to a Month Name If you have the exact date and time, you can use the format-dateTime function.xp20:format-dateTime ((fn:current-dateTime ( ), "[MNn" ) Perform Data Manipulations in the Mapper You can perform data manipulation tasks in the mapper such as padding characters, rounding numbers, extracting values, adding CDATA content, and calculating the sum of a node.Pad Characters to a String Round a Number to the Required Digits Extract a Value for a Key-Value Pair Type of XML Add CDATA Content to an XML Element Calculate the Sum of a Node from a Group of Nodes Pad Characters to a String Left-pad zeroes to nine digits: fn:format-number (12345, '000000000') Right-pad zeroes to nine digits: concat(string(12345),substring-before(fn:format-number (12345, '000000000'), string(12345)) Round a Number to the Required Digits Round a number to two decimals: fn:format-number (12345.12345, '#.00')Chapter 4 Perform Data Manipulations in the Mapper 4-12Extract a Value for a Key-Value Pair Type of XML XML Snippet XPath Expression Explanation <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/some/ namespace"> <ns:ParameterList> <ns:Parameter> <ns:Name>ID</ns:Name> <ns:Value>1</ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>NAME</ns:Name> <ns:Value>Oracle</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>AGE</ns:Name> <ns:Value>25</ns:Value> </ns:Parameter> </ns:ParameterList> </ns:SomeElement>Extract the value of parameter name 'NAME': /ns:SomeElement/ ns:ParameterList /ns:Parameter[ns:Name='NAME']/ ns:ValueAnything within the set braces in an XPath is called a predicate.The expression finds the parameter value whose name is NAME.Chapter 4 Perform Data Manipulations in the Mapper 4-13Add CDATA Content to an XML Element XSLT Snippet Output XML Explanation Input XML: <?xml version = '1.0' encoding = 'UTF-8'?> <nstrgmpr:process> <nstrgmpr:input> <nstrgmpr:data>I SHOULD BE IN CDATA CONTENT<nstrgmpr:data> </nstrgmpr:input> </nstrgmpr:process> XSLT snippet: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http:// xmlns.oracle.com/simpleSvc/SyncSvc/ Sync" xmlns:oracle-xsl-mapper="http:// www.oracle.com/xsl/mapper/schemas" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" exclude-result-prefixes=" ora oracle-xsl-mapper oraext xsi fn xp20 xsl ignore01" xmlns:ignore01="http:// www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:xml="http://www.w3.org/XML/1998/ namespace"> <xsl:output method="xml" cdata- section-elements="nstrgmpr:result"/> <xsl:template match="/" xml:id="id_11"> <nstrgmpr:processResponse xml:id="id_12"> <nstrgmpr:result xml:id="id_16"> <xsl:value-of select="/ nstrgmpr:process/nstrgmpr:input/ nstrgmpr:data" xml:id="id_17"/> </nstrgmpr:result> </nstrgmpr:processResponse> </xsl:template> </xsl:stylesheet><nstrgmpr:proces sResponse> <nstrgmpr:result ><![CDATA[I SHOULD BE IN CDATA CONTENT]]></ nstrgmpr:result> </ nstrgmpr:process Response>You must manually add the xsl:output tag in the XSLT.The output attribute must be xml. |
The XSLT content is as follows: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="BusinessUnits" /> <xsl:param name="Employees" /> <xsl:param name="GLAccounts"/> <xsl:template match="/" >Chapter 4 Create an XSLT Map to Read Multiple Correlated Payloads 4-8 <xxx> <xsl:for-each-group select=" $Employees/people/employee" group- by="buid"> <!-- this section will be executed only once per 'buid' --> <!-- Store the Business Unit Record in a variable --> <xsl:variable name="BURecord"> <xsl:copy-of select=" $BusinessUnits/company/bu[id = fn:current-grouping-key()]"/> </xsl:variable> <!-- Store the GL Account Record in a variable --> <xsl:variable name="GLAccountRecord"> <xsl:copy-of select=" $GLAccounts/gl/account[id = $BURecord/bu/ accountid]" /> </xsl:variable> <!-- end: executed only once per 'buid' --> <xsl:for-each select="current-group()"> <!-- iterates the employees within the current 'buid' --> <yyy> <BU id="{./buid}"> <xsl:value-of select=" $BURecord/bu/name" /> </BU> <empName> <xsl:value-of select="./name" /> </empName> <accNumber> <xsl:value-of select=" $GLAccountRecord/account/ number"/> </accNumber> </yyy> </xsl:for-each> </xsl:for-each-group> </xxx> </xsl:template> </xsl:stylesheet> Summary When there is a 1:1 relationship, using predicates instead of <xsl:for-each-group> is faster because XSLT does not need to sort the data to create the group.When there is a 1:0.. n relationship, using <xsl:for-each-group> performs faster than using predicates.This is because predicates, in the above example, parse the entire business unit source and GL account source per every employee.See: XPath predicates xsl:for-each example Perform Date Conversions in the Mapper You can perform date conversion tasks in the mapper such as converting dates in different time zones, formats, and timestamps.Convert Date from One Time Zone to Another Time ZoneChapter 4 Perform Date Conversions in the Mapper 4-9Convert Date from One Format to Another Format Add and Subtract Dates from the Current Date Time Convert dateTime to and from Epoch Time Convert a Date Timestamp to a UNIX Timestamp Convert a Month Number to a Month Name Convert Date from One Time Zone to Another Time Zone For example, to convert between India Standard Time (IST) and Greenwich Mean Time (GMT): IST to GMT: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:49:07.859+05:30'), xsd:dayTimeDuration('PT0H')) GMT to IST: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:00:00Z'), xsd:dayTimeDuration('PT5H30M')) Convert Date from One Format to Another Format Format DefinitionXSLT Mapping Explanation Source Format: DD- MON-YYYY 19- Nov-2021 Target Format: YYYY-MM-DD 2021-11-1 9<xsl:variable name="monthListByNum"> <months> <month id="1" value="jan"/><month id="2" value="feb"/><month id="3" value="mar"/ ><month id="4" value="apr"/> <month id="5" value="may"/><month id="6" value="jun"/><month id="7" value="jul"/ ><month id="8" value="aug"/> <month id="9" value="sep"/><month id="10" value="oct"/><month id="11" value="nov"/ ><month id="12" value="dec"/> </months> </xsl:variable> <xsl:value-of select="concat (substring- after (substring-after ( $srcDateString, '-' ), '-' ), '-', $monthListByNum/months/month[@value=fn:lower- case (substring-before (substring-after ($srcDateString, '-' ), '-' ) )]/@id, '-', substring-before ( $srcDateString, '-' ) )" xml:id="id_18"/>Use an XSLT variable to hold the MON to MM conversion.Use string manipulation to get the correct format.Chapter 4 Perform Date Conversions in the Mapper 4-10Add and Subtract Dates from the Current Date Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Add 10 days to the current date time: fn:current-dateTime() + xsd:dayTimeDuration('P10D') Add one year to the current date time: fn:current-dateTime() + xsd:yearMonthDuration('P1Y') Subtract 10 days from the current date time: fn:current-dateTime() - xsd:dayTimeDuration('P10D') Subtract one year from the current date time: fn:current-dateTime() - xsd:yearMonthDuration('P1Y') If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Convert dateTime to and from Epoch Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Convert the current dateTime to epoch time: (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert epoch time to dateTime : (xsd:dateTime('1970-01-01T00:00:00') + ( $epochTime * xsd:dayTimeDuration('PT1S'))) If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Chapter 4 Perform Date Conversions in the Mapper 4-11Convert a Date Timestamp to a UNIX Timestamp (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert a Month Number to a Month Name If you have the exact date and time, you can use the format-dateTime function.xp20:format-dateTime ((fn:current-dateTime ( ), "[MNn" ) Perform Data Manipulations in the Mapper You can perform data manipulation tasks in the mapper such as padding characters, rounding numbers, extracting values, adding CDATA content, and calculating the sum of a node.Pad Characters to a String Round a Number to the Required Digits Extract a Value for a Key-Value Pair Type of XML Add CDATA Content to an XML Element Calculate the Sum of a Node from a Group of Nodes Pad Characters to a String Left-pad zeroes to nine digits: fn:format-number (12345, '000000000') Right-pad zeroes to nine digits: concat(string(12345),substring-before(fn:format-number (12345, '000000000'), string(12345)) Round a Number to the Required Digits Round a number to two decimals: fn:format-number (12345.12345, '#.00')Chapter 4 Perform Data Manipulations in the Mapper 4-12Extract a Value for a Key-Value Pair Type of XML XML Snippet XPath Expression Explanation <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/some/ namespace"> <ns:ParameterList> <ns:Parameter> <ns:Name>ID</ns:Name> <ns:Value>1</ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>NAME</ns:Name> <ns:Value>Oracle</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>AGE</ns:Name> <ns:Value>25</ns:Value> </ns:Parameter> </ns:ParameterList> </ns:SomeElement>Extract the value of parameter name 'NAME': /ns:SomeElement/ ns:ParameterList /ns:Parameter[ns:Name='NAME']/ ns:ValueAnything within the set braces in an XPath is called a predicate.The expression finds the parameter value whose name is NAME.Chapter 4 Perform Data Manipulations in the Mapper 4-13Add CDATA Content to an XML Element XSLT Snippet Output XML Explanation Input XML: <?xml version = '1.0' encoding = 'UTF-8'?> <nstrgmpr:process> <nstrgmpr:input> <nstrgmpr:data>I SHOULD BE IN CDATA CONTENT<nstrgmpr:data> </nstrgmpr:input> </nstrgmpr:process> XSLT snippet: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http:// xmlns.oracle.com/simpleSvc/SyncSvc/ Sync" xmlns:oracle-xsl-mapper="http:// www.oracle.com/xsl/mapper/schemas" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" exclude-result-prefixes=" ora oracle-xsl-mapper oraext xsi fn xp20 xsl ignore01" xmlns:ignore01="http:// www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:xml="http://www.w3.org/XML/1998/ namespace"> <xsl:output method="xml" cdata- section-elements="nstrgmpr:result"/> <xsl:template match="/" xml:id="id_11"> <nstrgmpr:processResponse xml:id="id_12"> <nstrgmpr:result xml:id="id_16"> <xsl:value-of select="/ nstrgmpr:process/nstrgmpr:input/ nstrgmpr:data" xml:id="id_17"/> </nstrgmpr:result> </nstrgmpr:processResponse> </xsl:template> </xsl:stylesheet><nstrgmpr:proces sResponse> <nstrgmpr:result ><![CDATA[I SHOULD BE IN CDATA CONTENT]]></ nstrgmpr:result> </ nstrgmpr:process Response>You must manually add the xsl:output tag in the XSLT.The output attribute must be xml.The attribute cdata- section- elements indicates which fields have the CDATA content post- transformatio n. In case of multiple elements, the value must be separated by spaces. |
When there is a 1:0.. n relationship, using <xsl:for-each-group> performs faster than using predicates.This is because predicates, in the above example, parse the entire business unit source and GL account source per every employee.See: XPath predicates xsl:for-each example Perform Date Conversions in the Mapper You can perform date conversion tasks in the mapper such as converting dates in different time zones, formats, and timestamps.Convert Date from One Time Zone to Another Time ZoneChapter 4 Perform Date Conversions in the Mapper 4-9Convert Date from One Format to Another Format Add and Subtract Dates from the Current Date Time Convert dateTime to and from Epoch Time Convert a Date Timestamp to a UNIX Timestamp Convert a Month Number to a Month Name Convert Date from One Time Zone to Another Time Zone For example, to convert between India Standard Time (IST) and Greenwich Mean Time (GMT): IST to GMT: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:49:07.859+05:30'), xsd:dayTimeDuration('PT0H')) GMT to IST: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:00:00Z'), xsd:dayTimeDuration('PT5H30M')) Convert Date from One Format to Another Format Format DefinitionXSLT Mapping Explanation Source Format: DD- MON-YYYY 19- Nov-2021 Target Format: YYYY-MM-DD 2021-11-1 9<xsl:variable name="monthListByNum"> <months> <month id="1" value="jan"/><month id="2" value="feb"/><month id="3" value="mar"/ ><month id="4" value="apr"/> <month id="5" value="may"/><month id="6" value="jun"/><month id="7" value="jul"/ ><month id="8" value="aug"/> <month id="9" value="sep"/><month id="10" value="oct"/><month id="11" value="nov"/ ><month id="12" value="dec"/> </months> </xsl:variable> <xsl:value-of select="concat (substring- after (substring-after ( $srcDateString, '-' ), '-' ), '-', $monthListByNum/months/month[@value=fn:lower- case (substring-before (substring-after ($srcDateString, '-' ), '-' ) )]/@id, '-', substring-before ( $srcDateString, '-' ) )" xml:id="id_18"/>Use an XSLT variable to hold the MON to MM conversion.Use string manipulation to get the correct format.Chapter 4 Perform Date Conversions in the Mapper 4-10Add and Subtract Dates from the Current Date Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Add 10 days to the current date time: fn:current-dateTime() + xsd:dayTimeDuration('P10D') Add one year to the current date time: fn:current-dateTime() + xsd:yearMonthDuration('P1Y') Subtract 10 days from the current date time: fn:current-dateTime() - xsd:dayTimeDuration('P10D') Subtract one year from the current date time: fn:current-dateTime() - xsd:yearMonthDuration('P1Y') If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Convert dateTime to and from Epoch Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Convert the current dateTime to epoch time: (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert epoch time to dateTime : (xsd:dateTime('1970-01-01T00:00:00') + ( $epochTime * xsd:dayTimeDuration('PT1S'))) If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Chapter 4 Perform Date Conversions in the Mapper 4-11Convert a Date Timestamp to a UNIX Timestamp (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert a Month Number to a Month Name If you have the exact date and time, you can use the format-dateTime function.xp20:format-dateTime ((fn:current-dateTime ( ), "[MNn" ) Perform Data Manipulations in the Mapper You can perform data manipulation tasks in the mapper such as padding characters, rounding numbers, extracting values, adding CDATA content, and calculating the sum of a node.Pad Characters to a String Round a Number to the Required Digits Extract a Value for a Key-Value Pair Type of XML Add CDATA Content to an XML Element Calculate the Sum of a Node from a Group of Nodes Pad Characters to a String Left-pad zeroes to nine digits: fn:format-number (12345, '000000000') Right-pad zeroes to nine digits: concat(string(12345),substring-before(fn:format-number (12345, '000000000'), string(12345)) Round a Number to the Required Digits Round a number to two decimals: fn:format-number (12345.12345, '#.00')Chapter 4 Perform Data Manipulations in the Mapper 4-12Extract a Value for a Key-Value Pair Type of XML XML Snippet XPath Expression Explanation <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/some/ namespace"> <ns:ParameterList> <ns:Parameter> <ns:Name>ID</ns:Name> <ns:Value>1</ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>NAME</ns:Name> <ns:Value>Oracle</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>AGE</ns:Name> <ns:Value>25</ns:Value> </ns:Parameter> </ns:ParameterList> </ns:SomeElement>Extract the value of parameter name 'NAME': /ns:SomeElement/ ns:ParameterList /ns:Parameter[ns:Name='NAME']/ ns:ValueAnything within the set braces in an XPath is called a predicate.The expression finds the parameter value whose name is NAME.Chapter 4 Perform Data Manipulations in the Mapper 4-13Add CDATA Content to an XML Element XSLT Snippet Output XML Explanation Input XML: <?xml version = '1.0' encoding = 'UTF-8'?> <nstrgmpr:process> <nstrgmpr:input> <nstrgmpr:data>I SHOULD BE IN CDATA CONTENT<nstrgmpr:data> </nstrgmpr:input> </nstrgmpr:process> XSLT snippet: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http:// xmlns.oracle.com/simpleSvc/SyncSvc/ Sync" xmlns:oracle-xsl-mapper="http:// www.oracle.com/xsl/mapper/schemas" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" exclude-result-prefixes=" ora oracle-xsl-mapper oraext xsi fn xp20 xsl ignore01" xmlns:ignore01="http:// www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:xml="http://www.w3.org/XML/1998/ namespace"> <xsl:output method="xml" cdata- section-elements="nstrgmpr:result"/> <xsl:template match="/" xml:id="id_11"> <nstrgmpr:processResponse xml:id="id_12"> <nstrgmpr:result xml:id="id_16"> <xsl:value-of select="/ nstrgmpr:process/nstrgmpr:input/ nstrgmpr:data" xml:id="id_17"/> </nstrgmpr:result> </nstrgmpr:processResponse> </xsl:template> </xsl:stylesheet><nstrgmpr:proces sResponse> <nstrgmpr:result ><![CDATA[I SHOULD BE IN CDATA CONTENT]]></ nstrgmpr:result> </ nstrgmpr:process Response>You must manually add the xsl:output tag in the XSLT.The output attribute must be xml.The attribute cdata- section- elements indicates which fields have the CDATA content post- transformatio n. In case of multiple elements, the value must be separated by spaces.The data should be normally mapped to the element in which CDATA should be present. |
This is because predicates, in the above example, parse the entire business unit source and GL account source per every employee.See: XPath predicates xsl:for-each example Perform Date Conversions in the Mapper You can perform date conversion tasks in the mapper such as converting dates in different time zones, formats, and timestamps.Convert Date from One Time Zone to Another Time ZoneChapter 4 Perform Date Conversions in the Mapper 4-9Convert Date from One Format to Another Format Add and Subtract Dates from the Current Date Time Convert dateTime to and from Epoch Time Convert a Date Timestamp to a UNIX Timestamp Convert a Month Number to a Month Name Convert Date from One Time Zone to Another Time Zone For example, to convert between India Standard Time (IST) and Greenwich Mean Time (GMT): IST to GMT: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:49:07.859+05:30'), xsd:dayTimeDuration('PT0H')) GMT to IST: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:00:00Z'), xsd:dayTimeDuration('PT5H30M')) Convert Date from One Format to Another Format Format DefinitionXSLT Mapping Explanation Source Format: DD- MON-YYYY 19- Nov-2021 Target Format: YYYY-MM-DD 2021-11-1 9<xsl:variable name="monthListByNum"> <months> <month id="1" value="jan"/><month id="2" value="feb"/><month id="3" value="mar"/ ><month id="4" value="apr"/> <month id="5" value="may"/><month id="6" value="jun"/><month id="7" value="jul"/ ><month id="8" value="aug"/> <month id="9" value="sep"/><month id="10" value="oct"/><month id="11" value="nov"/ ><month id="12" value="dec"/> </months> </xsl:variable> <xsl:value-of select="concat (substring- after (substring-after ( $srcDateString, '-' ), '-' ), '-', $monthListByNum/months/month[@value=fn:lower- case (substring-before (substring-after ($srcDateString, '-' ), '-' ) )]/@id, '-', substring-before ( $srcDateString, '-' ) )" xml:id="id_18"/>Use an XSLT variable to hold the MON to MM conversion.Use string manipulation to get the correct format.Chapter 4 Perform Date Conversions in the Mapper 4-10Add and Subtract Dates from the Current Date Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Add 10 days to the current date time: fn:current-dateTime() + xsd:dayTimeDuration('P10D') Add one year to the current date time: fn:current-dateTime() + xsd:yearMonthDuration('P1Y') Subtract 10 days from the current date time: fn:current-dateTime() - xsd:dayTimeDuration('P10D') Subtract one year from the current date time: fn:current-dateTime() - xsd:yearMonthDuration('P1Y') If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Convert dateTime to and from Epoch Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Convert the current dateTime to epoch time: (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert epoch time to dateTime : (xsd:dateTime('1970-01-01T00:00:00') + ( $epochTime * xsd:dayTimeDuration('PT1S'))) If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Chapter 4 Perform Date Conversions in the Mapper 4-11Convert a Date Timestamp to a UNIX Timestamp (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert a Month Number to a Month Name If you have the exact date and time, you can use the format-dateTime function.xp20:format-dateTime ((fn:current-dateTime ( ), "[MNn" ) Perform Data Manipulations in the Mapper You can perform data manipulation tasks in the mapper such as padding characters, rounding numbers, extracting values, adding CDATA content, and calculating the sum of a node.Pad Characters to a String Round a Number to the Required Digits Extract a Value for a Key-Value Pair Type of XML Add CDATA Content to an XML Element Calculate the Sum of a Node from a Group of Nodes Pad Characters to a String Left-pad zeroes to nine digits: fn:format-number (12345, '000000000') Right-pad zeroes to nine digits: concat(string(12345),substring-before(fn:format-number (12345, '000000000'), string(12345)) Round a Number to the Required Digits Round a number to two decimals: fn:format-number (12345.12345, '#.00')Chapter 4 Perform Data Manipulations in the Mapper 4-12Extract a Value for a Key-Value Pair Type of XML XML Snippet XPath Expression Explanation <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/some/ namespace"> <ns:ParameterList> <ns:Parameter> <ns:Name>ID</ns:Name> <ns:Value>1</ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>NAME</ns:Name> <ns:Value>Oracle</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>AGE</ns:Name> <ns:Value>25</ns:Value> </ns:Parameter> </ns:ParameterList> </ns:SomeElement>Extract the value of parameter name 'NAME': /ns:SomeElement/ ns:ParameterList /ns:Parameter[ns:Name='NAME']/ ns:ValueAnything within the set braces in an XPath is called a predicate.The expression finds the parameter value whose name is NAME.Chapter 4 Perform Data Manipulations in the Mapper 4-13Add CDATA Content to an XML Element XSLT Snippet Output XML Explanation Input XML: <?xml version = '1.0' encoding = 'UTF-8'?> <nstrgmpr:process> <nstrgmpr:input> <nstrgmpr:data>I SHOULD BE IN CDATA CONTENT<nstrgmpr:data> </nstrgmpr:input> </nstrgmpr:process> XSLT snippet: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http:// xmlns.oracle.com/simpleSvc/SyncSvc/ Sync" xmlns:oracle-xsl-mapper="http:// www.oracle.com/xsl/mapper/schemas" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" exclude-result-prefixes=" ora oracle-xsl-mapper oraext xsi fn xp20 xsl ignore01" xmlns:ignore01="http:// www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:xml="http://www.w3.org/XML/1998/ namespace"> <xsl:output method="xml" cdata- section-elements="nstrgmpr:result"/> <xsl:template match="/" xml:id="id_11"> <nstrgmpr:processResponse xml:id="id_12"> <nstrgmpr:result xml:id="id_16"> <xsl:value-of select="/ nstrgmpr:process/nstrgmpr:input/ nstrgmpr:data" xml:id="id_17"/> </nstrgmpr:result> </nstrgmpr:processResponse> </xsl:template> </xsl:stylesheet><nstrgmpr:proces sResponse> <nstrgmpr:result ><![CDATA[I SHOULD BE IN CDATA CONTENT]]></ nstrgmpr:result> </ nstrgmpr:process Response>You must manually add the xsl:output tag in the XSLT.The output attribute must be xml.The attribute cdata- section- elements indicates which fields have the CDATA content post- transformatio n. In case of multiple elements, the value must be separated by spaces.The data should be normally mapped to the element in which CDATA should be present.Note: This approach doesnt work for file-based operations such as stage file actions and FTP where the content is rewritten from XSLT.Chapter 4 Perform Data Manipulations in the Mapper 4-14Calculate the Sum of a Node from a Group of Nodes XML Snippet XPath Expression Explanation Input XML <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/ some/namespace/ request"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>10</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> </ ns:ParameterList> </ns:SomeElement>XSLT snippet: <nstrgdfl:ResultElement> <xsl:for-each-group select="/ ns:SomeElement/ns:ParameterList/ ns:Parameter" group-by="ns:Name"> <nstrgdfl:ParameterList> <nstrgdfl:Parameter> <nstrgdfl:Name> <xsl:value-of select="fn:current-grouping- key()"/> </nstrgdfl:Name> <nstrgdfl:SumOfValues> <xsl:value-of select="sum(fn:current-group/ ns:Value)"/> </nstrgdfl:SumOfValues> <nstrgdfl:Parameter> </nstrgdfl:ParameterList> </xsl:for-each> </nstrgdfl:ResultElement> Output XML: <ns:ResultElement30xmlns:ns="http ://xmlns.oracle.com/some/ namespace/response"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ns:Name> <ns:SumOfValues>1</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ns:Name> <ns:SumOfValues>20</ ns:Value> </ns:Parameter> </ns:ParameterList> </ns:ResultElement>The SUM function must be set on current- group. |
See: XPath predicates xsl:for-each example Perform Date Conversions in the Mapper You can perform date conversion tasks in the mapper such as converting dates in different time zones, formats, and timestamps.Convert Date from One Time Zone to Another Time ZoneChapter 4 Perform Date Conversions in the Mapper 4-9Convert Date from One Format to Another Format Add and Subtract Dates from the Current Date Time Convert dateTime to and from Epoch Time Convert a Date Timestamp to a UNIX Timestamp Convert a Month Number to a Month Name Convert Date from One Time Zone to Another Time Zone For example, to convert between India Standard Time (IST) and Greenwich Mean Time (GMT): IST to GMT: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:49:07.859+05:30'), xsd:dayTimeDuration('PT0H')) GMT to IST: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:00:00Z'), xsd:dayTimeDuration('PT5H30M')) Convert Date from One Format to Another Format Format DefinitionXSLT Mapping Explanation Source Format: DD- MON-YYYY 19- Nov-2021 Target Format: YYYY-MM-DD 2021-11-1 9<xsl:variable name="monthListByNum"> <months> <month id="1" value="jan"/><month id="2" value="feb"/><month id="3" value="mar"/ ><month id="4" value="apr"/> <month id="5" value="may"/><month id="6" value="jun"/><month id="7" value="jul"/ ><month id="8" value="aug"/> <month id="9" value="sep"/><month id="10" value="oct"/><month id="11" value="nov"/ ><month id="12" value="dec"/> </months> </xsl:variable> <xsl:value-of select="concat (substring- after (substring-after ( $srcDateString, '-' ), '-' ), '-', $monthListByNum/months/month[@value=fn:lower- case (substring-before (substring-after ($srcDateString, '-' ), '-' ) )]/@id, '-', substring-before ( $srcDateString, '-' ) )" xml:id="id_18"/>Use an XSLT variable to hold the MON to MM conversion.Use string manipulation to get the correct format.Chapter 4 Perform Date Conversions in the Mapper 4-10Add and Subtract Dates from the Current Date Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Add 10 days to the current date time: fn:current-dateTime() + xsd:dayTimeDuration('P10D') Add one year to the current date time: fn:current-dateTime() + xsd:yearMonthDuration('P1Y') Subtract 10 days from the current date time: fn:current-dateTime() - xsd:dayTimeDuration('P10D') Subtract one year from the current date time: fn:current-dateTime() - xsd:yearMonthDuration('P1Y') If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Convert dateTime to and from Epoch Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Convert the current dateTime to epoch time: (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert epoch time to dateTime : (xsd:dateTime('1970-01-01T00:00:00') + ( $epochTime * xsd:dayTimeDuration('PT1S'))) If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Chapter 4 Perform Date Conversions in the Mapper 4-11Convert a Date Timestamp to a UNIX Timestamp (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert a Month Number to a Month Name If you have the exact date and time, you can use the format-dateTime function.xp20:format-dateTime ((fn:current-dateTime ( ), "[MNn" ) Perform Data Manipulations in the Mapper You can perform data manipulation tasks in the mapper such as padding characters, rounding numbers, extracting values, adding CDATA content, and calculating the sum of a node.Pad Characters to a String Round a Number to the Required Digits Extract a Value for a Key-Value Pair Type of XML Add CDATA Content to an XML Element Calculate the Sum of a Node from a Group of Nodes Pad Characters to a String Left-pad zeroes to nine digits: fn:format-number (12345, '000000000') Right-pad zeroes to nine digits: concat(string(12345),substring-before(fn:format-number (12345, '000000000'), string(12345)) Round a Number to the Required Digits Round a number to two decimals: fn:format-number (12345.12345, '#.00')Chapter 4 Perform Data Manipulations in the Mapper 4-12Extract a Value for a Key-Value Pair Type of XML XML Snippet XPath Expression Explanation <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/some/ namespace"> <ns:ParameterList> <ns:Parameter> <ns:Name>ID</ns:Name> <ns:Value>1</ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>NAME</ns:Name> <ns:Value>Oracle</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>AGE</ns:Name> <ns:Value>25</ns:Value> </ns:Parameter> </ns:ParameterList> </ns:SomeElement>Extract the value of parameter name 'NAME': /ns:SomeElement/ ns:ParameterList /ns:Parameter[ns:Name='NAME']/ ns:ValueAnything within the set braces in an XPath is called a predicate.The expression finds the parameter value whose name is NAME.Chapter 4 Perform Data Manipulations in the Mapper 4-13Add CDATA Content to an XML Element XSLT Snippet Output XML Explanation Input XML: <?xml version = '1.0' encoding = 'UTF-8'?> <nstrgmpr:process> <nstrgmpr:input> <nstrgmpr:data>I SHOULD BE IN CDATA CONTENT<nstrgmpr:data> </nstrgmpr:input> </nstrgmpr:process> XSLT snippet: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http:// xmlns.oracle.com/simpleSvc/SyncSvc/ Sync" xmlns:oracle-xsl-mapper="http:// www.oracle.com/xsl/mapper/schemas" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" exclude-result-prefixes=" ora oracle-xsl-mapper oraext xsi fn xp20 xsl ignore01" xmlns:ignore01="http:// www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:xml="http://www.w3.org/XML/1998/ namespace"> <xsl:output method="xml" cdata- section-elements="nstrgmpr:result"/> <xsl:template match="/" xml:id="id_11"> <nstrgmpr:processResponse xml:id="id_12"> <nstrgmpr:result xml:id="id_16"> <xsl:value-of select="/ nstrgmpr:process/nstrgmpr:input/ nstrgmpr:data" xml:id="id_17"/> </nstrgmpr:result> </nstrgmpr:processResponse> </xsl:template> </xsl:stylesheet><nstrgmpr:proces sResponse> <nstrgmpr:result ><![CDATA[I SHOULD BE IN CDATA CONTENT]]></ nstrgmpr:result> </ nstrgmpr:process Response>You must manually add the xsl:output tag in the XSLT.The output attribute must be xml.The attribute cdata- section- elements indicates which fields have the CDATA content post- transformatio n. In case of multiple elements, the value must be separated by spaces.The data should be normally mapped to the element in which CDATA should be present.Note: This approach doesnt work for file-based operations such as stage file actions and FTP where the content is rewritten from XSLT.Chapter 4 Perform Data Manipulations in the Mapper 4-14Calculate the Sum of a Node from a Group of Nodes XML Snippet XPath Expression Explanation Input XML <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/ some/namespace/ request"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>10</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> </ ns:ParameterList> </ns:SomeElement>XSLT snippet: <nstrgdfl:ResultElement> <xsl:for-each-group select="/ ns:SomeElement/ns:ParameterList/ ns:Parameter" group-by="ns:Name"> <nstrgdfl:ParameterList> <nstrgdfl:Parameter> <nstrgdfl:Name> <xsl:value-of select="fn:current-grouping- key()"/> </nstrgdfl:Name> <nstrgdfl:SumOfValues> <xsl:value-of select="sum(fn:current-group/ ns:Value)"/> </nstrgdfl:SumOfValues> <nstrgdfl:Parameter> </nstrgdfl:ParameterList> </xsl:for-each> </nstrgdfl:ResultElement> Output XML: <ns:ResultElement30xmlns:ns="http ://xmlns.oracle.com/some/ namespace/response"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ns:Name> <ns:SumOfValues>1</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ns:Name> <ns:SumOfValues>20</ ns:Value> </ns:Parameter> </ns:ParameterList> </ns:ResultElement>The SUM function must be set on current- group.Pass Single Quotes in a Mapper Variable You can pass single quotes in a mapper variable without using an escape character. |
Convert Date from One Time Zone to Another Time ZoneChapter 4 Perform Date Conversions in the Mapper 4-9Convert Date from One Format to Another Format Add and Subtract Dates from the Current Date Time Convert dateTime to and from Epoch Time Convert a Date Timestamp to a UNIX Timestamp Convert a Month Number to a Month Name Convert Date from One Time Zone to Another Time Zone For example, to convert between India Standard Time (IST) and Greenwich Mean Time (GMT): IST to GMT: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:49:07.859+05:30'), xsd:dayTimeDuration('PT0H')) GMT to IST: fn:adjust-dateTime-to- timezone(xsd:dateTime('2021-05-20T10:00:00Z'), xsd:dayTimeDuration('PT5H30M')) Convert Date from One Format to Another Format Format DefinitionXSLT Mapping Explanation Source Format: DD- MON-YYYY 19- Nov-2021 Target Format: YYYY-MM-DD 2021-11-1 9<xsl:variable name="monthListByNum"> <months> <month id="1" value="jan"/><month id="2" value="feb"/><month id="3" value="mar"/ ><month id="4" value="apr"/> <month id="5" value="may"/><month id="6" value="jun"/><month id="7" value="jul"/ ><month id="8" value="aug"/> <month id="9" value="sep"/><month id="10" value="oct"/><month id="11" value="nov"/ ><month id="12" value="dec"/> </months> </xsl:variable> <xsl:value-of select="concat (substring- after (substring-after ( $srcDateString, '-' ), '-' ), '-', $monthListByNum/months/month[@value=fn:lower- case (substring-before (substring-after ($srcDateString, '-' ), '-' ) )]/@id, '-', substring-before ( $srcDateString, '-' ) )" xml:id="id_18"/>Use an XSLT variable to hold the MON to MM conversion.Use string manipulation to get the correct format.Chapter 4 Perform Date Conversions in the Mapper 4-10Add and Subtract Dates from the Current Date Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Add 10 days to the current date time: fn:current-dateTime() + xsd:dayTimeDuration('P10D') Add one year to the current date time: fn:current-dateTime() + xsd:yearMonthDuration('P1Y') Subtract 10 days from the current date time: fn:current-dateTime() - xsd:dayTimeDuration('P10D') Subtract one year from the current date time: fn:current-dateTime() - xsd:yearMonthDuration('P1Y') If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Convert dateTime to and from Epoch Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Convert the current dateTime to epoch time: (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert epoch time to dateTime : (xsd:dateTime('1970-01-01T00:00:00') + ( $epochTime * xsd:dayTimeDuration('PT1S'))) If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Chapter 4 Perform Date Conversions in the Mapper 4-11Convert a Date Timestamp to a UNIX Timestamp (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert a Month Number to a Month Name If you have the exact date and time, you can use the format-dateTime function.xp20:format-dateTime ((fn:current-dateTime ( ), "[MNn" ) Perform Data Manipulations in the Mapper You can perform data manipulation tasks in the mapper such as padding characters, rounding numbers, extracting values, adding CDATA content, and calculating the sum of a node.Pad Characters to a String Round a Number to the Required Digits Extract a Value for a Key-Value Pair Type of XML Add CDATA Content to an XML Element Calculate the Sum of a Node from a Group of Nodes Pad Characters to a String Left-pad zeroes to nine digits: fn:format-number (12345, '000000000') Right-pad zeroes to nine digits: concat(string(12345),substring-before(fn:format-number (12345, '000000000'), string(12345)) Round a Number to the Required Digits Round a number to two decimals: fn:format-number (12345.12345, '#.00')Chapter 4 Perform Data Manipulations in the Mapper 4-12Extract a Value for a Key-Value Pair Type of XML XML Snippet XPath Expression Explanation <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/some/ namespace"> <ns:ParameterList> <ns:Parameter> <ns:Name>ID</ns:Name> <ns:Value>1</ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>NAME</ns:Name> <ns:Value>Oracle</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>AGE</ns:Name> <ns:Value>25</ns:Value> </ns:Parameter> </ns:ParameterList> </ns:SomeElement>Extract the value of parameter name 'NAME': /ns:SomeElement/ ns:ParameterList /ns:Parameter[ns:Name='NAME']/ ns:ValueAnything within the set braces in an XPath is called a predicate.The expression finds the parameter value whose name is NAME.Chapter 4 Perform Data Manipulations in the Mapper 4-13Add CDATA Content to an XML Element XSLT Snippet Output XML Explanation Input XML: <?xml version = '1.0' encoding = 'UTF-8'?> <nstrgmpr:process> <nstrgmpr:input> <nstrgmpr:data>I SHOULD BE IN CDATA CONTENT<nstrgmpr:data> </nstrgmpr:input> </nstrgmpr:process> XSLT snippet: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http:// xmlns.oracle.com/simpleSvc/SyncSvc/ Sync" xmlns:oracle-xsl-mapper="http:// www.oracle.com/xsl/mapper/schemas" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" exclude-result-prefixes=" ora oracle-xsl-mapper oraext xsi fn xp20 xsl ignore01" xmlns:ignore01="http:// www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:xml="http://www.w3.org/XML/1998/ namespace"> <xsl:output method="xml" cdata- section-elements="nstrgmpr:result"/> <xsl:template match="/" xml:id="id_11"> <nstrgmpr:processResponse xml:id="id_12"> <nstrgmpr:result xml:id="id_16"> <xsl:value-of select="/ nstrgmpr:process/nstrgmpr:input/ nstrgmpr:data" xml:id="id_17"/> </nstrgmpr:result> </nstrgmpr:processResponse> </xsl:template> </xsl:stylesheet><nstrgmpr:proces sResponse> <nstrgmpr:result ><![CDATA[I SHOULD BE IN CDATA CONTENT]]></ nstrgmpr:result> </ nstrgmpr:process Response>You must manually add the xsl:output tag in the XSLT.The output attribute must be xml.The attribute cdata- section- elements indicates which fields have the CDATA content post- transformatio n. In case of multiple elements, the value must be separated by spaces.The data should be normally mapped to the element in which CDATA should be present.Note: This approach doesnt work for file-based operations such as stage file actions and FTP where the content is rewritten from XSLT.Chapter 4 Perform Data Manipulations in the Mapper 4-14Calculate the Sum of a Node from a Group of Nodes XML Snippet XPath Expression Explanation Input XML <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/ some/namespace/ request"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>10</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> </ ns:ParameterList> </ns:SomeElement>XSLT snippet: <nstrgdfl:ResultElement> <xsl:for-each-group select="/ ns:SomeElement/ns:ParameterList/ ns:Parameter" group-by="ns:Name"> <nstrgdfl:ParameterList> <nstrgdfl:Parameter> <nstrgdfl:Name> <xsl:value-of select="fn:current-grouping- key()"/> </nstrgdfl:Name> <nstrgdfl:SumOfValues> <xsl:value-of select="sum(fn:current-group/ ns:Value)"/> </nstrgdfl:SumOfValues> <nstrgdfl:Parameter> </nstrgdfl:ParameterList> </xsl:for-each> </nstrgdfl:ResultElement> Output XML: <ns:ResultElement30xmlns:ns="http ://xmlns.oracle.com/some/ namespace/response"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ns:Name> <ns:SumOfValues>1</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ns:Name> <ns:SumOfValues>20</ ns:Value> </ns:Parameter> </ns:ParameterList> </ns:ResultElement>The SUM function must be set on current- group.Pass Single Quotes in a Mapper Variable You can pass single quotes in a mapper variable without using an escape character.Consider the following example. |
Use string manipulation to get the correct format.Chapter 4 Perform Date Conversions in the Mapper 4-10Add and Subtract Dates from the Current Date Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Add 10 days to the current date time: fn:current-dateTime() + xsd:dayTimeDuration('P10D') Add one year to the current date time: fn:current-dateTime() + xsd:yearMonthDuration('P1Y') Subtract 10 days from the current date time: fn:current-dateTime() - xsd:dayTimeDuration('P10D') Subtract one year from the current date time: fn:current-dateTime() - xsd:yearMonthDuration('P1Y') If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Convert dateTime to and from Epoch Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Convert the current dateTime to epoch time: (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert epoch time to dateTime : (xsd:dateTime('1970-01-01T00:00:00') + ( $epochTime * xsd:dayTimeDuration('PT1S'))) If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Chapter 4 Perform Date Conversions in the Mapper 4-11Convert a Date Timestamp to a UNIX Timestamp (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert a Month Number to a Month Name If you have the exact date and time, you can use the format-dateTime function.xp20:format-dateTime ((fn:current-dateTime ( ), "[MNn" ) Perform Data Manipulations in the Mapper You can perform data manipulation tasks in the mapper such as padding characters, rounding numbers, extracting values, adding CDATA content, and calculating the sum of a node.Pad Characters to a String Round a Number to the Required Digits Extract a Value for a Key-Value Pair Type of XML Add CDATA Content to an XML Element Calculate the Sum of a Node from a Group of Nodes Pad Characters to a String Left-pad zeroes to nine digits: fn:format-number (12345, '000000000') Right-pad zeroes to nine digits: concat(string(12345),substring-before(fn:format-number (12345, '000000000'), string(12345)) Round a Number to the Required Digits Round a number to two decimals: fn:format-number (12345.12345, '#.00')Chapter 4 Perform Data Manipulations in the Mapper 4-12Extract a Value for a Key-Value Pair Type of XML XML Snippet XPath Expression Explanation <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/some/ namespace"> <ns:ParameterList> <ns:Parameter> <ns:Name>ID</ns:Name> <ns:Value>1</ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>NAME</ns:Name> <ns:Value>Oracle</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>AGE</ns:Name> <ns:Value>25</ns:Value> </ns:Parameter> </ns:ParameterList> </ns:SomeElement>Extract the value of parameter name 'NAME': /ns:SomeElement/ ns:ParameterList /ns:Parameter[ns:Name='NAME']/ ns:ValueAnything within the set braces in an XPath is called a predicate.The expression finds the parameter value whose name is NAME.Chapter 4 Perform Data Manipulations in the Mapper 4-13Add CDATA Content to an XML Element XSLT Snippet Output XML Explanation Input XML: <?xml version = '1.0' encoding = 'UTF-8'?> <nstrgmpr:process> <nstrgmpr:input> <nstrgmpr:data>I SHOULD BE IN CDATA CONTENT<nstrgmpr:data> </nstrgmpr:input> </nstrgmpr:process> XSLT snippet: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http:// xmlns.oracle.com/simpleSvc/SyncSvc/ Sync" xmlns:oracle-xsl-mapper="http:// www.oracle.com/xsl/mapper/schemas" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" exclude-result-prefixes=" ora oracle-xsl-mapper oraext xsi fn xp20 xsl ignore01" xmlns:ignore01="http:// www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:xml="http://www.w3.org/XML/1998/ namespace"> <xsl:output method="xml" cdata- section-elements="nstrgmpr:result"/> <xsl:template match="/" xml:id="id_11"> <nstrgmpr:processResponse xml:id="id_12"> <nstrgmpr:result xml:id="id_16"> <xsl:value-of select="/ nstrgmpr:process/nstrgmpr:input/ nstrgmpr:data" xml:id="id_17"/> </nstrgmpr:result> </nstrgmpr:processResponse> </xsl:template> </xsl:stylesheet><nstrgmpr:proces sResponse> <nstrgmpr:result ><![CDATA[I SHOULD BE IN CDATA CONTENT]]></ nstrgmpr:result> </ nstrgmpr:process Response>You must manually add the xsl:output tag in the XSLT.The output attribute must be xml.The attribute cdata- section- elements indicates which fields have the CDATA content post- transformatio n. In case of multiple elements, the value must be separated by spaces.The data should be normally mapped to the element in which CDATA should be present.Note: This approach doesnt work for file-based operations such as stage file actions and FTP where the content is rewritten from XSLT.Chapter 4 Perform Data Manipulations in the Mapper 4-14Calculate the Sum of a Node from a Group of Nodes XML Snippet XPath Expression Explanation Input XML <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/ some/namespace/ request"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>10</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> </ ns:ParameterList> </ns:SomeElement>XSLT snippet: <nstrgdfl:ResultElement> <xsl:for-each-group select="/ ns:SomeElement/ns:ParameterList/ ns:Parameter" group-by="ns:Name"> <nstrgdfl:ParameterList> <nstrgdfl:Parameter> <nstrgdfl:Name> <xsl:value-of select="fn:current-grouping- key()"/> </nstrgdfl:Name> <nstrgdfl:SumOfValues> <xsl:value-of select="sum(fn:current-group/ ns:Value)"/> </nstrgdfl:SumOfValues> <nstrgdfl:Parameter> </nstrgdfl:ParameterList> </xsl:for-each> </nstrgdfl:ResultElement> Output XML: <ns:ResultElement30xmlns:ns="http ://xmlns.oracle.com/some/ namespace/response"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ns:Name> <ns:SumOfValues>1</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ns:Name> <ns:SumOfValues>20</ ns:Value> </ns:Parameter> </ns:ParameterList> </ns:ResultElement>The SUM function must be set on current- group.Pass Single Quotes in a Mapper Variable You can pass single quotes in a mapper variable without using an escape character.Consider the following example.The Expression Builder shows the following value. |
If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Convert dateTime to and from Epoch Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Convert the current dateTime to epoch time: (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert epoch time to dateTime : (xsd:dateTime('1970-01-01T00:00:00') + ( $epochTime * xsd:dayTimeDuration('PT1S'))) If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Chapter 4 Perform Date Conversions in the Mapper 4-11Convert a Date Timestamp to a UNIX Timestamp (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert a Month Number to a Month Name If you have the exact date and time, you can use the format-dateTime function.xp20:format-dateTime ((fn:current-dateTime ( ), "[MNn" ) Perform Data Manipulations in the Mapper You can perform data manipulation tasks in the mapper such as padding characters, rounding numbers, extracting values, adding CDATA content, and calculating the sum of a node.Pad Characters to a String Round a Number to the Required Digits Extract a Value for a Key-Value Pair Type of XML Add CDATA Content to an XML Element Calculate the Sum of a Node from a Group of Nodes Pad Characters to a String Left-pad zeroes to nine digits: fn:format-number (12345, '000000000') Right-pad zeroes to nine digits: concat(string(12345),substring-before(fn:format-number (12345, '000000000'), string(12345)) Round a Number to the Required Digits Round a number to two decimals: fn:format-number (12345.12345, '#.00')Chapter 4 Perform Data Manipulations in the Mapper 4-12Extract a Value for a Key-Value Pair Type of XML XML Snippet XPath Expression Explanation <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/some/ namespace"> <ns:ParameterList> <ns:Parameter> <ns:Name>ID</ns:Name> <ns:Value>1</ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>NAME</ns:Name> <ns:Value>Oracle</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>AGE</ns:Name> <ns:Value>25</ns:Value> </ns:Parameter> </ns:ParameterList> </ns:SomeElement>Extract the value of parameter name 'NAME': /ns:SomeElement/ ns:ParameterList /ns:Parameter[ns:Name='NAME']/ ns:ValueAnything within the set braces in an XPath is called a predicate.The expression finds the parameter value whose name is NAME.Chapter 4 Perform Data Manipulations in the Mapper 4-13Add CDATA Content to an XML Element XSLT Snippet Output XML Explanation Input XML: <?xml version = '1.0' encoding = 'UTF-8'?> <nstrgmpr:process> <nstrgmpr:input> <nstrgmpr:data>I SHOULD BE IN CDATA CONTENT<nstrgmpr:data> </nstrgmpr:input> </nstrgmpr:process> XSLT snippet: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http:// xmlns.oracle.com/simpleSvc/SyncSvc/ Sync" xmlns:oracle-xsl-mapper="http:// www.oracle.com/xsl/mapper/schemas" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" exclude-result-prefixes=" ora oracle-xsl-mapper oraext xsi fn xp20 xsl ignore01" xmlns:ignore01="http:// www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:xml="http://www.w3.org/XML/1998/ namespace"> <xsl:output method="xml" cdata- section-elements="nstrgmpr:result"/> <xsl:template match="/" xml:id="id_11"> <nstrgmpr:processResponse xml:id="id_12"> <nstrgmpr:result xml:id="id_16"> <xsl:value-of select="/ nstrgmpr:process/nstrgmpr:input/ nstrgmpr:data" xml:id="id_17"/> </nstrgmpr:result> </nstrgmpr:processResponse> </xsl:template> </xsl:stylesheet><nstrgmpr:proces sResponse> <nstrgmpr:result ><![CDATA[I SHOULD BE IN CDATA CONTENT]]></ nstrgmpr:result> </ nstrgmpr:process Response>You must manually add the xsl:output tag in the XSLT.The output attribute must be xml.The attribute cdata- section- elements indicates which fields have the CDATA content post- transformatio n. In case of multiple elements, the value must be separated by spaces.The data should be normally mapped to the element in which CDATA should be present.Note: This approach doesnt work for file-based operations such as stage file actions and FTP where the content is rewritten from XSLT.Chapter 4 Perform Data Manipulations in the Mapper 4-14Calculate the Sum of a Node from a Group of Nodes XML Snippet XPath Expression Explanation Input XML <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/ some/namespace/ request"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>10</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> </ ns:ParameterList> </ns:SomeElement>XSLT snippet: <nstrgdfl:ResultElement> <xsl:for-each-group select="/ ns:SomeElement/ns:ParameterList/ ns:Parameter" group-by="ns:Name"> <nstrgdfl:ParameterList> <nstrgdfl:Parameter> <nstrgdfl:Name> <xsl:value-of select="fn:current-grouping- key()"/> </nstrgdfl:Name> <nstrgdfl:SumOfValues> <xsl:value-of select="sum(fn:current-group/ ns:Value)"/> </nstrgdfl:SumOfValues> <nstrgdfl:Parameter> </nstrgdfl:ParameterList> </xsl:for-each> </nstrgdfl:ResultElement> Output XML: <ns:ResultElement30xmlns:ns="http ://xmlns.oracle.com/some/ namespace/response"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ns:Name> <ns:SumOfValues>1</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ns:Name> <ns:SumOfValues>20</ ns:Value> </ns:Parameter> </ns:ParameterList> </ns:ResultElement>The SUM function must be set on current- group.Pass Single Quotes in a Mapper Variable You can pass single quotes in a mapper variable without using an escape character.Consider the following example.The Expression Builder shows the following value.Chapter 4 Pass Single Quotes in a Mapper Variable 4-15 Use an XSL variable to denote single quotes. |
Convert dateTime to and from Epoch Time If the data is in xsd:dateTime or IS0-8601 or (YYYY-MM-DDTHH:MM:SS+TZ) format: Convert the current dateTime to epoch time: (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert epoch time to dateTime : (xsd:dateTime('1970-01-01T00:00:00') + ( $epochTime * xsd:dayTimeDuration('PT1S'))) If the data is in xsd:date or YYYY-MM-DD format: Convert the data to xsd:dateTime format using xsd:dateTime(concat( $inputDate,'T00:00:00')) .If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Chapter 4 Perform Date Conversions in the Mapper 4-11Convert a Date Timestamp to a UNIX Timestamp (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert a Month Number to a Month Name If you have the exact date and time, you can use the format-dateTime function.xp20:format-dateTime ((fn:current-dateTime ( ), "[MNn" ) Perform Data Manipulations in the Mapper You can perform data manipulation tasks in the mapper such as padding characters, rounding numbers, extracting values, adding CDATA content, and calculating the sum of a node.Pad Characters to a String Round a Number to the Required Digits Extract a Value for a Key-Value Pair Type of XML Add CDATA Content to an XML Element Calculate the Sum of a Node from a Group of Nodes Pad Characters to a String Left-pad zeroes to nine digits: fn:format-number (12345, '000000000') Right-pad zeroes to nine digits: concat(string(12345),substring-before(fn:format-number (12345, '000000000'), string(12345)) Round a Number to the Required Digits Round a number to two decimals: fn:format-number (12345.12345, '#.00')Chapter 4 Perform Data Manipulations in the Mapper 4-12Extract a Value for a Key-Value Pair Type of XML XML Snippet XPath Expression Explanation <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/some/ namespace"> <ns:ParameterList> <ns:Parameter> <ns:Name>ID</ns:Name> <ns:Value>1</ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>NAME</ns:Name> <ns:Value>Oracle</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>AGE</ns:Name> <ns:Value>25</ns:Value> </ns:Parameter> </ns:ParameterList> </ns:SomeElement>Extract the value of parameter name 'NAME': /ns:SomeElement/ ns:ParameterList /ns:Parameter[ns:Name='NAME']/ ns:ValueAnything within the set braces in an XPath is called a predicate.The expression finds the parameter value whose name is NAME.Chapter 4 Perform Data Manipulations in the Mapper 4-13Add CDATA Content to an XML Element XSLT Snippet Output XML Explanation Input XML: <?xml version = '1.0' encoding = 'UTF-8'?> <nstrgmpr:process> <nstrgmpr:input> <nstrgmpr:data>I SHOULD BE IN CDATA CONTENT<nstrgmpr:data> </nstrgmpr:input> </nstrgmpr:process> XSLT snippet: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http:// xmlns.oracle.com/simpleSvc/SyncSvc/ Sync" xmlns:oracle-xsl-mapper="http:// www.oracle.com/xsl/mapper/schemas" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" exclude-result-prefixes=" ora oracle-xsl-mapper oraext xsi fn xp20 xsl ignore01" xmlns:ignore01="http:// www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:xml="http://www.w3.org/XML/1998/ namespace"> <xsl:output method="xml" cdata- section-elements="nstrgmpr:result"/> <xsl:template match="/" xml:id="id_11"> <nstrgmpr:processResponse xml:id="id_12"> <nstrgmpr:result xml:id="id_16"> <xsl:value-of select="/ nstrgmpr:process/nstrgmpr:input/ nstrgmpr:data" xml:id="id_17"/> </nstrgmpr:result> </nstrgmpr:processResponse> </xsl:template> </xsl:stylesheet><nstrgmpr:proces sResponse> <nstrgmpr:result ><![CDATA[I SHOULD BE IN CDATA CONTENT]]></ nstrgmpr:result> </ nstrgmpr:process Response>You must manually add the xsl:output tag in the XSLT.The output attribute must be xml.The attribute cdata- section- elements indicates which fields have the CDATA content post- transformatio n. In case of multiple elements, the value must be separated by spaces.The data should be normally mapped to the element in which CDATA should be present.Note: This approach doesnt work for file-based operations such as stage file actions and FTP where the content is rewritten from XSLT.Chapter 4 Perform Data Manipulations in the Mapper 4-14Calculate the Sum of a Node from a Group of Nodes XML Snippet XPath Expression Explanation Input XML <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/ some/namespace/ request"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>10</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> </ ns:ParameterList> </ns:SomeElement>XSLT snippet: <nstrgdfl:ResultElement> <xsl:for-each-group select="/ ns:SomeElement/ns:ParameterList/ ns:Parameter" group-by="ns:Name"> <nstrgdfl:ParameterList> <nstrgdfl:Parameter> <nstrgdfl:Name> <xsl:value-of select="fn:current-grouping- key()"/> </nstrgdfl:Name> <nstrgdfl:SumOfValues> <xsl:value-of select="sum(fn:current-group/ ns:Value)"/> </nstrgdfl:SumOfValues> <nstrgdfl:Parameter> </nstrgdfl:ParameterList> </xsl:for-each> </nstrgdfl:ResultElement> Output XML: <ns:ResultElement30xmlns:ns="http ://xmlns.oracle.com/some/ namespace/response"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ns:Name> <ns:SumOfValues>1</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ns:Name> <ns:SumOfValues>20</ ns:Value> </ns:Parameter> </ns:ParameterList> </ns:ResultElement>The SUM function must be set on current- group.Pass Single Quotes in a Mapper Variable You can pass single quotes in a mapper variable without using an escape character.Consider the following example.The Expression Builder shows the following value.Chapter 4 Pass Single Quotes in a Mapper Variable 4-15 Use an XSL variable to denote single quotes.You can also use an assign action variable. |
If the data is in any other format: Convert the data to xsd:dateTime format using the xp20:format-dateTime() function or string functions such as concat() , substring-before() , or substring- after() .Chapter 4 Perform Date Conversions in the Mapper 4-11Convert a Date Timestamp to a UNIX Timestamp (fn:current-dateTime() - xsd:dateTime('1970-01-01T00:00:00')) div xsd:dayTimeDuration('PT1S') Convert a Month Number to a Month Name If you have the exact date and time, you can use the format-dateTime function.xp20:format-dateTime ((fn:current-dateTime ( ), "[MNn" ) Perform Data Manipulations in the Mapper You can perform data manipulation tasks in the mapper such as padding characters, rounding numbers, extracting values, adding CDATA content, and calculating the sum of a node.Pad Characters to a String Round a Number to the Required Digits Extract a Value for a Key-Value Pair Type of XML Add CDATA Content to an XML Element Calculate the Sum of a Node from a Group of Nodes Pad Characters to a String Left-pad zeroes to nine digits: fn:format-number (12345, '000000000') Right-pad zeroes to nine digits: concat(string(12345),substring-before(fn:format-number (12345, '000000000'), string(12345)) Round a Number to the Required Digits Round a number to two decimals: fn:format-number (12345.12345, '#.00')Chapter 4 Perform Data Manipulations in the Mapper 4-12Extract a Value for a Key-Value Pair Type of XML XML Snippet XPath Expression Explanation <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/some/ namespace"> <ns:ParameterList> <ns:Parameter> <ns:Name>ID</ns:Name> <ns:Value>1</ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>NAME</ns:Name> <ns:Value>Oracle</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>AGE</ns:Name> <ns:Value>25</ns:Value> </ns:Parameter> </ns:ParameterList> </ns:SomeElement>Extract the value of parameter name 'NAME': /ns:SomeElement/ ns:ParameterList /ns:Parameter[ns:Name='NAME']/ ns:ValueAnything within the set braces in an XPath is called a predicate.The expression finds the parameter value whose name is NAME.Chapter 4 Perform Data Manipulations in the Mapper 4-13Add CDATA Content to an XML Element XSLT Snippet Output XML Explanation Input XML: <?xml version = '1.0' encoding = 'UTF-8'?> <nstrgmpr:process> <nstrgmpr:input> <nstrgmpr:data>I SHOULD BE IN CDATA CONTENT<nstrgmpr:data> </nstrgmpr:input> </nstrgmpr:process> XSLT snippet: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http:// xmlns.oracle.com/simpleSvc/SyncSvc/ Sync" xmlns:oracle-xsl-mapper="http:// www.oracle.com/xsl/mapper/schemas" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" exclude-result-prefixes=" ora oracle-xsl-mapper oraext xsi fn xp20 xsl ignore01" xmlns:ignore01="http:// www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:xml="http://www.w3.org/XML/1998/ namespace"> <xsl:output method="xml" cdata- section-elements="nstrgmpr:result"/> <xsl:template match="/" xml:id="id_11"> <nstrgmpr:processResponse xml:id="id_12"> <nstrgmpr:result xml:id="id_16"> <xsl:value-of select="/ nstrgmpr:process/nstrgmpr:input/ nstrgmpr:data" xml:id="id_17"/> </nstrgmpr:result> </nstrgmpr:processResponse> </xsl:template> </xsl:stylesheet><nstrgmpr:proces sResponse> <nstrgmpr:result ><![CDATA[I SHOULD BE IN CDATA CONTENT]]></ nstrgmpr:result> </ nstrgmpr:process Response>You must manually add the xsl:output tag in the XSLT.The output attribute must be xml.The attribute cdata- section- elements indicates which fields have the CDATA content post- transformatio n. In case of multiple elements, the value must be separated by spaces.The data should be normally mapped to the element in which CDATA should be present.Note: This approach doesnt work for file-based operations such as stage file actions and FTP where the content is rewritten from XSLT.Chapter 4 Perform Data Manipulations in the Mapper 4-14Calculate the Sum of a Node from a Group of Nodes XML Snippet XPath Expression Explanation Input XML <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/ some/namespace/ request"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>10</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> </ ns:ParameterList> </ns:SomeElement>XSLT snippet: <nstrgdfl:ResultElement> <xsl:for-each-group select="/ ns:SomeElement/ns:ParameterList/ ns:Parameter" group-by="ns:Name"> <nstrgdfl:ParameterList> <nstrgdfl:Parameter> <nstrgdfl:Name> <xsl:value-of select="fn:current-grouping- key()"/> </nstrgdfl:Name> <nstrgdfl:SumOfValues> <xsl:value-of select="sum(fn:current-group/ ns:Value)"/> </nstrgdfl:SumOfValues> <nstrgdfl:Parameter> </nstrgdfl:ParameterList> </xsl:for-each> </nstrgdfl:ResultElement> Output XML: <ns:ResultElement30xmlns:ns="http ://xmlns.oracle.com/some/ namespace/response"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ns:Name> <ns:SumOfValues>1</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ns:Name> <ns:SumOfValues>20</ ns:Value> </ns:Parameter> </ns:ParameterList> </ns:ResultElement>The SUM function must be set on current- group.Pass Single Quotes in a Mapper Variable You can pass single quotes in a mapper variable without using an escape character.Consider the following example.The Expression Builder shows the following value.Chapter 4 Pass Single Quotes in a Mapper Variable 4-15 Use an XSL variable to denote single quotes.You can also use an assign action variable.<xsl:variable name="quote" value="'"/>; Use a concat function to append the quotes to the actual value. |
xp20:format-dateTime ((fn:current-dateTime ( ), "[MNn" ) Perform Data Manipulations in the Mapper You can perform data manipulation tasks in the mapper such as padding characters, rounding numbers, extracting values, adding CDATA content, and calculating the sum of a node.Pad Characters to a String Round a Number to the Required Digits Extract a Value for a Key-Value Pair Type of XML Add CDATA Content to an XML Element Calculate the Sum of a Node from a Group of Nodes Pad Characters to a String Left-pad zeroes to nine digits: fn:format-number (12345, '000000000') Right-pad zeroes to nine digits: concat(string(12345),substring-before(fn:format-number (12345, '000000000'), string(12345)) Round a Number to the Required Digits Round a number to two decimals: fn:format-number (12345.12345, '#.00')Chapter 4 Perform Data Manipulations in the Mapper 4-12Extract a Value for a Key-Value Pair Type of XML XML Snippet XPath Expression Explanation <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/some/ namespace"> <ns:ParameterList> <ns:Parameter> <ns:Name>ID</ns:Name> <ns:Value>1</ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>NAME</ns:Name> <ns:Value>Oracle</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>AGE</ns:Name> <ns:Value>25</ns:Value> </ns:Parameter> </ns:ParameterList> </ns:SomeElement>Extract the value of parameter name 'NAME': /ns:SomeElement/ ns:ParameterList /ns:Parameter[ns:Name='NAME']/ ns:ValueAnything within the set braces in an XPath is called a predicate.The expression finds the parameter value whose name is NAME.Chapter 4 Perform Data Manipulations in the Mapper 4-13Add CDATA Content to an XML Element XSLT Snippet Output XML Explanation Input XML: <?xml version = '1.0' encoding = 'UTF-8'?> <nstrgmpr:process> <nstrgmpr:input> <nstrgmpr:data>I SHOULD BE IN CDATA CONTENT<nstrgmpr:data> </nstrgmpr:input> </nstrgmpr:process> XSLT snippet: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http:// xmlns.oracle.com/simpleSvc/SyncSvc/ Sync" xmlns:oracle-xsl-mapper="http:// www.oracle.com/xsl/mapper/schemas" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" exclude-result-prefixes=" ora oracle-xsl-mapper oraext xsi fn xp20 xsl ignore01" xmlns:ignore01="http:// www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:xml="http://www.w3.org/XML/1998/ namespace"> <xsl:output method="xml" cdata- section-elements="nstrgmpr:result"/> <xsl:template match="/" xml:id="id_11"> <nstrgmpr:processResponse xml:id="id_12"> <nstrgmpr:result xml:id="id_16"> <xsl:value-of select="/ nstrgmpr:process/nstrgmpr:input/ nstrgmpr:data" xml:id="id_17"/> </nstrgmpr:result> </nstrgmpr:processResponse> </xsl:template> </xsl:stylesheet><nstrgmpr:proces sResponse> <nstrgmpr:result ><![CDATA[I SHOULD BE IN CDATA CONTENT]]></ nstrgmpr:result> </ nstrgmpr:process Response>You must manually add the xsl:output tag in the XSLT.The output attribute must be xml.The attribute cdata- section- elements indicates which fields have the CDATA content post- transformatio n. In case of multiple elements, the value must be separated by spaces.The data should be normally mapped to the element in which CDATA should be present.Note: This approach doesnt work for file-based operations such as stage file actions and FTP where the content is rewritten from XSLT.Chapter 4 Perform Data Manipulations in the Mapper 4-14Calculate the Sum of a Node from a Group of Nodes XML Snippet XPath Expression Explanation Input XML <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/ some/namespace/ request"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>10</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> </ ns:ParameterList> </ns:SomeElement>XSLT snippet: <nstrgdfl:ResultElement> <xsl:for-each-group select="/ ns:SomeElement/ns:ParameterList/ ns:Parameter" group-by="ns:Name"> <nstrgdfl:ParameterList> <nstrgdfl:Parameter> <nstrgdfl:Name> <xsl:value-of select="fn:current-grouping- key()"/> </nstrgdfl:Name> <nstrgdfl:SumOfValues> <xsl:value-of select="sum(fn:current-group/ ns:Value)"/> </nstrgdfl:SumOfValues> <nstrgdfl:Parameter> </nstrgdfl:ParameterList> </xsl:for-each> </nstrgdfl:ResultElement> Output XML: <ns:ResultElement30xmlns:ns="http ://xmlns.oracle.com/some/ namespace/response"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ns:Name> <ns:SumOfValues>1</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ns:Name> <ns:SumOfValues>20</ ns:Value> </ns:Parameter> </ns:ParameterList> </ns:ResultElement>The SUM function must be set on current- group.Pass Single Quotes in a Mapper Variable You can pass single quotes in a mapper variable without using an escape character.Consider the following example.The Expression Builder shows the following value.Chapter 4 Pass Single Quotes in a Mapper Variable 4-15 Use an XSL variable to denote single quotes.You can also use an assign action variable.<xsl:variable name="quote" value="'"/>; Use a concat function to append the quotes to the actual value.<xsl:value-of select="concat( $quote, $value, $quote)"/> Note that the output on the test page and the Track Instances page shows the following. |
Pad Characters to a String Round a Number to the Required Digits Extract a Value for a Key-Value Pair Type of XML Add CDATA Content to an XML Element Calculate the Sum of a Node from a Group of Nodes Pad Characters to a String Left-pad zeroes to nine digits: fn:format-number (12345, '000000000') Right-pad zeroes to nine digits: concat(string(12345),substring-before(fn:format-number (12345, '000000000'), string(12345)) Round a Number to the Required Digits Round a number to two decimals: fn:format-number (12345.12345, '#.00')Chapter 4 Perform Data Manipulations in the Mapper 4-12Extract a Value for a Key-Value Pair Type of XML XML Snippet XPath Expression Explanation <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/some/ namespace"> <ns:ParameterList> <ns:Parameter> <ns:Name>ID</ns:Name> <ns:Value>1</ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>NAME</ns:Name> <ns:Value>Oracle</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>AGE</ns:Name> <ns:Value>25</ns:Value> </ns:Parameter> </ns:ParameterList> </ns:SomeElement>Extract the value of parameter name 'NAME': /ns:SomeElement/ ns:ParameterList /ns:Parameter[ns:Name='NAME']/ ns:ValueAnything within the set braces in an XPath is called a predicate.The expression finds the parameter value whose name is NAME.Chapter 4 Perform Data Manipulations in the Mapper 4-13Add CDATA Content to an XML Element XSLT Snippet Output XML Explanation Input XML: <?xml version = '1.0' encoding = 'UTF-8'?> <nstrgmpr:process> <nstrgmpr:input> <nstrgmpr:data>I SHOULD BE IN CDATA CONTENT<nstrgmpr:data> </nstrgmpr:input> </nstrgmpr:process> XSLT snippet: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http:// xmlns.oracle.com/simpleSvc/SyncSvc/ Sync" xmlns:oracle-xsl-mapper="http:// www.oracle.com/xsl/mapper/schemas" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" exclude-result-prefixes=" ora oracle-xsl-mapper oraext xsi fn xp20 xsl ignore01" xmlns:ignore01="http:// www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:xml="http://www.w3.org/XML/1998/ namespace"> <xsl:output method="xml" cdata- section-elements="nstrgmpr:result"/> <xsl:template match="/" xml:id="id_11"> <nstrgmpr:processResponse xml:id="id_12"> <nstrgmpr:result xml:id="id_16"> <xsl:value-of select="/ nstrgmpr:process/nstrgmpr:input/ nstrgmpr:data" xml:id="id_17"/> </nstrgmpr:result> </nstrgmpr:processResponse> </xsl:template> </xsl:stylesheet><nstrgmpr:proces sResponse> <nstrgmpr:result ><![CDATA[I SHOULD BE IN CDATA CONTENT]]></ nstrgmpr:result> </ nstrgmpr:process Response>You must manually add the xsl:output tag in the XSLT.The output attribute must be xml.The attribute cdata- section- elements indicates which fields have the CDATA content post- transformatio n. In case of multiple elements, the value must be separated by spaces.The data should be normally mapped to the element in which CDATA should be present.Note: This approach doesnt work for file-based operations such as stage file actions and FTP where the content is rewritten from XSLT.Chapter 4 Perform Data Manipulations in the Mapper 4-14Calculate the Sum of a Node from a Group of Nodes XML Snippet XPath Expression Explanation Input XML <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/ some/namespace/ request"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>10</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> </ ns:ParameterList> </ns:SomeElement>XSLT snippet: <nstrgdfl:ResultElement> <xsl:for-each-group select="/ ns:SomeElement/ns:ParameterList/ ns:Parameter" group-by="ns:Name"> <nstrgdfl:ParameterList> <nstrgdfl:Parameter> <nstrgdfl:Name> <xsl:value-of select="fn:current-grouping- key()"/> </nstrgdfl:Name> <nstrgdfl:SumOfValues> <xsl:value-of select="sum(fn:current-group/ ns:Value)"/> </nstrgdfl:SumOfValues> <nstrgdfl:Parameter> </nstrgdfl:ParameterList> </xsl:for-each> </nstrgdfl:ResultElement> Output XML: <ns:ResultElement30xmlns:ns="http ://xmlns.oracle.com/some/ namespace/response"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ns:Name> <ns:SumOfValues>1</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ns:Name> <ns:SumOfValues>20</ ns:Value> </ns:Parameter> </ns:ParameterList> </ns:ResultElement>The SUM function must be set on current- group.Pass Single Quotes in a Mapper Variable You can pass single quotes in a mapper variable without using an escape character.Consider the following example.The Expression Builder shows the following value.Chapter 4 Pass Single Quotes in a Mapper Variable 4-15 Use an XSL variable to denote single quotes.You can also use an assign action variable.<xsl:variable name="quote" value="'"/>; Use a concat function to append the quotes to the actual value.<xsl:value-of select="concat( $quote, $value, $quote)"/> Note that the output on the test page and the Track Instances page shows the following.apos;ACTIVATED&apos This is a display issue only and can be ignored. |
The expression finds the parameter value whose name is NAME.Chapter 4 Perform Data Manipulations in the Mapper 4-13Add CDATA Content to an XML Element XSLT Snippet Output XML Explanation Input XML: <?xml version = '1.0' encoding = 'UTF-8'?> <nstrgmpr:process> <nstrgmpr:input> <nstrgmpr:data>I SHOULD BE IN CDATA CONTENT<nstrgmpr:data> </nstrgmpr:input> </nstrgmpr:process> XSLT snippet: <?xml version = '1.0' encoding = 'UTF-8'?> <xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http:// xmlns.oracle.com/simpleSvc/SyncSvc/ Sync" xmlns:oracle-xsl-mapper="http:// www.oracle.com/xsl/mapper/schemas" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" exclude-result-prefixes=" ora oracle-xsl-mapper oraext xsi fn xp20 xsl ignore01" xmlns:ignore01="http:// www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:xml="http://www.w3.org/XML/1998/ namespace"> <xsl:output method="xml" cdata- section-elements="nstrgmpr:result"/> <xsl:template match="/" xml:id="id_11"> <nstrgmpr:processResponse xml:id="id_12"> <nstrgmpr:result xml:id="id_16"> <xsl:value-of select="/ nstrgmpr:process/nstrgmpr:input/ nstrgmpr:data" xml:id="id_17"/> </nstrgmpr:result> </nstrgmpr:processResponse> </xsl:template> </xsl:stylesheet><nstrgmpr:proces sResponse> <nstrgmpr:result ><![CDATA[I SHOULD BE IN CDATA CONTENT]]></ nstrgmpr:result> </ nstrgmpr:process Response>You must manually add the xsl:output tag in the XSLT.The output attribute must be xml.The attribute cdata- section- elements indicates which fields have the CDATA content post- transformatio n. In case of multiple elements, the value must be separated by spaces.The data should be normally mapped to the element in which CDATA should be present.Note: This approach doesnt work for file-based operations such as stage file actions and FTP where the content is rewritten from XSLT.Chapter 4 Perform Data Manipulations in the Mapper 4-14Calculate the Sum of a Node from a Group of Nodes XML Snippet XPath Expression Explanation Input XML <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/ some/namespace/ request"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>10</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> </ ns:ParameterList> </ns:SomeElement>XSLT snippet: <nstrgdfl:ResultElement> <xsl:for-each-group select="/ ns:SomeElement/ns:ParameterList/ ns:Parameter" group-by="ns:Name"> <nstrgdfl:ParameterList> <nstrgdfl:Parameter> <nstrgdfl:Name> <xsl:value-of select="fn:current-grouping- key()"/> </nstrgdfl:Name> <nstrgdfl:SumOfValues> <xsl:value-of select="sum(fn:current-group/ ns:Value)"/> </nstrgdfl:SumOfValues> <nstrgdfl:Parameter> </nstrgdfl:ParameterList> </xsl:for-each> </nstrgdfl:ResultElement> Output XML: <ns:ResultElement30xmlns:ns="http ://xmlns.oracle.com/some/ namespace/response"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ns:Name> <ns:SumOfValues>1</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ns:Name> <ns:SumOfValues>20</ ns:Value> </ns:Parameter> </ns:ParameterList> </ns:ResultElement>The SUM function must be set on current- group.Pass Single Quotes in a Mapper Variable You can pass single quotes in a mapper variable without using an escape character.Consider the following example.The Expression Builder shows the following value.Chapter 4 Pass Single Quotes in a Mapper Variable 4-15 Use an XSL variable to denote single quotes.You can also use an assign action variable.<xsl:variable name="quote" value="'"/>; Use a concat function to append the quotes to the actual value.<xsl:value-of select="concat( $quote, $value, $quote)"/> Note that the output on the test page and the Track Instances page shows the following.apos;ACTIVATED&apos This is a display issue only and can be ignored.The value is successfully passed.Chapter 4 Pass Single Quotes in a Mapper Variable 4-165 Troubleshoot the Mapper Review the following topics to learn about troubleshooting issues with the mapper. |
[CDATA[I SHOULD BE IN CDATA CONTENT]]></ nstrgmpr:result> </ nstrgmpr:process Response>You must manually add the xsl:output tag in the XSLT.The output attribute must be xml.The attribute cdata- section- elements indicates which fields have the CDATA content post- transformatio n. In case of multiple elements, the value must be separated by spaces.The data should be normally mapped to the element in which CDATA should be present.Note: This approach doesnt work for file-based operations such as stage file actions and FTP where the content is rewritten from XSLT.Chapter 4 Perform Data Manipulations in the Mapper 4-14Calculate the Sum of a Node from a Group of Nodes XML Snippet XPath Expression Explanation Input XML <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/ some/namespace/ request"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>10</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> </ ns:ParameterList> </ns:SomeElement>XSLT snippet: <nstrgdfl:ResultElement> <xsl:for-each-group select="/ ns:SomeElement/ns:ParameterList/ ns:Parameter" group-by="ns:Name"> <nstrgdfl:ParameterList> <nstrgdfl:Parameter> <nstrgdfl:Name> <xsl:value-of select="fn:current-grouping- key()"/> </nstrgdfl:Name> <nstrgdfl:SumOfValues> <xsl:value-of select="sum(fn:current-group/ ns:Value)"/> </nstrgdfl:SumOfValues> <nstrgdfl:Parameter> </nstrgdfl:ParameterList> </xsl:for-each> </nstrgdfl:ResultElement> Output XML: <ns:ResultElement30xmlns:ns="http ://xmlns.oracle.com/some/ namespace/response"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ns:Name> <ns:SumOfValues>1</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ns:Name> <ns:SumOfValues>20</ ns:Value> </ns:Parameter> </ns:ParameterList> </ns:ResultElement>The SUM function must be set on current- group.Pass Single Quotes in a Mapper Variable You can pass single quotes in a mapper variable without using an escape character.Consider the following example.The Expression Builder shows the following value.Chapter 4 Pass Single Quotes in a Mapper Variable 4-15 Use an XSL variable to denote single quotes.You can also use an assign action variable.<xsl:variable name="quote" value="'"/>; Use a concat function to append the quotes to the actual value.<xsl:value-of select="concat( $quote, $value, $quote)"/> Note that the output on the test page and the Track Instances page shows the following.apos;ACTIVATED&apos This is a display issue only and can be ignored.The value is successfully passed.Chapter 4 Pass Single Quotes in a Mapper Variable 4-165 Troubleshoot the Mapper Review the following topics to learn about troubleshooting issues with the mapper.Topics: Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values Import XSLT Code into the Mapper Function Not Found Errors During Validation in the Mapper format-number Function Error Transform an Incoming UTC Timestamp into a Standard Timestamp CDATA in XSLT String Functions Causes Problems Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values The Current-dateTime function in the mapper does not return the same number of digits for all timestamp values. |
The output attribute must be xml.The attribute cdata- section- elements indicates which fields have the CDATA content post- transformatio n. In case of multiple elements, the value must be separated by spaces.The data should be normally mapped to the element in which CDATA should be present.Note: This approach doesnt work for file-based operations such as stage file actions and FTP where the content is rewritten from XSLT.Chapter 4 Perform Data Manipulations in the Mapper 4-14Calculate the Sum of a Node from a Group of Nodes XML Snippet XPath Expression Explanation Input XML <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/ some/namespace/ request"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>10</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> </ ns:ParameterList> </ns:SomeElement>XSLT snippet: <nstrgdfl:ResultElement> <xsl:for-each-group select="/ ns:SomeElement/ns:ParameterList/ ns:Parameter" group-by="ns:Name"> <nstrgdfl:ParameterList> <nstrgdfl:Parameter> <nstrgdfl:Name> <xsl:value-of select="fn:current-grouping- key()"/> </nstrgdfl:Name> <nstrgdfl:SumOfValues> <xsl:value-of select="sum(fn:current-group/ ns:Value)"/> </nstrgdfl:SumOfValues> <nstrgdfl:Parameter> </nstrgdfl:ParameterList> </xsl:for-each> </nstrgdfl:ResultElement> Output XML: <ns:ResultElement30xmlns:ns="http ://xmlns.oracle.com/some/ namespace/response"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ns:Name> <ns:SumOfValues>1</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ns:Name> <ns:SumOfValues>20</ ns:Value> </ns:Parameter> </ns:ParameterList> </ns:ResultElement>The SUM function must be set on current- group.Pass Single Quotes in a Mapper Variable You can pass single quotes in a mapper variable without using an escape character.Consider the following example.The Expression Builder shows the following value.Chapter 4 Pass Single Quotes in a Mapper Variable 4-15 Use an XSL variable to denote single quotes.You can also use an assign action variable.<xsl:variable name="quote" value="'"/>; Use a concat function to append the quotes to the actual value.<xsl:value-of select="concat( $quote, $value, $quote)"/> Note that the output on the test page and the Track Instances page shows the following.apos;ACTIVATED&apos This is a display issue only and can be ignored.The value is successfully passed.Chapter 4 Pass Single Quotes in a Mapper Variable 4-165 Troubleshoot the Mapper Review the following topics to learn about troubleshooting issues with the mapper.Topics: Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values Import XSLT Code into the Mapper Function Not Found Errors During Validation in the Mapper format-number Function Error Transform an Incoming UTC Timestamp into a Standard Timestamp CDATA in XSLT String Functions Causes Problems Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values The Current-dateTime function in the mapper does not return the same number of digits for all timestamp values.For example, the three digit microsecond value is not the same format each time. |
The attribute cdata- section- elements indicates which fields have the CDATA content post- transformatio n. In case of multiple elements, the value must be separated by spaces.The data should be normally mapped to the element in which CDATA should be present.Note: This approach doesnt work for file-based operations such as stage file actions and FTP where the content is rewritten from XSLT.Chapter 4 Perform Data Manipulations in the Mapper 4-14Calculate the Sum of a Node from a Group of Nodes XML Snippet XPath Expression Explanation Input XML <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/ some/namespace/ request"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>10</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> </ ns:ParameterList> </ns:SomeElement>XSLT snippet: <nstrgdfl:ResultElement> <xsl:for-each-group select="/ ns:SomeElement/ns:ParameterList/ ns:Parameter" group-by="ns:Name"> <nstrgdfl:ParameterList> <nstrgdfl:Parameter> <nstrgdfl:Name> <xsl:value-of select="fn:current-grouping- key()"/> </nstrgdfl:Name> <nstrgdfl:SumOfValues> <xsl:value-of select="sum(fn:current-group/ ns:Value)"/> </nstrgdfl:SumOfValues> <nstrgdfl:Parameter> </nstrgdfl:ParameterList> </xsl:for-each> </nstrgdfl:ResultElement> Output XML: <ns:ResultElement30xmlns:ns="http ://xmlns.oracle.com/some/ namespace/response"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ns:Name> <ns:SumOfValues>1</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ns:Name> <ns:SumOfValues>20</ ns:Value> </ns:Parameter> </ns:ParameterList> </ns:ResultElement>The SUM function must be set on current- group.Pass Single Quotes in a Mapper Variable You can pass single quotes in a mapper variable without using an escape character.Consider the following example.The Expression Builder shows the following value.Chapter 4 Pass Single Quotes in a Mapper Variable 4-15 Use an XSL variable to denote single quotes.You can also use an assign action variable.<xsl:variable name="quote" value="'"/>; Use a concat function to append the quotes to the actual value.<xsl:value-of select="concat( $quote, $value, $quote)"/> Note that the output on the test page and the Track Instances page shows the following.apos;ACTIVATED&apos This is a display issue only and can be ignored.The value is successfully passed.Chapter 4 Pass Single Quotes in a Mapper Variable 4-165 Troubleshoot the Mapper Review the following topics to learn about troubleshooting issues with the mapper.Topics: Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values Import XSLT Code into the Mapper Function Not Found Errors During Validation in the Mapper format-number Function Error Transform an Incoming UTC Timestamp into a Standard Timestamp CDATA in XSLT String Functions Causes Problems Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values The Current-dateTime function in the mapper does not return the same number of digits for all timestamp values.For example, the three digit microsecond value is not the same format each time.YYYY-MM-DDT24:59:59.123Z YYYY-MM-DDT24:59:59.12Z If you want the specific format value to be consistent, use the xp20:format-dateTime function to format the timestamp. |
The data should be normally mapped to the element in which CDATA should be present.Note: This approach doesnt work for file-based operations such as stage file actions and FTP where the content is rewritten from XSLT.Chapter 4 Perform Data Manipulations in the Mapper 4-14Calculate the Sum of a Node from a Group of Nodes XML Snippet XPath Expression Explanation Input XML <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/ some/namespace/ request"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>10</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> </ ns:ParameterList> </ns:SomeElement>XSLT snippet: <nstrgdfl:ResultElement> <xsl:for-each-group select="/ ns:SomeElement/ns:ParameterList/ ns:Parameter" group-by="ns:Name"> <nstrgdfl:ParameterList> <nstrgdfl:Parameter> <nstrgdfl:Name> <xsl:value-of select="fn:current-grouping- key()"/> </nstrgdfl:Name> <nstrgdfl:SumOfValues> <xsl:value-of select="sum(fn:current-group/ ns:Value)"/> </nstrgdfl:SumOfValues> <nstrgdfl:Parameter> </nstrgdfl:ParameterList> </xsl:for-each> </nstrgdfl:ResultElement> Output XML: <ns:ResultElement30xmlns:ns="http ://xmlns.oracle.com/some/ namespace/response"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ns:Name> <ns:SumOfValues>1</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ns:Name> <ns:SumOfValues>20</ ns:Value> </ns:Parameter> </ns:ParameterList> </ns:ResultElement>The SUM function must be set on current- group.Pass Single Quotes in a Mapper Variable You can pass single quotes in a mapper variable without using an escape character.Consider the following example.The Expression Builder shows the following value.Chapter 4 Pass Single Quotes in a Mapper Variable 4-15 Use an XSL variable to denote single quotes.You can also use an assign action variable.<xsl:variable name="quote" value="'"/>; Use a concat function to append the quotes to the actual value.<xsl:value-of select="concat( $quote, $value, $quote)"/> Note that the output on the test page and the Track Instances page shows the following.apos;ACTIVATED&apos This is a display issue only and can be ignored.The value is successfully passed.Chapter 4 Pass Single Quotes in a Mapper Variable 4-165 Troubleshoot the Mapper Review the following topics to learn about troubleshooting issues with the mapper.Topics: Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values Import XSLT Code into the Mapper Function Not Found Errors During Validation in the Mapper format-number Function Error Transform an Incoming UTC Timestamp into a Standard Timestamp CDATA in XSLT String Functions Causes Problems Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values The Current-dateTime function in the mapper does not return the same number of digits for all timestamp values.For example, the three digit microsecond value is not the same format each time.YYYY-MM-DDT24:59:59.123Z YYYY-MM-DDT24:59:59.12Z If you want the specific format value to be consistent, use the xp20:format-dateTime function to format the timestamp.For example: xp20:format-dateTime (fn:current-dateTime(), "[Y0001]-[M01]-[D01]T[H01]: [m01]:[s01]. |
Note: This approach doesnt work for file-based operations such as stage file actions and FTP where the content is rewritten from XSLT.Chapter 4 Perform Data Manipulations in the Mapper 4-14Calculate the Sum of a Node from a Group of Nodes XML Snippet XPath Expression Explanation Input XML <ns:SomeElement xmlns:ns="http:// xmlns.oracle.com/ some/namespace/ request"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>10</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>ABC</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ ns:Name> <ns:Value>20</ ns:Value> </ns:Parameter> </ ns:ParameterList> </ns:SomeElement>XSLT snippet: <nstrgdfl:ResultElement> <xsl:for-each-group select="/ ns:SomeElement/ns:ParameterList/ ns:Parameter" group-by="ns:Name"> <nstrgdfl:ParameterList> <nstrgdfl:Parameter> <nstrgdfl:Name> <xsl:value-of select="fn:current-grouping- key()"/> </nstrgdfl:Name> <nstrgdfl:SumOfValues> <xsl:value-of select="sum(fn:current-group/ ns:Value)"/> </nstrgdfl:SumOfValues> <nstrgdfl:Parameter> </nstrgdfl:ParameterList> </xsl:for-each> </nstrgdfl:ResultElement> Output XML: <ns:ResultElement30xmlns:ns="http ://xmlns.oracle.com/some/ namespace/response"> <ns:ParameterList> <ns:Parameter> <ns:Name>ABC</ns:Name> <ns:SumOfValues>1</ ns:Value> </ns:Parameter> <ns:Parameter> <ns:Name>DEF</ns:Name> <ns:SumOfValues>20</ ns:Value> </ns:Parameter> </ns:ParameterList> </ns:ResultElement>The SUM function must be set on current- group.Pass Single Quotes in a Mapper Variable You can pass single quotes in a mapper variable without using an escape character.Consider the following example.The Expression Builder shows the following value.Chapter 4 Pass Single Quotes in a Mapper Variable 4-15 Use an XSL variable to denote single quotes.You can also use an assign action variable.<xsl:variable name="quote" value="'"/>; Use a concat function to append the quotes to the actual value.<xsl:value-of select="concat( $quote, $value, $quote)"/> Note that the output on the test page and the Track Instances page shows the following.apos;ACTIVATED&apos This is a display issue only and can be ignored.The value is successfully passed.Chapter 4 Pass Single Quotes in a Mapper Variable 4-165 Troubleshoot the Mapper Review the following topics to learn about troubleshooting issues with the mapper.Topics: Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values Import XSLT Code into the Mapper Function Not Found Errors During Validation in the Mapper format-number Function Error Transform an Incoming UTC Timestamp into a Standard Timestamp CDATA in XSLT String Functions Causes Problems Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values The Current-dateTime function in the mapper does not return the same number of digits for all timestamp values.For example, the three digit microsecond value is not the same format each time.YYYY-MM-DDT24:59:59.123Z YYYY-MM-DDT24:59:59.12Z If you want the specific format value to be consistent, use the xp20:format-dateTime function to format the timestamp.For example: xp20:format-dateTime (fn:current-dateTime(), "[Y0001]-[M01]-[D01]T[H01]: [m01]:[s01].[f001]" ) This function returns the following format: 2020-10-30T21:58:15.172Z Import XSLT Code into the Mapper For some functionality that is not available in the mapper, you can import XSLT code. |
Pass Single Quotes in a Mapper Variable You can pass single quotes in a mapper variable without using an escape character.Consider the following example.The Expression Builder shows the following value.Chapter 4 Pass Single Quotes in a Mapper Variable 4-15 Use an XSL variable to denote single quotes.You can also use an assign action variable.<xsl:variable name="quote" value="'"/>; Use a concat function to append the quotes to the actual value.<xsl:value-of select="concat( $quote, $value, $quote)"/> Note that the output on the test page and the Track Instances page shows the following.apos;ACTIVATED&apos This is a display issue only and can be ignored.The value is successfully passed.Chapter 4 Pass Single Quotes in a Mapper Variable 4-165 Troubleshoot the Mapper Review the following topics to learn about troubleshooting issues with the mapper.Topics: Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values Import XSLT Code into the Mapper Function Not Found Errors During Validation in the Mapper format-number Function Error Transform an Incoming UTC Timestamp into a Standard Timestamp CDATA in XSLT String Functions Causes Problems Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values The Current-dateTime function in the mapper does not return the same number of digits for all timestamp values.For example, the three digit microsecond value is not the same format each time.YYYY-MM-DDT24:59:59.123Z YYYY-MM-DDT24:59:59.12Z If you want the specific format value to be consistent, use the xp20:format-dateTime function to format the timestamp.For example: xp20:format-dateTime (fn:current-dateTime(), "[Y0001]-[M01]-[D01]T[H01]: [m01]:[s01].[f001]" ) This function returns the following format: 2020-10-30T21:58:15.172Z Import XSLT Code into the Mapper For some functionality that is not available in the mapper, you can import XSLT code.To use a nested for-each loop in the target mapper tree and access values from different sources elements, you can use xsl:variable with different sources. |
Consider the following example.The Expression Builder shows the following value.Chapter 4 Pass Single Quotes in a Mapper Variable 4-15 Use an XSL variable to denote single quotes.You can also use an assign action variable.<xsl:variable name="quote" value="'"/>; Use a concat function to append the quotes to the actual value.<xsl:value-of select="concat( $quote, $value, $quote)"/> Note that the output on the test page and the Track Instances page shows the following.apos;ACTIVATED&apos This is a display issue only and can be ignored.The value is successfully passed.Chapter 4 Pass Single Quotes in a Mapper Variable 4-165 Troubleshoot the Mapper Review the following topics to learn about troubleshooting issues with the mapper.Topics: Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values Import XSLT Code into the Mapper Function Not Found Errors During Validation in the Mapper format-number Function Error Transform an Incoming UTC Timestamp into a Standard Timestamp CDATA in XSLT String Functions Causes Problems Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values The Current-dateTime function in the mapper does not return the same number of digits for all timestamp values.For example, the three digit microsecond value is not the same format each time.YYYY-MM-DDT24:59:59.123Z YYYY-MM-DDT24:59:59.12Z If you want the specific format value to be consistent, use the xp20:format-dateTime function to format the timestamp.For example: xp20:format-dateTime (fn:current-dateTime(), "[Y0001]-[M01]-[D01]T[H01]: [m01]:[s01].[f001]" ) This function returns the following format: 2020-10-30T21:58:15.172Z Import XSLT Code into the Mapper For some functionality that is not available in the mapper, you can import XSLT code.To use a nested for-each loop in the target mapper tree and access values from different sources elements, you can use xsl:variable with different sources.However, the mapper is locked from editing. |
The Expression Builder shows the following value.Chapter 4 Pass Single Quotes in a Mapper Variable 4-15 Use an XSL variable to denote single quotes.You can also use an assign action variable.<xsl:variable name="quote" value="'"/>; Use a concat function to append the quotes to the actual value.<xsl:value-of select="concat( $quote, $value, $quote)"/> Note that the output on the test page and the Track Instances page shows the following.apos;ACTIVATED&apos This is a display issue only and can be ignored.The value is successfully passed.Chapter 4 Pass Single Quotes in a Mapper Variable 4-165 Troubleshoot the Mapper Review the following topics to learn about troubleshooting issues with the mapper.Topics: Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values Import XSLT Code into the Mapper Function Not Found Errors During Validation in the Mapper format-number Function Error Transform an Incoming UTC Timestamp into a Standard Timestamp CDATA in XSLT String Functions Causes Problems Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values The Current-dateTime function in the mapper does not return the same number of digits for all timestamp values.For example, the three digit microsecond value is not the same format each time.YYYY-MM-DDT24:59:59.123Z YYYY-MM-DDT24:59:59.12Z If you want the specific format value to be consistent, use the xp20:format-dateTime function to format the timestamp.For example: xp20:format-dateTime (fn:current-dateTime(), "[Y0001]-[M01]-[D01]T[H01]: [m01]:[s01].[f001]" ) This function returns the following format: 2020-10-30T21:58:15.172Z Import XSLT Code into the Mapper For some functionality that is not available in the mapper, you can import XSLT code.To use a nested for-each loop in the target mapper tree and access values from different sources elements, you can use xsl:variable with different sources.However, the mapper is locked from editing.As a workaround, you can use imported maps. |
Chapter 4 Pass Single Quotes in a Mapper Variable 4-15 Use an XSL variable to denote single quotes.You can also use an assign action variable.<xsl:variable name="quote" value="'"/>; Use a concat function to append the quotes to the actual value.<xsl:value-of select="concat( $quote, $value, $quote)"/> Note that the output on the test page and the Track Instances page shows the following.apos;ACTIVATED&apos This is a display issue only and can be ignored.The value is successfully passed.Chapter 4 Pass Single Quotes in a Mapper Variable 4-165 Troubleshoot the Mapper Review the following topics to learn about troubleshooting issues with the mapper.Topics: Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values Import XSLT Code into the Mapper Function Not Found Errors During Validation in the Mapper format-number Function Error Transform an Incoming UTC Timestamp into a Standard Timestamp CDATA in XSLT String Functions Causes Problems Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values The Current-dateTime function in the mapper does not return the same number of digits for all timestamp values.For example, the three digit microsecond value is not the same format each time.YYYY-MM-DDT24:59:59.123Z YYYY-MM-DDT24:59:59.12Z If you want the specific format value to be consistent, use the xp20:format-dateTime function to format the timestamp.For example: xp20:format-dateTime (fn:current-dateTime(), "[Y0001]-[M01]-[D01]T[H01]: [m01]:[s01].[f001]" ) This function returns the following format: 2020-10-30T21:58:15.172Z Import XSLT Code into the Mapper For some functionality that is not available in the mapper, you can import XSLT code.To use a nested for-each loop in the target mapper tree and access values from different sources elements, you can use xsl:variable with different sources.However, the mapper is locked from editing.As a workaround, you can use imported maps.See Import a Map File into an Orchestrated Integration. |
You can also use an assign action variable.<xsl:variable name="quote" value="'"/>; Use a concat function to append the quotes to the actual value.<xsl:value-of select="concat( $quote, $value, $quote)"/> Note that the output on the test page and the Track Instances page shows the following.apos;ACTIVATED&apos This is a display issue only and can be ignored.The value is successfully passed.Chapter 4 Pass Single Quotes in a Mapper Variable 4-165 Troubleshoot the Mapper Review the following topics to learn about troubleshooting issues with the mapper.Topics: Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values Import XSLT Code into the Mapper Function Not Found Errors During Validation in the Mapper format-number Function Error Transform an Incoming UTC Timestamp into a Standard Timestamp CDATA in XSLT String Functions Causes Problems Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values The Current-dateTime function in the mapper does not return the same number of digits for all timestamp values.For example, the three digit microsecond value is not the same format each time.YYYY-MM-DDT24:59:59.123Z YYYY-MM-DDT24:59:59.12Z If you want the specific format value to be consistent, use the xp20:format-dateTime function to format the timestamp.For example: xp20:format-dateTime (fn:current-dateTime(), "[Y0001]-[M01]-[D01]T[H01]: [m01]:[s01].[f001]" ) This function returns the following format: 2020-10-30T21:58:15.172Z Import XSLT Code into the Mapper For some functionality that is not available in the mapper, you can import XSLT code.To use a nested for-each loop in the target mapper tree and access values from different sources elements, you can use xsl:variable with different sources.However, the mapper is locked from editing.As a workaround, you can use imported maps.See Import a Map File into an Orchestrated Integration.5-1The ability to use copy-of functionality is not currently available. |
<xsl:variable name="quote" value="'"/>; Use a concat function to append the quotes to the actual value.<xsl:value-of select="concat( $quote, $value, $quote)"/> Note that the output on the test page and the Track Instances page shows the following.apos;ACTIVATED&apos This is a display issue only and can be ignored.The value is successfully passed.Chapter 4 Pass Single Quotes in a Mapper Variable 4-165 Troubleshoot the Mapper Review the following topics to learn about troubleshooting issues with the mapper.Topics: Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values Import XSLT Code into the Mapper Function Not Found Errors During Validation in the Mapper format-number Function Error Transform an Incoming UTC Timestamp into a Standard Timestamp CDATA in XSLT String Functions Causes Problems Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values The Current-dateTime function in the mapper does not return the same number of digits for all timestamp values.For example, the three digit microsecond value is not the same format each time.YYYY-MM-DDT24:59:59.123Z YYYY-MM-DDT24:59:59.12Z If you want the specific format value to be consistent, use the xp20:format-dateTime function to format the timestamp.For example: xp20:format-dateTime (fn:current-dateTime(), "[Y0001]-[M01]-[D01]T[H01]: [m01]:[s01].[f001]" ) This function returns the following format: 2020-10-30T21:58:15.172Z Import XSLT Code into the Mapper For some functionality that is not available in the mapper, you can import XSLT code.To use a nested for-each loop in the target mapper tree and access values from different sources elements, you can use xsl:variable with different sources.However, the mapper is locked from editing.As a workaround, you can use imported maps.See Import a Map File into an Orchestrated Integration.5-1The ability to use copy-of functionality is not currently available.As a workaround, import XSLT code into the mapper to achieve copy-of functionality. |
<xsl:value-of select="concat( $quote, $value, $quote)"/> Note that the output on the test page and the Track Instances page shows the following.apos;ACTIVATED&apos This is a display issue only and can be ignored.The value is successfully passed.Chapter 4 Pass Single Quotes in a Mapper Variable 4-165 Troubleshoot the Mapper Review the following topics to learn about troubleshooting issues with the mapper.Topics: Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values Import XSLT Code into the Mapper Function Not Found Errors During Validation in the Mapper format-number Function Error Transform an Incoming UTC Timestamp into a Standard Timestamp CDATA in XSLT String Functions Causes Problems Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values The Current-dateTime function in the mapper does not return the same number of digits for all timestamp values.For example, the three digit microsecond value is not the same format each time.YYYY-MM-DDT24:59:59.123Z YYYY-MM-DDT24:59:59.12Z If you want the specific format value to be consistent, use the xp20:format-dateTime function to format the timestamp.For example: xp20:format-dateTime (fn:current-dateTime(), "[Y0001]-[M01]-[D01]T[H01]: [m01]:[s01].[f001]" ) This function returns the following format: 2020-10-30T21:58:15.172Z Import XSLT Code into the Mapper For some functionality that is not available in the mapper, you can import XSLT code.To use a nested for-each loop in the target mapper tree and access values from different sources elements, you can use xsl:variable with different sources.However, the mapper is locked from editing.As a workaround, you can use imported maps.See Import a Map File into an Orchestrated Integration.5-1The ability to use copy-of functionality is not currently available.As a workaround, import XSLT code into the mapper to achieve copy-of functionality.See Import a Map File into an Orchestrated Integration. |
apos;ACTIVATED&apos This is a display issue only and can be ignored.The value is successfully passed.Chapter 4 Pass Single Quotes in a Mapper Variable 4-165 Troubleshoot the Mapper Review the following topics to learn about troubleshooting issues with the mapper.Topics: Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values Import XSLT Code into the Mapper Function Not Found Errors During Validation in the Mapper format-number Function Error Transform an Incoming UTC Timestamp into a Standard Timestamp CDATA in XSLT String Functions Causes Problems Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values The Current-dateTime function in the mapper does not return the same number of digits for all timestamp values.For example, the three digit microsecond value is not the same format each time.YYYY-MM-DDT24:59:59.123Z YYYY-MM-DDT24:59:59.12Z If you want the specific format value to be consistent, use the xp20:format-dateTime function to format the timestamp.For example: xp20:format-dateTime (fn:current-dateTime(), "[Y0001]-[M01]-[D01]T[H01]: [m01]:[s01].[f001]" ) This function returns the following format: 2020-10-30T21:58:15.172Z Import XSLT Code into the Mapper For some functionality that is not available in the mapper, you can import XSLT code.To use a nested for-each loop in the target mapper tree and access values from different sources elements, you can use xsl:variable with different sources.However, the mapper is locked from editing.As a workaround, you can use imported maps.See Import a Map File into an Orchestrated Integration.5-1The ability to use copy-of functionality is not currently available.As a workaround, import XSLT code into the mapper to achieve copy-of functionality.See Import a Map File into an Orchestrated Integration.Function Not Found Errors During Validation in the Mapper If you receive the following error when you attempt to validate your mappings in the mapper, you are using an unsupported function (for this example, document() ). |
The value is successfully passed.Chapter 4 Pass Single Quotes in a Mapper Variable 4-165 Troubleshoot the Mapper Review the following topics to learn about troubleshooting issues with the mapper.Topics: Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values Import XSLT Code into the Mapper Function Not Found Errors During Validation in the Mapper format-number Function Error Transform an Incoming UTC Timestamp into a Standard Timestamp CDATA in XSLT String Functions Causes Problems Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values The Current-dateTime function in the mapper does not return the same number of digits for all timestamp values.For example, the three digit microsecond value is not the same format each time.YYYY-MM-DDT24:59:59.123Z YYYY-MM-DDT24:59:59.12Z If you want the specific format value to be consistent, use the xp20:format-dateTime function to format the timestamp.For example: xp20:format-dateTime (fn:current-dateTime(), "[Y0001]-[M01]-[D01]T[H01]: [m01]:[s01].[f001]" ) This function returns the following format: 2020-10-30T21:58:15.172Z Import XSLT Code into the Mapper For some functionality that is not available in the mapper, you can import XSLT code.To use a nested for-each loop in the target mapper tree and access values from different sources elements, you can use xsl:variable with different sources.However, the mapper is locked from editing.As a workaround, you can use imported maps.See Import a Map File into an Orchestrated Integration.5-1The ability to use copy-of functionality is not currently available.As a workaround, import XSLT code into the mapper to achieve copy-of functionality.See Import a Map File into an Orchestrated Integration.Function Not Found Errors During Validation in the Mapper If you receive the following error when you attempt to validate your mappings in the mapper, you are using an unsupported function (for this example, document() ).This error can occur when you import an XSLT file into Oracle Integration that includes functions that were supported in another tool such as Oracle JDeveloper. |
Topics: Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values Import XSLT Code into the Mapper Function Not Found Errors During Validation in the Mapper format-number Function Error Transform an Incoming UTC Timestamp into a Standard Timestamp CDATA in XSLT String Functions Causes Problems Current-dateTime Function Does Not Return the Same Number of Digits for All Timestamp Values The Current-dateTime function in the mapper does not return the same number of digits for all timestamp values.For example, the three digit microsecond value is not the same format each time.YYYY-MM-DDT24:59:59.123Z YYYY-MM-DDT24:59:59.12Z If you want the specific format value to be consistent, use the xp20:format-dateTime function to format the timestamp.For example: xp20:format-dateTime (fn:current-dateTime(), "[Y0001]-[M01]-[D01]T[H01]: [m01]:[s01].[f001]" ) This function returns the following format: 2020-10-30T21:58:15.172Z Import XSLT Code into the Mapper For some functionality that is not available in the mapper, you can import XSLT code.To use a nested for-each loop in the target mapper tree and access values from different sources elements, you can use xsl:variable with different sources.However, the mapper is locked from editing.As a workaround, you can use imported maps.See Import a Map File into an Orchestrated Integration.5-1The ability to use copy-of functionality is not currently available.As a workaround, import XSLT code into the mapper to achieve copy-of functionality.See Import a Map File into an Orchestrated Integration.Function Not Found Errors During Validation in the Mapper If you receive the following error when you attempt to validate your mappings in the mapper, you are using an unsupported function (for this example, document() ).This error can occur when you import an XSLT file into Oracle Integration that includes functions that were supported in another tool such as Oracle JDeveloper.javax.xml.transform.TransformerException: Could not find function: document: javax.xml.transform.TransformerException: Could not find function: document The mapper validates if all the referenced functions are supported. |
For example, the three digit microsecond value is not the same format each time.YYYY-MM-DDT24:59:59.123Z YYYY-MM-DDT24:59:59.12Z If you want the specific format value to be consistent, use the xp20:format-dateTime function to format the timestamp.For example: xp20:format-dateTime (fn:current-dateTime(), "[Y0001]-[M01]-[D01]T[H01]: [m01]:[s01].[f001]" ) This function returns the following format: 2020-10-30T21:58:15.172Z Import XSLT Code into the Mapper For some functionality that is not available in the mapper, you can import XSLT code.To use a nested for-each loop in the target mapper tree and access values from different sources elements, you can use xsl:variable with different sources.However, the mapper is locked from editing.As a workaround, you can use imported maps.See Import a Map File into an Orchestrated Integration.5-1The ability to use copy-of functionality is not currently available.As a workaround, import XSLT code into the mapper to achieve copy-of functionality.See Import a Map File into an Orchestrated Integration.Function Not Found Errors During Validation in the Mapper If you receive the following error when you attempt to validate your mappings in the mapper, you are using an unsupported function (for this example, document() ).This error can occur when you import an XSLT file into Oracle Integration that includes functions that were supported in another tool such as Oracle JDeveloper.javax.xml.transform.TransformerException: Could not find function: document: javax.xml.transform.TransformerException: Could not find function: document The mapper validates if all the referenced functions are supported.You can only use supported functions (those visible in the Functions palette in the mapper user interface) in the mapper in Oracle Integration. |
YYYY-MM-DDT24:59:59.123Z YYYY-MM-DDT24:59:59.12Z If you want the specific format value to be consistent, use the xp20:format-dateTime function to format the timestamp.For example: xp20:format-dateTime (fn:current-dateTime(), "[Y0001]-[M01]-[D01]T[H01]: [m01]:[s01].[f001]" ) This function returns the following format: 2020-10-30T21:58:15.172Z Import XSLT Code into the Mapper For some functionality that is not available in the mapper, you can import XSLT code.To use a nested for-each loop in the target mapper tree and access values from different sources elements, you can use xsl:variable with different sources.However, the mapper is locked from editing.As a workaround, you can use imported maps.See Import a Map File into an Orchestrated Integration.5-1The ability to use copy-of functionality is not currently available.As a workaround, import XSLT code into the mapper to achieve copy-of functionality.See Import a Map File into an Orchestrated Integration.Function Not Found Errors During Validation in the Mapper If you receive the following error when you attempt to validate your mappings in the mapper, you are using an unsupported function (for this example, document() ).This error can occur when you import an XSLT file into Oracle Integration that includes functions that were supported in another tool such as Oracle JDeveloper.javax.xml.transform.TransformerException: Could not find function: document: javax.xml.transform.TransformerException: Could not find function: document The mapper validates if all the referenced functions are supported.You can only use supported functions (those visible in the Functions palette in the mapper user interface) in the mapper in Oracle Integration.format-number Function Error The format-number function fails with a cannot convert string to number error for nondecimal input instead of returning a Not a Number (NaN) response. |
For example: xp20:format-dateTime (fn:current-dateTime(), "[Y0001]-[M01]-[D01]T[H01]: [m01]:[s01].[f001]" ) This function returns the following format: 2020-10-30T21:58:15.172Z Import XSLT Code into the Mapper For some functionality that is not available in the mapper, you can import XSLT code.To use a nested for-each loop in the target mapper tree and access values from different sources elements, you can use xsl:variable with different sources.However, the mapper is locked from editing.As a workaround, you can use imported maps.See Import a Map File into an Orchestrated Integration.5-1The ability to use copy-of functionality is not currently available.As a workaround, import XSLT code into the mapper to achieve copy-of functionality.See Import a Map File into an Orchestrated Integration.Function Not Found Errors During Validation in the Mapper If you receive the following error when you attempt to validate your mappings in the mapper, you are using an unsupported function (for this example, document() ).This error can occur when you import an XSLT file into Oracle Integration that includes functions that were supported in another tool such as Oracle JDeveloper.javax.xml.transform.TransformerException: Could not find function: document: javax.xml.transform.TransformerException: Could not find function: document The mapper validates if all the referenced functions are supported.You can only use supported functions (those visible in the Functions palette in the mapper user interface) in the mapper in Oracle Integration.format-number Function Error The format-number function fails with a cannot convert string to number error for nondecimal input instead of returning a Not a Number (NaN) response.This is the expected current behavior and applies to all design time and runtime usage of this function. |
[f001]" ) This function returns the following format: 2020-10-30T21:58:15.172Z Import XSLT Code into the Mapper For some functionality that is not available in the mapper, you can import XSLT code.To use a nested for-each loop in the target mapper tree and access values from different sources elements, you can use xsl:variable with different sources.However, the mapper is locked from editing.As a workaround, you can use imported maps.See Import a Map File into an Orchestrated Integration.5-1The ability to use copy-of functionality is not currently available.As a workaround, import XSLT code into the mapper to achieve copy-of functionality.See Import a Map File into an Orchestrated Integration.Function Not Found Errors During Validation in the Mapper If you receive the following error when you attempt to validate your mappings in the mapper, you are using an unsupported function (for this example, document() ).This error can occur when you import an XSLT file into Oracle Integration that includes functions that were supported in another tool such as Oracle JDeveloper.javax.xml.transform.TransformerException: Could not find function: document: javax.xml.transform.TransformerException: Could not find function: document The mapper validates if all the referenced functions are supported.You can only use supported functions (those visible in the Functions palette in the mapper user interface) in the mapper in Oracle Integration.format-number Function Error The format-number function fails with a cannot convert string to number error for nondecimal input instead of returning a Not a Number (NaN) response.This is the expected current behavior and applies to all design time and runtime usage of this function.Transform an Incoming UTC Timestamp into a Standard Timestamp You can transform an incoming UTC timestamp into a standard timestamp in the mapper. |
To use a nested for-each loop in the target mapper tree and access values from different sources elements, you can use xsl:variable with different sources.However, the mapper is locked from editing.As a workaround, you can use imported maps.See Import a Map File into an Orchestrated Integration.5-1The ability to use copy-of functionality is not currently available.As a workaround, import XSLT code into the mapper to achieve copy-of functionality.See Import a Map File into an Orchestrated Integration.Function Not Found Errors During Validation in the Mapper If you receive the following error when you attempt to validate your mappings in the mapper, you are using an unsupported function (for this example, document() ).This error can occur when you import an XSLT file into Oracle Integration that includes functions that were supported in another tool such as Oracle JDeveloper.javax.xml.transform.TransformerException: Could not find function: document: javax.xml.transform.TransformerException: Could not find function: document The mapper validates if all the referenced functions are supported.You can only use supported functions (those visible in the Functions palette in the mapper user interface) in the mapper in Oracle Integration.format-number Function Error The format-number function fails with a cannot convert string to number error for nondecimal input instead of returning a Not a Number (NaN) response.This is the expected current behavior and applies to all design time and runtime usage of this function.Transform an Incoming UTC Timestamp into a Standard Timestamp You can transform an incoming UTC timestamp into a standard timestamp in the mapper.For example, the incoming data is in the following format: 2021-05-24T13:34:45.000000+00:00 and needs to transformed as follows: 2021-05-24 13:34:45 Chapter 5 Function Not Found Errors During Validation in the Mapper 5-2 Specify the following expression in the Expression Builder. |
However, the mapper is locked from editing.As a workaround, you can use imported maps.See Import a Map File into an Orchestrated Integration.5-1The ability to use copy-of functionality is not currently available.As a workaround, import XSLT code into the mapper to achieve copy-of functionality.See Import a Map File into an Orchestrated Integration.Function Not Found Errors During Validation in the Mapper If you receive the following error when you attempt to validate your mappings in the mapper, you are using an unsupported function (for this example, document() ).This error can occur when you import an XSLT file into Oracle Integration that includes functions that were supported in another tool such as Oracle JDeveloper.javax.xml.transform.TransformerException: Could not find function: document: javax.xml.transform.TransformerException: Could not find function: document The mapper validates if all the referenced functions are supported.You can only use supported functions (those visible in the Functions palette in the mapper user interface) in the mapper in Oracle Integration.format-number Function Error The format-number function fails with a cannot convert string to number error for nondecimal input instead of returning a Not a Number (NaN) response.This is the expected current behavior and applies to all design time and runtime usage of this function.Transform an Incoming UTC Timestamp into a Standard Timestamp You can transform an incoming UTC timestamp into a standard timestamp in the mapper.For example, the incoming data is in the following format: 2021-05-24T13:34:45.000000+00:00 and needs to transformed as follows: 2021-05-24 13:34:45 Chapter 5 Function Not Found Errors During Validation in the Mapper 5-2 Specify the following expression in the Expression Builder.xp20:format-dateTime( string(fn:current-dateTime() ),"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01]") CDATA in XSLT String Functions Causes Problems Do not use CDATA in XSLT string functions ( value-of turns the content into a string). |
As a workaround, you can use imported maps.See Import a Map File into an Orchestrated Integration.5-1The ability to use copy-of functionality is not currently available.As a workaround, import XSLT code into the mapper to achieve copy-of functionality.See Import a Map File into an Orchestrated Integration.Function Not Found Errors During Validation in the Mapper If you receive the following error when you attempt to validate your mappings in the mapper, you are using an unsupported function (for this example, document() ).This error can occur when you import an XSLT file into Oracle Integration that includes functions that were supported in another tool such as Oracle JDeveloper.javax.xml.transform.TransformerException: Could not find function: document: javax.xml.transform.TransformerException: Could not find function: document The mapper validates if all the referenced functions are supported.You can only use supported functions (those visible in the Functions palette in the mapper user interface) in the mapper in Oracle Integration.format-number Function Error The format-number function fails with a cannot convert string to number error for nondecimal input instead of returning a Not a Number (NaN) response.This is the expected current behavior and applies to all design time and runtime usage of this function.Transform an Incoming UTC Timestamp into a Standard Timestamp You can transform an incoming UTC timestamp into a standard timestamp in the mapper.For example, the incoming data is in the following format: 2021-05-24T13:34:45.000000+00:00 and needs to transformed as follows: 2021-05-24 13:34:45 Chapter 5 Function Not Found Errors During Validation in the Mapper 5-2 Specify the following expression in the Expression Builder.xp20:format-dateTime( string(fn:current-dateTime() ),"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01]") CDATA in XSLT String Functions Causes Problems Do not use CDATA in XSLT string functions ( value-of turns the content into a string).For example, assume you are using the mapper to hard code a SOAP Adapter header attribute. |
See Import a Map File into an Orchestrated Integration.5-1The ability to use copy-of functionality is not currently available.As a workaround, import XSLT code into the mapper to achieve copy-of functionality.See Import a Map File into an Orchestrated Integration.Function Not Found Errors During Validation in the Mapper If you receive the following error when you attempt to validate your mappings in the mapper, you are using an unsupported function (for this example, document() ).This error can occur when you import an XSLT file into Oracle Integration that includes functions that were supported in another tool such as Oracle JDeveloper.javax.xml.transform.TransformerException: Could not find function: document: javax.xml.transform.TransformerException: Could not find function: document The mapper validates if all the referenced functions are supported.You can only use supported functions (those visible in the Functions palette in the mapper user interface) in the mapper in Oracle Integration.format-number Function Error The format-number function fails with a cannot convert string to number error for nondecimal input instead of returning a Not a Number (NaN) response.This is the expected current behavior and applies to all design time and runtime usage of this function.Transform an Incoming UTC Timestamp into a Standard Timestamp You can transform an incoming UTC timestamp into a standard timestamp in the mapper.For example, the incoming data is in the following format: 2021-05-24T13:34:45.000000+00:00 and needs to transformed as follows: 2021-05-24 13:34:45 Chapter 5 Function Not Found Errors During Validation in the Mapper 5-2 Specify the following expression in the Expression Builder.xp20:format-dateTime( string(fn:current-dateTime() ),"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01]") CDATA in XSLT String Functions Causes Problems Do not use CDATA in XSLT string functions ( value-of turns the content into a string).For example, assume you are using the mapper to hard code a SOAP Adapter header attribute.The mapper encodes the data, which causes a problem for the endpoint service at runtime. |
5-1The ability to use copy-of functionality is not currently available.As a workaround, import XSLT code into the mapper to achieve copy-of functionality.See Import a Map File into an Orchestrated Integration.Function Not Found Errors During Validation in the Mapper If you receive the following error when you attempt to validate your mappings in the mapper, you are using an unsupported function (for this example, document() ).This error can occur when you import an XSLT file into Oracle Integration that includes functions that were supported in another tool such as Oracle JDeveloper.javax.xml.transform.TransformerException: Could not find function: document: javax.xml.transform.TransformerException: Could not find function: document The mapper validates if all the referenced functions are supported.You can only use supported functions (those visible in the Functions palette in the mapper user interface) in the mapper in Oracle Integration.format-number Function Error The format-number function fails with a cannot convert string to number error for nondecimal input instead of returning a Not a Number (NaN) response.This is the expected current behavior and applies to all design time and runtime usage of this function.Transform an Incoming UTC Timestamp into a Standard Timestamp You can transform an incoming UTC timestamp into a standard timestamp in the mapper.For example, the incoming data is in the following format: 2021-05-24T13:34:45.000000+00:00 and needs to transformed as follows: 2021-05-24 13:34:45 Chapter 5 Function Not Found Errors During Validation in the Mapper 5-2 Specify the following expression in the Expression Builder.xp20:format-dateTime( string(fn:current-dateTime() ),"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01]") CDATA in XSLT String Functions Causes Problems Do not use CDATA in XSLT string functions ( value-of turns the content into a string).For example, assume you are using the mapper to hard code a SOAP Adapter header attribute.The mapper encodes the data, which causes a problem for the endpoint service at runtime.Mapping: [Expression for: "header"] "<! |
As a workaround, import XSLT code into the mapper to achieve copy-of functionality.See Import a Map File into an Orchestrated Integration.Function Not Found Errors During Validation in the Mapper If you receive the following error when you attempt to validate your mappings in the mapper, you are using an unsupported function (for this example, document() ).This error can occur when you import an XSLT file into Oracle Integration that includes functions that were supported in another tool such as Oracle JDeveloper.javax.xml.transform.TransformerException: Could not find function: document: javax.xml.transform.TransformerException: Could not find function: document The mapper validates if all the referenced functions are supported.You can only use supported functions (those visible in the Functions palette in the mapper user interface) in the mapper in Oracle Integration.format-number Function Error The format-number function fails with a cannot convert string to number error for nondecimal input instead of returning a Not a Number (NaN) response.This is the expected current behavior and applies to all design time and runtime usage of this function.Transform an Incoming UTC Timestamp into a Standard Timestamp You can transform an incoming UTC timestamp into a standard timestamp in the mapper.For example, the incoming data is in the following format: 2021-05-24T13:34:45.000000+00:00 and needs to transformed as follows: 2021-05-24 13:34:45 Chapter 5 Function Not Found Errors During Validation in the Mapper 5-2 Specify the following expression in the Expression Builder.xp20:format-dateTime( string(fn:current-dateTime() ),"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01]") CDATA in XSLT String Functions Causes Problems Do not use CDATA in XSLT string functions ( value-of turns the content into a string).For example, assume you are using the mapper to hard code a SOAP Adapter header attribute.The mapper encodes the data, which causes a problem for the endpoint service at runtime.Mapping: [Expression for: "header"] "<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae-78a8-f3gh-1d04 -9fe0416d053c</EnterpriseId> <Token>h12749ed-913b-7e3e-2aef -8dd78255cb40</Token> <DestinationId>b3fbf48e-df96-f27d-5fac -38895618064f</DestinationId> <ContentEncoding>utf-8</ContentEncoding> <ContentType>text/xml</ContentType> </CrosstalkHeader> </ CrosstalkMessage> ]]>" Code: <tns:header xml:id="id_48"> <xsl:value-of xml:id="id_82" select="'<! |
See Import a Map File into an Orchestrated Integration.Function Not Found Errors During Validation in the Mapper If you receive the following error when you attempt to validate your mappings in the mapper, you are using an unsupported function (for this example, document() ).This error can occur when you import an XSLT file into Oracle Integration that includes functions that were supported in another tool such as Oracle JDeveloper.javax.xml.transform.TransformerException: Could not find function: document: javax.xml.transform.TransformerException: Could not find function: document The mapper validates if all the referenced functions are supported.You can only use supported functions (those visible in the Functions palette in the mapper user interface) in the mapper in Oracle Integration.format-number Function Error The format-number function fails with a cannot convert string to number error for nondecimal input instead of returning a Not a Number (NaN) response.This is the expected current behavior and applies to all design time and runtime usage of this function.Transform an Incoming UTC Timestamp into a Standard Timestamp You can transform an incoming UTC timestamp into a standard timestamp in the mapper.For example, the incoming data is in the following format: 2021-05-24T13:34:45.000000+00:00 and needs to transformed as follows: 2021-05-24 13:34:45 Chapter 5 Function Not Found Errors During Validation in the Mapper 5-2 Specify the following expression in the Expression Builder.xp20:format-dateTime( string(fn:current-dateTime() ),"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01]") CDATA in XSLT String Functions Causes Problems Do not use CDATA in XSLT string functions ( value-of turns the content into a string).For example, assume you are using the mapper to hard code a SOAP Adapter header attribute.The mapper encodes the data, which causes a problem for the endpoint service at runtime.Mapping: [Expression for: "header"] "<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae-78a8-f3gh-1d04 -9fe0416d053c</EnterpriseId> <Token>h12749ed-913b-7e3e-2aef -8dd78255cb40</Token> <DestinationId>b3fbf48e-df96-f27d-5fac -38895618064f</DestinationId> <ContentEncoding>utf-8</ContentEncoding> <ContentType>text/xml</ContentType> </CrosstalkHeader> </ CrosstalkMessage> ]]>" Code: <tns:header xml:id="id_48"> <xsl:value-of xml:id="id_82" select="'<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae -78a8-f3gh-1d04-9fe0416d053c</EnterpriseId> <Token>h12749ed-913b -7e3e-2aef-8dd78255cb40</Token> <DestinationId>b3fbf48e-df96- f27d -5fac-38895618064f</DestinationId> <ContentEncoding>utf -8</ContentEncoding> <ContentType>text/xml</ ContentType> Chapter 5 CDATA in XSLT String Functions Causes Problems 5-3</CrosstalkHeader> </CrosstalkMessage> ]]>'"/> </tns:header> To achieve this: Write the XML structure using a stage file action. |
Function Not Found Errors During Validation in the Mapper If you receive the following error when you attempt to validate your mappings in the mapper, you are using an unsupported function (for this example, document() ).This error can occur when you import an XSLT file into Oracle Integration that includes functions that were supported in another tool such as Oracle JDeveloper.javax.xml.transform.TransformerException: Could not find function: document: javax.xml.transform.TransformerException: Could not find function: document The mapper validates if all the referenced functions are supported.You can only use supported functions (those visible in the Functions palette in the mapper user interface) in the mapper in Oracle Integration.format-number Function Error The format-number function fails with a cannot convert string to number error for nondecimal input instead of returning a Not a Number (NaN) response.This is the expected current behavior and applies to all design time and runtime usage of this function.Transform an Incoming UTC Timestamp into a Standard Timestamp You can transform an incoming UTC timestamp into a standard timestamp in the mapper.For example, the incoming data is in the following format: 2021-05-24T13:34:45.000000+00:00 and needs to transformed as follows: 2021-05-24 13:34:45 Chapter 5 Function Not Found Errors During Validation in the Mapper 5-2 Specify the following expression in the Expression Builder.xp20:format-dateTime( string(fn:current-dateTime() ),"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01]") CDATA in XSLT String Functions Causes Problems Do not use CDATA in XSLT string functions ( value-of turns the content into a string).For example, assume you are using the mapper to hard code a SOAP Adapter header attribute.The mapper encodes the data, which causes a problem for the endpoint service at runtime.Mapping: [Expression for: "header"] "<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae-78a8-f3gh-1d04 -9fe0416d053c</EnterpriseId> <Token>h12749ed-913b-7e3e-2aef -8dd78255cb40</Token> <DestinationId>b3fbf48e-df96-f27d-5fac -38895618064f</DestinationId> <ContentEncoding>utf-8</ContentEncoding> <ContentType>text/xml</ContentType> </CrosstalkHeader> </ CrosstalkMessage> ]]>" Code: <tns:header xml:id="id_48"> <xsl:value-of xml:id="id_82" select="'<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae -78a8-f3gh-1d04-9fe0416d053c</EnterpriseId> <Token>h12749ed-913b -7e3e-2aef-8dd78255cb40</Token> <DestinationId>b3fbf48e-df96- f27d -5fac-38895618064f</DestinationId> <ContentEncoding>utf -8</ContentEncoding> <ContentType>text/xml</ ContentType> Chapter 5 CDATA in XSLT String Functions Causes Problems 5-3</CrosstalkHeader> </CrosstalkMessage> ]]>'"/> </tns:header> To achieve this: Write the XML structure using a stage file action.Read the XML as opaque content. |
This error can occur when you import an XSLT file into Oracle Integration that includes functions that were supported in another tool such as Oracle JDeveloper.javax.xml.transform.TransformerException: Could not find function: document: javax.xml.transform.TransformerException: Could not find function: document The mapper validates if all the referenced functions are supported.You can only use supported functions (those visible in the Functions palette in the mapper user interface) in the mapper in Oracle Integration.format-number Function Error The format-number function fails with a cannot convert string to number error for nondecimal input instead of returning a Not a Number (NaN) response.This is the expected current behavior and applies to all design time and runtime usage of this function.Transform an Incoming UTC Timestamp into a Standard Timestamp You can transform an incoming UTC timestamp into a standard timestamp in the mapper.For example, the incoming data is in the following format: 2021-05-24T13:34:45.000000+00:00 and needs to transformed as follows: 2021-05-24 13:34:45 Chapter 5 Function Not Found Errors During Validation in the Mapper 5-2 Specify the following expression in the Expression Builder.xp20:format-dateTime( string(fn:current-dateTime() ),"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01]") CDATA in XSLT String Functions Causes Problems Do not use CDATA in XSLT string functions ( value-of turns the content into a string).For example, assume you are using the mapper to hard code a SOAP Adapter header attribute.The mapper encodes the data, which causes a problem for the endpoint service at runtime.Mapping: [Expression for: "header"] "<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae-78a8-f3gh-1d04 -9fe0416d053c</EnterpriseId> <Token>h12749ed-913b-7e3e-2aef -8dd78255cb40</Token> <DestinationId>b3fbf48e-df96-f27d-5fac -38895618064f</DestinationId> <ContentEncoding>utf-8</ContentEncoding> <ContentType>text/xml</ContentType> </CrosstalkHeader> </ CrosstalkMessage> ]]>" Code: <tns:header xml:id="id_48"> <xsl:value-of xml:id="id_82" select="'<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae -78a8-f3gh-1d04-9fe0416d053c</EnterpriseId> <Token>h12749ed-913b -7e3e-2aef-8dd78255cb40</Token> <DestinationId>b3fbf48e-df96- f27d -5fac-38895618064f</DestinationId> <ContentEncoding>utf -8</ContentEncoding> <ContentType>text/xml</ ContentType> Chapter 5 CDATA in XSLT String Functions Causes Problems 5-3</CrosstalkHeader> </CrosstalkMessage> ]]>'"/> </tns:header> To achieve this: Write the XML structure using a stage file action.Read the XML as opaque content.Map to the header element by using decodeBase64 of read content. |
javax.xml.transform.TransformerException: Could not find function: document: javax.xml.transform.TransformerException: Could not find function: document The mapper validates if all the referenced functions are supported.You can only use supported functions (those visible in the Functions palette in the mapper user interface) in the mapper in Oracle Integration.format-number Function Error The format-number function fails with a cannot convert string to number error for nondecimal input instead of returning a Not a Number (NaN) response.This is the expected current behavior and applies to all design time and runtime usage of this function.Transform an Incoming UTC Timestamp into a Standard Timestamp You can transform an incoming UTC timestamp into a standard timestamp in the mapper.For example, the incoming data is in the following format: 2021-05-24T13:34:45.000000+00:00 and needs to transformed as follows: 2021-05-24 13:34:45 Chapter 5 Function Not Found Errors During Validation in the Mapper 5-2 Specify the following expression in the Expression Builder.xp20:format-dateTime( string(fn:current-dateTime() ),"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01]") CDATA in XSLT String Functions Causes Problems Do not use CDATA in XSLT string functions ( value-of turns the content into a string).For example, assume you are using the mapper to hard code a SOAP Adapter header attribute.The mapper encodes the data, which causes a problem for the endpoint service at runtime.Mapping: [Expression for: "header"] "<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae-78a8-f3gh-1d04 -9fe0416d053c</EnterpriseId> <Token>h12749ed-913b-7e3e-2aef -8dd78255cb40</Token> <DestinationId>b3fbf48e-df96-f27d-5fac -38895618064f</DestinationId> <ContentEncoding>utf-8</ContentEncoding> <ContentType>text/xml</ContentType> </CrosstalkHeader> </ CrosstalkMessage> ]]>" Code: <tns:header xml:id="id_48"> <xsl:value-of xml:id="id_82" select="'<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae -78a8-f3gh-1d04-9fe0416d053c</EnterpriseId> <Token>h12749ed-913b -7e3e-2aef-8dd78255cb40</Token> <DestinationId>b3fbf48e-df96- f27d -5fac-38895618064f</DestinationId> <ContentEncoding>utf -8</ContentEncoding> <ContentType>text/xml</ ContentType> Chapter 5 CDATA in XSLT String Functions Causes Problems 5-3</CrosstalkHeader> </CrosstalkMessage> ]]>'"/> </tns:header> To achieve this: Write the XML structure using a stage file action.Read the XML as opaque content.Map to the header element by using decodeBase64 of read content.Use the cdata-section-elements attribute in XSLT referring to the header element.Chapter 5 CDATA in XSLT String Functions Causes Problems 5-4Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2 F44489-07 December 2022 Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2, F44489-07 Copyright 2021, 2022, Oracle and/or its affiliates. |
You can only use supported functions (those visible in the Functions palette in the mapper user interface) in the mapper in Oracle Integration.format-number Function Error The format-number function fails with a cannot convert string to number error for nondecimal input instead of returning a Not a Number (NaN) response.This is the expected current behavior and applies to all design time and runtime usage of this function.Transform an Incoming UTC Timestamp into a Standard Timestamp You can transform an incoming UTC timestamp into a standard timestamp in the mapper.For example, the incoming data is in the following format: 2021-05-24T13:34:45.000000+00:00 and needs to transformed as follows: 2021-05-24 13:34:45 Chapter 5 Function Not Found Errors During Validation in the Mapper 5-2 Specify the following expression in the Expression Builder.xp20:format-dateTime( string(fn:current-dateTime() ),"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01]") CDATA in XSLT String Functions Causes Problems Do not use CDATA in XSLT string functions ( value-of turns the content into a string).For example, assume you are using the mapper to hard code a SOAP Adapter header attribute.The mapper encodes the data, which causes a problem for the endpoint service at runtime.Mapping: [Expression for: "header"] "<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae-78a8-f3gh-1d04 -9fe0416d053c</EnterpriseId> <Token>h12749ed-913b-7e3e-2aef -8dd78255cb40</Token> <DestinationId>b3fbf48e-df96-f27d-5fac -38895618064f</DestinationId> <ContentEncoding>utf-8</ContentEncoding> <ContentType>text/xml</ContentType> </CrosstalkHeader> </ CrosstalkMessage> ]]>" Code: <tns:header xml:id="id_48"> <xsl:value-of xml:id="id_82" select="'<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae -78a8-f3gh-1d04-9fe0416d053c</EnterpriseId> <Token>h12749ed-913b -7e3e-2aef-8dd78255cb40</Token> <DestinationId>b3fbf48e-df96- f27d -5fac-38895618064f</DestinationId> <ContentEncoding>utf -8</ContentEncoding> <ContentType>text/xml</ ContentType> Chapter 5 CDATA in XSLT String Functions Causes Problems 5-3</CrosstalkHeader> </CrosstalkMessage> ]]>'"/> </tns:header> To achieve this: Write the XML structure using a stage file action.Read the XML as opaque content.Map to the header element by using decodeBase64 of read content.Use the cdata-section-elements attribute in XSLT referring to the header element.Chapter 5 CDATA in XSLT String Functions Causes Problems 5-4Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2 F44489-07 December 2022 Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2, F44489-07 Copyright 2021, 2022, Oracle and/or its affiliates.Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. |
format-number Function Error The format-number function fails with a cannot convert string to number error for nondecimal input instead of returning a Not a Number (NaN) response.This is the expected current behavior and applies to all design time and runtime usage of this function.Transform an Incoming UTC Timestamp into a Standard Timestamp You can transform an incoming UTC timestamp into a standard timestamp in the mapper.For example, the incoming data is in the following format: 2021-05-24T13:34:45.000000+00:00 and needs to transformed as follows: 2021-05-24 13:34:45 Chapter 5 Function Not Found Errors During Validation in the Mapper 5-2 Specify the following expression in the Expression Builder.xp20:format-dateTime( string(fn:current-dateTime() ),"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01]") CDATA in XSLT String Functions Causes Problems Do not use CDATA in XSLT string functions ( value-of turns the content into a string).For example, assume you are using the mapper to hard code a SOAP Adapter header attribute.The mapper encodes the data, which causes a problem for the endpoint service at runtime.Mapping: [Expression for: "header"] "<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae-78a8-f3gh-1d04 -9fe0416d053c</EnterpriseId> <Token>h12749ed-913b-7e3e-2aef -8dd78255cb40</Token> <DestinationId>b3fbf48e-df96-f27d-5fac -38895618064f</DestinationId> <ContentEncoding>utf-8</ContentEncoding> <ContentType>text/xml</ContentType> </CrosstalkHeader> </ CrosstalkMessage> ]]>" Code: <tns:header xml:id="id_48"> <xsl:value-of xml:id="id_82" select="'<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae -78a8-f3gh-1d04-9fe0416d053c</EnterpriseId> <Token>h12749ed-913b -7e3e-2aef-8dd78255cb40</Token> <DestinationId>b3fbf48e-df96- f27d -5fac-38895618064f</DestinationId> <ContentEncoding>utf -8</ContentEncoding> <ContentType>text/xml</ ContentType> Chapter 5 CDATA in XSLT String Functions Causes Problems 5-3</CrosstalkHeader> </CrosstalkMessage> ]]>'"/> </tns:header> To achieve this: Write the XML structure using a stage file action.Read the XML as opaque content.Map to the header element by using decodeBase64 of read content.Use the cdata-section-elements attribute in XSLT referring to the header element.Chapter 5 CDATA in XSLT String Functions Causes Problems 5-4Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2 F44489-07 December 2022 Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2, F44489-07 Copyright 2021, 2022, Oracle and/or its affiliates.Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws.Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. |
This is the expected current behavior and applies to all design time and runtime usage of this function.Transform an Incoming UTC Timestamp into a Standard Timestamp You can transform an incoming UTC timestamp into a standard timestamp in the mapper.For example, the incoming data is in the following format: 2021-05-24T13:34:45.000000+00:00 and needs to transformed as follows: 2021-05-24 13:34:45 Chapter 5 Function Not Found Errors During Validation in the Mapper 5-2 Specify the following expression in the Expression Builder.xp20:format-dateTime( string(fn:current-dateTime() ),"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01]") CDATA in XSLT String Functions Causes Problems Do not use CDATA in XSLT string functions ( value-of turns the content into a string).For example, assume you are using the mapper to hard code a SOAP Adapter header attribute.The mapper encodes the data, which causes a problem for the endpoint service at runtime.Mapping: [Expression for: "header"] "<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae-78a8-f3gh-1d04 -9fe0416d053c</EnterpriseId> <Token>h12749ed-913b-7e3e-2aef -8dd78255cb40</Token> <DestinationId>b3fbf48e-df96-f27d-5fac -38895618064f</DestinationId> <ContentEncoding>utf-8</ContentEncoding> <ContentType>text/xml</ContentType> </CrosstalkHeader> </ CrosstalkMessage> ]]>" Code: <tns:header xml:id="id_48"> <xsl:value-of xml:id="id_82" select="'<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae -78a8-f3gh-1d04-9fe0416d053c</EnterpriseId> <Token>h12749ed-913b -7e3e-2aef-8dd78255cb40</Token> <DestinationId>b3fbf48e-df96- f27d -5fac-38895618064f</DestinationId> <ContentEncoding>utf -8</ContentEncoding> <ContentType>text/xml</ ContentType> Chapter 5 CDATA in XSLT String Functions Causes Problems 5-3</CrosstalkHeader> </CrosstalkMessage> ]]>'"/> </tns:header> To achieve this: Write the XML structure using a stage file action.Read the XML as opaque content.Map to the header element by using decodeBase64 of read content.Use the cdata-section-elements attribute in XSLT referring to the header element.Chapter 5 CDATA in XSLT String Functions Causes Problems 5-4Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2 F44489-07 December 2022 Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2, F44489-07 Copyright 2021, 2022, Oracle and/or its affiliates.Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws.Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. |
Transform an Incoming UTC Timestamp into a Standard Timestamp You can transform an incoming UTC timestamp into a standard timestamp in the mapper.For example, the incoming data is in the following format: 2021-05-24T13:34:45.000000+00:00 and needs to transformed as follows: 2021-05-24 13:34:45 Chapter 5 Function Not Found Errors During Validation in the Mapper 5-2 Specify the following expression in the Expression Builder.xp20:format-dateTime( string(fn:current-dateTime() ),"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01]") CDATA in XSLT String Functions Causes Problems Do not use CDATA in XSLT string functions ( value-of turns the content into a string).For example, assume you are using the mapper to hard code a SOAP Adapter header attribute.The mapper encodes the data, which causes a problem for the endpoint service at runtime.Mapping: [Expression for: "header"] "<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae-78a8-f3gh-1d04 -9fe0416d053c</EnterpriseId> <Token>h12749ed-913b-7e3e-2aef -8dd78255cb40</Token> <DestinationId>b3fbf48e-df96-f27d-5fac -38895618064f</DestinationId> <ContentEncoding>utf-8</ContentEncoding> <ContentType>text/xml</ContentType> </CrosstalkHeader> </ CrosstalkMessage> ]]>" Code: <tns:header xml:id="id_48"> <xsl:value-of xml:id="id_82" select="'<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae -78a8-f3gh-1d04-9fe0416d053c</EnterpriseId> <Token>h12749ed-913b -7e3e-2aef-8dd78255cb40</Token> <DestinationId>b3fbf48e-df96- f27d -5fac-38895618064f</DestinationId> <ContentEncoding>utf -8</ContentEncoding> <ContentType>text/xml</ ContentType> Chapter 5 CDATA in XSLT String Functions Causes Problems 5-3</CrosstalkHeader> </CrosstalkMessage> ]]>'"/> </tns:header> To achieve this: Write the XML structure using a stage file action.Read the XML as opaque content.Map to the header element by using decodeBase64 of read content.Use the cdata-section-elements attribute in XSLT referring to the header element.Chapter 5 CDATA in XSLT String Functions Causes Problems 5-4Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2 F44489-07 December 2022 Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2, F44489-07 Copyright 2021, 2022, Oracle and/or its affiliates.Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws.Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free. |
For example, the incoming data is in the following format: 2021-05-24T13:34:45.000000+00:00 and needs to transformed as follows: 2021-05-24 13:34:45 Chapter 5 Function Not Found Errors During Validation in the Mapper 5-2 Specify the following expression in the Expression Builder.xp20:format-dateTime( string(fn:current-dateTime() ),"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01]") CDATA in XSLT String Functions Causes Problems Do not use CDATA in XSLT string functions ( value-of turns the content into a string).For example, assume you are using the mapper to hard code a SOAP Adapter header attribute.The mapper encodes the data, which causes a problem for the endpoint service at runtime.Mapping: [Expression for: "header"] "<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae-78a8-f3gh-1d04 -9fe0416d053c</EnterpriseId> <Token>h12749ed-913b-7e3e-2aef -8dd78255cb40</Token> <DestinationId>b3fbf48e-df96-f27d-5fac -38895618064f</DestinationId> <ContentEncoding>utf-8</ContentEncoding> <ContentType>text/xml</ContentType> </CrosstalkHeader> </ CrosstalkMessage> ]]>" Code: <tns:header xml:id="id_48"> <xsl:value-of xml:id="id_82" select="'<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae -78a8-f3gh-1d04-9fe0416d053c</EnterpriseId> <Token>h12749ed-913b -7e3e-2aef-8dd78255cb40</Token> <DestinationId>b3fbf48e-df96- f27d -5fac-38895618064f</DestinationId> <ContentEncoding>utf -8</ContentEncoding> <ContentType>text/xml</ ContentType> Chapter 5 CDATA in XSLT String Functions Causes Problems 5-3</CrosstalkHeader> </CrosstalkMessage> ]]>'"/> </tns:header> To achieve this: Write the XML structure using a stage file action.Read the XML as opaque content.Map to the header element by using decodeBase64 of read content.Use the cdata-section-elements attribute in XSLT referring to the header element.Chapter 5 CDATA in XSLT String Functions Causes Problems 5-4Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2 F44489-07 December 2022 Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2, F44489-07 Copyright 2021, 2022, Oracle and/or its affiliates.Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws.Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free.If you find any errors, please report them to us in writing. |
xp20:format-dateTime( string(fn:current-dateTime() ),"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01]") CDATA in XSLT String Functions Causes Problems Do not use CDATA in XSLT string functions ( value-of turns the content into a string).For example, assume you are using the mapper to hard code a SOAP Adapter header attribute.The mapper encodes the data, which causes a problem for the endpoint service at runtime.Mapping: [Expression for: "header"] "<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae-78a8-f3gh-1d04 -9fe0416d053c</EnterpriseId> <Token>h12749ed-913b-7e3e-2aef -8dd78255cb40</Token> <DestinationId>b3fbf48e-df96-f27d-5fac -38895618064f</DestinationId> <ContentEncoding>utf-8</ContentEncoding> <ContentType>text/xml</ContentType> </CrosstalkHeader> </ CrosstalkMessage> ]]>" Code: <tns:header xml:id="id_48"> <xsl:value-of xml:id="id_82" select="'<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae -78a8-f3gh-1d04-9fe0416d053c</EnterpriseId> <Token>h12749ed-913b -7e3e-2aef-8dd78255cb40</Token> <DestinationId>b3fbf48e-df96- f27d -5fac-38895618064f</DestinationId> <ContentEncoding>utf -8</ContentEncoding> <ContentType>text/xml</ ContentType> Chapter 5 CDATA in XSLT String Functions Causes Problems 5-3</CrosstalkHeader> </CrosstalkMessage> ]]>'"/> </tns:header> To achieve this: Write the XML structure using a stage file action.Read the XML as opaque content.Map to the header element by using decodeBase64 of read content.Use the cdata-section-elements attribute in XSLT referring to the header element.Chapter 5 CDATA in XSLT String Functions Causes Problems 5-4Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2 F44489-07 December 2022 Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2, F44489-07 Copyright 2021, 2022, Oracle and/or its affiliates.Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws.Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free.If you find any errors, please report them to us in writing.If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. |
For example, assume you are using the mapper to hard code a SOAP Adapter header attribute.The mapper encodes the data, which causes a problem for the endpoint service at runtime.Mapping: [Expression for: "header"] "<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae-78a8-f3gh-1d04 -9fe0416d053c</EnterpriseId> <Token>h12749ed-913b-7e3e-2aef -8dd78255cb40</Token> <DestinationId>b3fbf48e-df96-f27d-5fac -38895618064f</DestinationId> <ContentEncoding>utf-8</ContentEncoding> <ContentType>text/xml</ContentType> </CrosstalkHeader> </ CrosstalkMessage> ]]>" Code: <tns:header xml:id="id_48"> <xsl:value-of xml:id="id_82" select="'<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae -78a8-f3gh-1d04-9fe0416d053c</EnterpriseId> <Token>h12749ed-913b -7e3e-2aef-8dd78255cb40</Token> <DestinationId>b3fbf48e-df96- f27d -5fac-38895618064f</DestinationId> <ContentEncoding>utf -8</ContentEncoding> <ContentType>text/xml</ ContentType> Chapter 5 CDATA in XSLT String Functions Causes Problems 5-3</CrosstalkHeader> </CrosstalkMessage> ]]>'"/> </tns:header> To achieve this: Write the XML structure using a stage file action.Read the XML as opaque content.Map to the header element by using decodeBase64 of read content.Use the cdata-section-elements attribute in XSLT referring to the header element.Chapter 5 CDATA in XSLT String Functions Causes Problems 5-4Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2 F44489-07 December 2022 Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2, F44489-07 Copyright 2021, 2022, Oracle and/or its affiliates.Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws.Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free.If you find any errors, please report them to us in writing.If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract. |
The mapper encodes the data, which causes a problem for the endpoint service at runtime.Mapping: [Expression for: "header"] "<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae-78a8-f3gh-1d04 -9fe0416d053c</EnterpriseId> <Token>h12749ed-913b-7e3e-2aef -8dd78255cb40</Token> <DestinationId>b3fbf48e-df96-f27d-5fac -38895618064f</DestinationId> <ContentEncoding>utf-8</ContentEncoding> <ContentType>text/xml</ContentType> </CrosstalkHeader> </ CrosstalkMessage> ]]>" Code: <tns:header xml:id="id_48"> <xsl:value-of xml:id="id_82" select="'<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae -78a8-f3gh-1d04-9fe0416d053c</EnterpriseId> <Token>h12749ed-913b -7e3e-2aef-8dd78255cb40</Token> <DestinationId>b3fbf48e-df96- f27d -5fac-38895618064f</DestinationId> <ContentEncoding>utf -8</ContentEncoding> <ContentType>text/xml</ ContentType> Chapter 5 CDATA in XSLT String Functions Causes Problems 5-3</CrosstalkHeader> </CrosstalkMessage> ]]>'"/> </tns:header> To achieve this: Write the XML structure using a stage file action.Read the XML as opaque content.Map to the header element by using decodeBase64 of read content.Use the cdata-section-elements attribute in XSLT referring to the header element.Chapter 5 CDATA in XSLT String Functions Causes Problems 5-4Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2 F44489-07 December 2022 Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2, F44489-07 Copyright 2021, 2022, Oracle and/or its affiliates.Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws.Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free.If you find any errors, please report them to us in writing.If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract.The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services. |
Mapping: [Expression for: "header"] "<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae-78a8-f3gh-1d04 -9fe0416d053c</EnterpriseId> <Token>h12749ed-913b-7e3e-2aef -8dd78255cb40</Token> <DestinationId>b3fbf48e-df96-f27d-5fac -38895618064f</DestinationId> <ContentEncoding>utf-8</ContentEncoding> <ContentType>text/xml</ContentType> </CrosstalkHeader> </ CrosstalkMessage> ]]>" Code: <tns:header xml:id="id_48"> <xsl:value-of xml:id="id_82" select="'<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae -78a8-f3gh-1d04-9fe0416d053c</EnterpriseId> <Token>h12749ed-913b -7e3e-2aef-8dd78255cb40</Token> <DestinationId>b3fbf48e-df96- f27d -5fac-38895618064f</DestinationId> <ContentEncoding>utf -8</ContentEncoding> <ContentType>text/xml</ ContentType> Chapter 5 CDATA in XSLT String Functions Causes Problems 5-3</CrosstalkHeader> </CrosstalkMessage> ]]>'"/> </tns:header> To achieve this: Write the XML structure using a stage file action.Read the XML as opaque content.Map to the header element by using decodeBase64 of read content.Use the cdata-section-elements attribute in XSLT referring to the header element.Chapter 5 CDATA in XSLT String Functions Causes Problems 5-4Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2 F44489-07 December 2022 Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2, F44489-07 Copyright 2021, 2022, Oracle and/or its affiliates.Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws.Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free.If you find any errors, please report them to us in writing.If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract.The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services.No other rights are granted to the U.S. Government. |
[CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae-78a8-f3gh-1d04 -9fe0416d053c</EnterpriseId> <Token>h12749ed-913b-7e3e-2aef -8dd78255cb40</Token> <DestinationId>b3fbf48e-df96-f27d-5fac -38895618064f</DestinationId> <ContentEncoding>utf-8</ContentEncoding> <ContentType>text/xml</ContentType> </CrosstalkHeader> </ CrosstalkMessage> ]]>" Code: <tns:header xml:id="id_48"> <xsl:value-of xml:id="id_82" select="'<![CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae -78a8-f3gh-1d04-9fe0416d053c</EnterpriseId> <Token>h12749ed-913b -7e3e-2aef-8dd78255cb40</Token> <DestinationId>b3fbf48e-df96- f27d -5fac-38895618064f</DestinationId> <ContentEncoding>utf -8</ContentEncoding> <ContentType>text/xml</ ContentType> Chapter 5 CDATA in XSLT String Functions Causes Problems 5-3</CrosstalkHeader> </CrosstalkMessage> ]]>'"/> </tns:header> To achieve this: Write the XML structure using a stage file action.Read the XML as opaque content.Map to the header element by using decodeBase64 of read content.Use the cdata-section-elements attribute in XSLT referring to the header element.Chapter 5 CDATA in XSLT String Functions Causes Problems 5-4Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2 F44489-07 December 2022 Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2, F44489-07 Copyright 2021, 2022, Oracle and/or its affiliates.Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws.Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free.If you find any errors, please report them to us in writing.If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract.The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services.No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications. |
[CDATA[ <CrosstalkMessage> <CrosstalkHeader> <ProcessCode>1004</ProcessCode> <MessageType>100</MessageType> <ExchangePattern>7</ExchangePattern> <EnterpriseId>ace7d6ae -78a8-f3gh-1d04-9fe0416d053c</EnterpriseId> <Token>h12749ed-913b -7e3e-2aef-8dd78255cb40</Token> <DestinationId>b3fbf48e-df96- f27d -5fac-38895618064f</DestinationId> <ContentEncoding>utf -8</ContentEncoding> <ContentType>text/xml</ ContentType> Chapter 5 CDATA in XSLT String Functions Causes Problems 5-3</CrosstalkHeader> </CrosstalkMessage> ]]>'"/> </tns:header> To achieve this: Write the XML structure using a stage file action.Read the XML as opaque content.Map to the header element by using decodeBase64 of read content.Use the cdata-section-elements attribute in XSLT referring to the header element.Chapter 5 CDATA in XSLT String Functions Causes Problems 5-4Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2 F44489-07 December 2022 Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2, F44489-07 Copyright 2021, 2022, Oracle and/or its affiliates.Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws.Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free.If you find any errors, please report them to us in writing.If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract.The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services.No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. |
Read the XML as opaque content.Map to the header element by using decodeBase64 of read content.Use the cdata-section-elements attribute in XSLT referring to the header element.Chapter 5 CDATA in XSLT String Functions Causes Problems 5-4Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2 F44489-07 December 2022 Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2, F44489-07 Copyright 2021, 2022, Oracle and/or its affiliates.Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws.Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free.If you find any errors, please report them to us in writing.If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract.The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services.No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury.If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. |
Map to the header element by using decodeBase64 of read content.Use the cdata-section-elements attribute in XSLT referring to the header element.Chapter 5 CDATA in XSLT String Functions Causes Problems 5-4Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2 F44489-07 December 2022 Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2, F44489-07 Copyright 2021, 2022, Oracle and/or its affiliates.Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws.Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free.If you find any errors, please report them to us in writing.If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract.The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services.No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury.If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use.Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications. |
Use the cdata-section-elements attribute in XSLT referring to the header element.Chapter 5 CDATA in XSLT String Functions Causes Problems 5-4Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2 F44489-07 December 2022 Oracle Cloud Using the Zendesk Adapter with Oracle Integration Generation 2, F44489-07 Copyright 2021, 2022, Oracle and/or its affiliates.Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws.Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free.If you find any errors, please report them to us in writing.If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract.The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services.No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury.If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use.Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates. |
Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws.Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free.If you find any errors, please report them to us in writing.If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract.The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services.No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury.If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use.Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates.Other names may be trademarks of their respective owners. |
Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free.If you find any errors, please report them to us in writing.If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract.The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services.No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury.If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use.Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates.Other names may be trademarks of their respective owners.Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. |
Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free.If you find any errors, please report them to us in writing.If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract.The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services.No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury.If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use.Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates.Other names may be trademarks of their respective owners.Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation.All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices. |
The information contained herein is subject to change without notice and is not warranted to be error-free.If you find any errors, please report them to us in writing.If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract.The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services.No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury.If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use.Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates.Other names may be trademarks of their respective owners.Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation.All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices.UNIX is a registered trademark of The Open Group. |
If you find any errors, please report them to us in writing.If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract.The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services.No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury.If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use.Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates.Other names may be trademarks of their respective owners.Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation.All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices.UNIX is a registered trademark of The Open Group.This software or hardware and documentation may provide access to or information about content, products, and services from third parties. |
If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract.The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services.No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury.If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use.Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates.Other names may be trademarks of their respective owners.Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation.All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices.UNIX is a registered trademark of The Open Group.This software or hardware and documentation may provide access to or information about content, products, and services from third parties.Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. |
As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed, or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract.The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services.No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury.If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use.Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates.Other names may be trademarks of their respective owners.Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation.All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices.UNIX is a registered trademark of The Open Group.This software or hardware and documentation may provide access to or information about content, products, and services from third parties.Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle.Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.Contents Preface Audience v Documentation Accessibility v Diversity and Inclusion v Related Resources vi Conventions vi 1 Understand the Zendesk Adapter Zendesk Adapter Capabilities 1-1 What Application Version Is Supported? |
The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services.No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury.If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use.Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates.Other names may be trademarks of their respective owners.Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation.All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices.UNIX is a registered trademark of The Open Group.This software or hardware and documentation may provide access to or information about content, products, and services from third parties.Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle.Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.Contents Preface Audience v Documentation Accessibility v Diversity and Inclusion v Related Resources vi Conventions vi 1 Understand the Zendesk Adapter Zendesk Adapter Capabilities 1-1 What Application Version Is Supported?1-1 Workflow to Create and Add a Zendesk Adapter Connection to an Integration 1-2 2 Create a Zendesk Adapter Connection Prerequisites for Creating a Connection 2-1 Create a Connection 2-2 Configure Connection Properties 2-3 Configure Connection Security 2-3 Test the Connection 2-4 Upload an SSL Certificate 2-4 3 Add the Zendesk Adapter Connection to an Integration Basic Info Page 3-1 Trigger Conditions Page 3-1 Invoke Action Page 3-2 Invoke Operations Page 3-2 Summary Page 3-3 4 Implement Common Patterns Using the Zendesk Adapter Synchronize Zendesk Tickets With ServiceNow Incidents 4-1 iiiSynchronize ServiceNow Incidents and Attachments with Zendesk 4-5 ivPreface This guide describes how to configure this adapter as a connection in an integration in Oracle Integration. |
No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury.If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use.Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates.Other names may be trademarks of their respective owners.Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation.All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices.UNIX is a registered trademark of The Open Group.This software or hardware and documentation may provide access to or information about content, products, and services from third parties.Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle.Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.Contents Preface Audience v Documentation Accessibility v Diversity and Inclusion v Related Resources vi Conventions vi 1 Understand the Zendesk Adapter Zendesk Adapter Capabilities 1-1 What Application Version Is Supported?1-1 Workflow to Create and Add a Zendesk Adapter Connection to an Integration 1-2 2 Create a Zendesk Adapter Connection Prerequisites for Creating a Connection 2-1 Create a Connection 2-2 Configure Connection Properties 2-3 Configure Connection Security 2-3 Test the Connection 2-4 Upload an SSL Certificate 2-4 3 Add the Zendesk Adapter Connection to an Integration Basic Info Page 3-1 Trigger Conditions Page 3-1 Invoke Action Page 3-2 Invoke Operations Page 3-2 Summary Page 3-3 4 Implement Common Patterns Using the Zendesk Adapter Synchronize Zendesk Tickets With ServiceNow Incidents 4-1 iiiSynchronize ServiceNow Incidents and Attachments with Zendesk 4-5 ivPreface This guide describes how to configure this adapter as a connection in an integration in Oracle Integration.Note: The use of this adapter may differ depending on the features you have, or whether your instance was provisioned using Standard or Enterprise edition. |
This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury.If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use.Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates.Other names may be trademarks of their respective owners.Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation.All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices.UNIX is a registered trademark of The Open Group.This software or hardware and documentation may provide access to or information about content, products, and services from third parties.Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle.Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.Contents Preface Audience v Documentation Accessibility v Diversity and Inclusion v Related Resources vi Conventions vi 1 Understand the Zendesk Adapter Zendesk Adapter Capabilities 1-1 What Application Version Is Supported?1-1 Workflow to Create and Add a Zendesk Adapter Connection to an Integration 1-2 2 Create a Zendesk Adapter Connection Prerequisites for Creating a Connection 2-1 Create a Connection 2-2 Configure Connection Properties 2-3 Configure Connection Security 2-3 Test the Connection 2-4 Upload an SSL Certificate 2-4 3 Add the Zendesk Adapter Connection to an Integration Basic Info Page 3-1 Trigger Conditions Page 3-1 Invoke Action Page 3-2 Invoke Operations Page 3-2 Summary Page 3-3 4 Implement Common Patterns Using the Zendesk Adapter Synchronize Zendesk Tickets With ServiceNow Incidents 4-1 iiiSynchronize ServiceNow Incidents and Attachments with Zendesk 4-5 ivPreface This guide describes how to configure this adapter as a connection in an integration in Oracle Integration.Note: The use of this adapter may differ depending on the features you have, or whether your instance was provisioned using Standard or Enterprise edition.These differences are noted throughout this guide. |
It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury.If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use.Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates.Other names may be trademarks of their respective owners.Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation.All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices.UNIX is a registered trademark of The Open Group.This software or hardware and documentation may provide access to or information about content, products, and services from third parties.Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle.Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.Contents Preface Audience v Documentation Accessibility v Diversity and Inclusion v Related Resources vi Conventions vi 1 Understand the Zendesk Adapter Zendesk Adapter Capabilities 1-1 What Application Version Is Supported?1-1 Workflow to Create and Add a Zendesk Adapter Connection to an Integration 1-2 2 Create a Zendesk Adapter Connection Prerequisites for Creating a Connection 2-1 Create a Connection 2-2 Configure Connection Properties 2-3 Configure Connection Security 2-3 Test the Connection 2-4 Upload an SSL Certificate 2-4 3 Add the Zendesk Adapter Connection to an Integration Basic Info Page 3-1 Trigger Conditions Page 3-1 Invoke Action Page 3-2 Invoke Operations Page 3-2 Summary Page 3-3 4 Implement Common Patterns Using the Zendesk Adapter Synchronize Zendesk Tickets With ServiceNow Incidents 4-1 iiiSynchronize ServiceNow Incidents and Attachments with Zendesk 4-5 ivPreface This guide describes how to configure this adapter as a connection in an integration in Oracle Integration.Note: The use of this adapter may differ depending on the features you have, or whether your instance was provisioned using Standard or Enterprise edition.These differences are noted throughout this guide.Topics: Audience Documentation Accessibility Diversity and Inclusion Related Resources Conventions Audience This guide is intended for developers who want to use this adapter in integrations in Oracle Integration. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.