Hi list,

I am trying to adapt the easy table creation features for DocBook for my
document type.
I seem to have some troubles understanding the syntax for referencing
element templates.

I Have the following code in my xxe config files:

<cfg:button toolTip="Add table" icon="../common/icons2/table_menu.gif">
    <cfg:menu>
        <cfg:item label="Tabelle" command="docb.addAfter"
parameter="#template(table,simple)"/>
        <cfg:item label="Tabelle (mit Kopf)" command="docb.addAfter"
parameter="#template(table,head_row)"/>
    </cfg:menu>
</cfg:button>

<elementTemplate name="simple" selectable="override">
    <table>
        <title/>
        ...
    </table>
</elementTemplate>
<elementTemplate name="head_row">
    <table>
        ....
    </table>
</elementTemplate>

<command name="docb.addAfter">
    <macro>
        <choice>
        <sequence>
            <command name="selectNode"
parameter="ancestorOrSelf[implicitElement]"/>
            <command name="insert" parameter="after[implicitElement]
%0"/>
        </sequence>
        <command name="add" parameter="after[implicitElement] %0"/>
        </choice>
    </macro>
</command>

The problem is, that the selected template doesn't get inserted into my
documents. 
All I get is the selected ancestorOrSelf[implicitElement] 

I suppose that the reference between #template(...) and my
elementTemplates is not correct. 
What does the "table" before the template name in #template(...) stand
for?

Thanks again for your help.

wbr,
Roman
_______________________________________

Roman Huditsch
IT and Electronic Publishing
LexisNexis ARD Orac 
Marxergasse 25
1030 Vienna
Austria 
ph: +43-1-534 52-1514
f: +43-1-534 52-140
e-mail roman.huditsch at lexisnexis.at
www.lexisnexis.at
 

Reply via email to