SAP CPI accessing properties or headers in XSL Mapping

Accessing a header or a property in a XSL mapping is verryy easy in SAP CPI. It only needs too define a Param with the Header oor Property namem to access it in the script.

Let’s say we have a Header called CST_MyCustomHeader.

First : Declare the Header with a XSL param :

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
  <xsl:param name="CST_MyCustomHeader"/>
...

If we need s default value for Unit Testing mappings we can set it like this : 
```xml
  <xsl:param name="CST_MyCustomHeader" select="My default value"/>
...

Then in the XSL, use a value-of too get the value :

```xml
    ...
    <xsl:value-of select="$CST_MyCustomHeader" />
    ...