サンプル 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>
    baseDN は、dc=ibm.com とハードコーディングされています。 別のサフィックスや baseDN を使用して LDAP を構成した場合は、この行を変更してサンプルをカスタマイズします。
  2. Redaction スタイル・シートを変更します。
    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>
    スタイル・シートは、後で他のすべてのエレメントに対して、ID 変換を行います。

タスク タスク

フィードバック


タイム・スタンプ・アイコン 最終更新: 2012年10月16日


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