3

diazo ルールで xslt の "call-template" ディレクティブを使用しようとしています。

しかし、xsl:template を設定し、ルールで xsl:call-template を使用して呼び出すと、diazo デバッガーから例外が発生します。

要素テンプレートはスタイルシートの子としてのみ許可されています

どうしたの?call-tempalte を使用できますか? そうでない場合、どうすれば xslt テンプレートで自分自身を繰り返さないことができますか?

例:

<?xml version="1.0" encoding="UTF-8"?>
<rules
xmlns="http://namespaces.plone.org/diazo"
xmlns:css="http://namespaces.plone.org/diazo/css"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xi="http://www.w3.org/2001/XInclude">

<!-- indent and strip space for pretty output -->
<xsl:output indent="yes"/>
<xsl:strip-space elements="*"/>



<theme href="index.html" />

<after css:theme-children="body">
    <xsl:call-template name="hello"></xsl:call-template>
</after>



<xsl:template name="hello">
    <xsl:element name="div">
        Hello!
    </xsl:element>
</xsl:template>

</rules>

diazo は xsl:stylesheet ( https://github.com/plone/diazo/blob/master/lib/diazo/normalize-rules.xsl ) として定義されたファイルでこれを管理できることがわかりましたが、ルールでは直接ではありませんが、アドオン パッケージでこれをどのように管理しますか?

ありがとう

4

1 に答える 1

0

この問題が解決しない場合は、最新バージョンの Diazo と plone.app.theming を試してください。

この問題は最新バージョン (Plone 4.3.3) では再現できません。私にとって、ルールの例は問題なく機能します(ルールファイルではないメインにある限り)。

于 2014-08-09T05:30:09.900 に答える