0

私の目標は、の属性と値を持つ要素に含まれるテキストのフォントの色を変更することです<li audience="beginner"></li>。私は現在、Dita Open Toolkits PDF プラグインの custom.xsl ファイルでこれを行うことを検討しています。custom.xsl は、common.xsl 内のすべてのスタイルをオーバーライドします。私の質問は、attribute-set タグの属性で選択するにはどうすればよいですか?

カスタム.xsl

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fo="http://www.w3.org/1999/XSL/Format"
    version="2.0">
    <xsl:attribute-set name="li">
        <xsl:attribute name="color">red</xsl:attribute>
    </xsl:attribute-set>
</xsl:stylesheet>

XML

<li audience="beginner" class="- topic/li ">This text should be blue</li>
<li audience="expert" class="- topic/li ">This text should be red</li>
4

1 に答える 1