我的目标是更改包含在具有属性和值的元素中的任何文本的字体颜色<li audience="beginner"></li>
。我目前正在寻找在 Dita Open Toolkits PDF 插件的 custom.xsl 文件中执行此操作。custom.xsl 将覆盖 common.xsl 中的任何样式。我的问题是如何在属性集标签中按属性选择?
自定义.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>