Modifying the sample XSL style sheets

There are several points at which you can modify the .xsl scripts used in the application.

Procedure

To modify the sample XSL style sheets, you can:

  1. Modify the credential mapping for AZ.
    Open the rgxacml.xsl style sheet and complete the following XSL statements:
    <!-- Specify your LDAP Server -->
    <xsl:variable name="server"><xsl:copy-of select="$LDAPHost"/></xsl:variable>
    <xsl:variable name="bindDN"><xsl:copy-of select="$LDAPCN"/></xsl:variable>
    <xsl:variable name="bindPassword"><xsl:copy-of
    select="$LDAPPassword"/></xsl:variable>
    <xsl:variable name="port"><xsl:copy-of select="$LDAPPort"/></xsl:variable>
    The following variables are defined in the soavars.xsl style sheet:
    <xsl:variable name="LDAPHost" select='"yourldap.something.com"' />
    <xsl:variable name="LDAPPort" select='"389"' />
    <xsl:variable name="LDAPCN" select='"cn=root"' />
    <xsl:variable name="LDAPPassword" select='"passw0rd"' />
    <xsl:variable name="StoreGWHost" select='"yourDatapowerName"' />
    <xsl:variable name="StoreGWPort" select='"62151"' />
    The sample contains an unencrypted password to the LDAP Server, it could be that you want to customize the provided style sheet to decrypt an encrypted password.
    <!-- Specify base DN to begin search -->
    <xsl:variable name="baseDN">dc=ibm.com</xsl:variable>
    The baseDN is hard coded as dc=ibm.com. If you have configured your LDAP with a different Suffix, baseDN, change this line to customize the sample.
  2. Modify the Redaction style sheet.
    The noPriceInfo.xsl style sheet contains the following code, which will zero out any price values. You can add other fields to the redaction logic or add more complicated transformations that involve computation to determine values for fields.
    <!-- private access only fields -->
    <xsl:template match="price">
    <price>0.0</price>
    </xsl:template>
    <xsl:template match="Price">
    <Price>0.0</Price>
    </xsl:template>
    Later, the style sheet performs an identity transform on all other elements.

Task Task

Feedback

Timestamp icon Last updated: Thursday, 3 July 2014
http://publib.boulder.ibm.com/infocenter/prodconn/v1r0m0/topic/com.ibm.scenarios.soawdpwsrr.doc/topics/tsoa2_sample_xsl_modify_stylesheet.htm