修改样本 XSL 样式表

您可以在多个点修改应用程序中使用的 .xsl 脚本。

过程

要修改样本 XSL 样式表,您可以:

  1. 修改 AZ 的凭证映射。
    打开 rgxacml.xsl 样式表,并完成以下 XSL 语句:
    <!-- 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>
    soavars.xsl 样式表中定义以下变量:
    <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"' />
    该样本包含 LDAP 服务器的未加密密码,这是您可能想要定制提供的样式表以解密加密时使用的密码。
    <!-- Specify base DN to begin search -->
    <xsl:variable name="baseDN">dc=ibm.com</xsl:variable>
    The baseDN is hard coded as dc=ibm.com。如果为 LDAP 配置了不同的后缀、baseDN,请更改改行以定制样本。
  2. 修改编辑样式表。
    noPriceInfo.xsl 样式表包含以下代码,这将使任何价格值归零。 您可以向编辑逻辑添加其他字段,或者添加含计算的更复杂变换以确定字段值。
    <!-- private access only fields -->
    <xsl:template match="price">
    <price>0.0</price>
    </xsl:template>
    <xsl:template match="Price">
    <Price>0.0</Price>
    </xsl:template>
    然后,该样式表会对所有其他元素执行标识变换。

任务 任务

反馈


时间戳记图标 最近一次更新时间: 2012年10月16日


http://publib.boulder.ibm.com/infocenter/prodconn/v1r0m0/topic/com.ibm.scenarios.soawdpwsrr.doc/topics/tsoa2_sample_xsl_modify_stylesheet.htm