On Monday, Jan 13, 2003, at 13:27 Europe/London, Hussein Shafie wrote:

> Jeremy Quinn wrote:
>>
>> I am trying to get a button to instantiate a template:
>>
>>         this one, with or without the ns declaration, never un-dims  
>> the button:
>>
>>      <item label="Chapter" command="add"
>> parameter="after[implicitElement]
>>                         {http://www.xmlmind.com/xmleditor/schema/
>> iniva}#template(chapter,linked)"/>
>
>
> Change:
>
> {http://www.xmlmind.com/xmleditor/schema/ 
> iniva}#template(chapter,linked)
>
> to:
>
> #template({http://www.xmlmind.com/xmleditor/schema/ 
> iniva}chapter,linked)

Ah!!
Thanks, for this!

>> Where the elementTemplate looks like this:
>>
>>    <elementTemplate parent="section" name="linked" selectable="true"
>>         xmlns="http://www.xmlmind.com/xmleditor/schema/iniva";>
>>      <chapter link="???" label="???">
>>        <meta>
>>         <title>your title here</title>
>>         <desc>your description here</desc>
>>        </meta>
>>        <p>your content here</p>
>>      </chapter>
>>    </elementTemplate>
>>
>> this one makes a chapter fine, but is not using the elementTemplate:
>>
>> <item label="Chapter" command="add" parameter="after[implicitElement]
>> {http://www.xmlmind.com/xmleditor/schema/iniva}chapter"; />
>>
>> Can anyone see what I am doing wrong?
>
> The xmlns attribute moves elementTemplate out of the XXE configuration
> namespace.
>
> Change:
>
> <elementTemplate parent="section" name="linked" selectable="true"
>                  xmlns="http://www.xmlmind.com/xmleditor/schema/iniva";>
>   <chapter link="???" label="???">
> </elementTemplate>
>
> To:
>
> <cfg:elementTemplate parent="section" name="linked" selectable="true"
>
> xmlns="http://www.xmlmind.com/xmleditor/schema/iniva";>
>   <chapter link="???" label="???">
> </cfg:elementTemplate>
>
> This assumes that the cfg prefix is declared on root element of the XXE
> configuration file as
> xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration";
>

OK, I'll give this a try.
I am not sure what difference it makes though .....
Does it mean for instance that I don't have to continue prefixing  
commands like this:  
{http://www.xmlmind.com/xmleditor/schema/iniva}chapter?

> Note that you don't need to specify parent="section" if there are no
> different types of element called chapter (i.e. if a chapter can only  
> be
> a child of a section).

Thanks, yes, this went on while I was trying to make it work first time  
....


Thanks for your replies.

regards Jeremy


Reply via email to