-1
私はこのようなリンクの中に条件を追加しようとしています。<xsl:choose> xsl条件を<a>タグ内に設定できません。式が空に戻ります
<a class="accordion-toggle" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse" aria-expanded="true" aria-controls="collapse">
<xsl:value-of select="./Data[@Name='Title']"/>
<div class=""></div>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="/Properties/Data[@ID='ISSOCIAL']/Option[@Selected='true']/Value = 1">
pull-right down
</xsl:when>
<xsl:otherwise>
pull-right
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</a>
残念ながら、divタグ内のクラスは<div class="">
..emptyのようになります。
ただし、アンカータグ内の条件を追加せずに次のコードを実行するだけであれば、うまく描画できます。
<div class=""></div>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="/Properties/Data[@ID='ISSOCIAL']/Option[@Selected='true']/Value = 1">
pull-right down
</xsl:when>
<xsl:otherwise>
pull-right
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
出力なぜこれが起こっている上の任意のアイデアは、この<div class="pull-right down"></div>
のように見えますか?どんな助けもありがとう!
を使用することができますXSLT 2.0としてタグ付けされたように、私はXSL 2.0へのアクセスを持っていないルックス、私は私のタグを更新しますお詫び申し上げます。 1.0でこれを行うにはいくつかの方法がありますか?ありがとうございました。 – BaconJuice
'div'に' xsl:attribute'を使いたいのであれば、私が言ったように、 'div'の内部に属しています。 –