이 예와 같습니다. https://plone-theming-with-diazo.readthedocs.org/en/latest/snippets_diazo/recipes/index.html#add-attributes-on-the-fly 특정 태그의 모든 클래스를 수정하고 내용을 추가해야합니다. 나는 "navTreeLevel0"클래스와 UL 내부의 리튬 태그에 값이 "노 총알"을 추가 할특정 태그의 속성을 수정하여 값을 추가
<xsl:template css:match="ul.navTreeLevel0 li">
<xsl:attribute name="class"><xsl:value-of select="./@class"/> no-bullet</xsl:attribute>
</xsl:template>
:
이 규칙
작업을 does'nt.디아 조는 예외를 발생시키지 않습니다. 내가 비슷한 상황을했습니다 같은 규칙 파일에서
하지만,이 경우는 작동합니다<replace content="//div[contains(@class,'cell')]/@class">
<xsl:attribute name="class">
<xsl:if test='contains(current(),"width-3:4")'>nine large-9 columns</xsl:if>
<xsl:if test='contains(current(),"width-2:3")'>height large-8 columns</xsl:if>
<xsl:if test='contains(current(),"width-1:2")'>six large-6 columns</xsl:if>
<xsl:if test='contains(current(),"width-1:3")'>four large-4 columns</xsl:if>
<xsl:if test='contains(current(),"width-1:4")'>three large-3 columns</xsl:if>
<xsl:if test='contains(current(),"width-full")'>twelve large-12 columns</xsl:if>
</xsl:attribute>
</replace>
무슨 일이야? 비토
감사의 말입니다. "// * asd []"와 같이 명백하게 잘못된 구문을 넣는 CSS : match 수정 Diazo는 예외 (AssertionError : 예기치 않은 기호 : '/'가 0)를 발생시킵니다. – Vito
내가 작성한 첫 번째 규칙은 기본 rules.xml 파일에 있으며, 두 번째 규칙 (작동하는 하나!)은이라는 다른 규칙에 있습니다. –
Vito