これは本当に簡単な質問になると思います。XSL 経由で変換する xml ドキュメントがあります。この xml の重要な部分は次のようになります。
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Transaction>
    <EnrollmentModel>
      <FutureContributionsModel>
        <FutureContributionsElectionType>ACertainThirdParty</FutureContributionsElectionType>
      </FutureContributionsModel>
    </EnrollmentModel>
  <Transaction>
</root>
<FutureContributionsElectionType>実際、の値が等しい場合は、次を追加しますACertainThirdParty。
<fo:table-row>
    <fo:table-cell>
        <fo:block font-family="verdanaPS" font-size="9" padding-bottom="15px" padding-top="10px">
                        The Participant has successfully opted in to use ACertainThirdParty as the managed provider for the account.
        </fo:block>
    </fo:table-cell>
</fo:table-row>
サードパーティは 1 つしかないため、カスタム テキストのノードの値を取得する必要はありません。そこにハードコードするだけで済みます。
の値が<FutureContributionsElectionType>等しくない場合ACertainThirdParty、他の多くのものを追加したくありません。
これが私が試したことです:
これは<xsl:choose>and <xsl:when>/の仕事のよう<xsl:otherwise>ですね。これが私が得たものです:
<xsl:choose>
  <xsl:when test="FutureContributionsModel/FutureContributionsElectionType='ACertainThirdParty'">
    <fo:table-row>
      <fo:table-cell>
        <fo:block font-family="verdanaPS" font-size="9" padding-bottom="15px" padding-top="10px">
                        The Participant has successfully opted in to use ACertainThirdParty as the managed provider for the account.
        </fo:block>
      </fo:table-cell>
    </fo:table-row>
  </xsl:when>
  <xsl:otherwise>
    <fo:table-row>
      <fo:table-cell>
          ...
          Lots of stuff
          ...
      </fo:table-cell>
    </fo:table-row>
  </xsl:otherwise>
</xsl:choose>
しかし、私がそれを変換すると、正しいコードではなく、そうでなければコードがヒットします(私のxmlでは、値は確かにACertainThirdPartyです。私の推測では、私の問題は私がXPathを知らないことです。ここで何が起こっているのですか?