3
我想在我的重氮規則中使用xslt「呼叫模板」指令,因爲我不想「重複我的自我」。重氮和xslt「呼叫模板」
但是,當我建立了xsl:模板,使用XSL稱之爲:調用模板的規則,我獲得重氮調試異常
元素模板只允許作爲樣式
的孩子
這是怎麼回事?我可以使用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>
我發現,在重氮定義爲XSL文件可以管理這個:而在規則直接樣式表(https://github.com/plone/diazo/blob/master/lib/diazo/normalize-rules.xsl),但在我的附加軟件包如何管理呢?
感謝的
向我們展示代碼! – SteveM
Right @SteveM,正確編輯我的問題 – Vito
可能的重複[如何轉換塊的內容從plone插入重氮主題](http://stackoverflow.com/questions/5749561/how-to-transform-block-of -content從 - Plone的感插入-成重氮基主題) –