2012-04-12 12 views
3

特定の条件が満たされている場合にのみ、テーマから来る要素にクラスを追加する必要があります。私は、このようなそこにいる他のすべてのルールを削除する場合でも、私はエラーを取得するDiazo - テーマ要素に条件付きでクラスを追加する

XSLTApplyError: xsl:attribute: Cannot add attributes to an element if children have been already added to the element. 

<before css:theme=".main" if-content="not(//*[@id='portal-column-two'])"><xsl:attribute name="class"><xsl:value-of select="//*[@class='main']/@class"/> full</xsl:attribute></before> 

が、私は次のエラーを取得する:私はbeforeprependを交換することによりジアゾについて調整し、this solutionを試してみました<theme>ルールと<before>ルールのみです。

コンテンツに#portal-column-two要素がない場合のみ、テーマ要素にクラスを追加できますか?

答えて

2

prepend css:themeのジアゾ置換体は、before css:theme-childrenであり、before css:themeではない。あなたの例は、変更されたもので動作します。

関連する問題