Hi Hussein, Thank you a thousand times! I don't exactly know, why I didn't try out this combination, but everything works out fine now. Thank you very much again!
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 > -----Urspr?ngliche Nachricht----- > Von: Hussein Shafie [mailto:hussein at pixware.fr] > Gesendet: Mittwoch, 9. M?rz 2005 11:16 > An: Huditsch Roman > Cc: xmleditor-support at xmlmind.com > Betreff: Re: [XXE] ElementTemplates don't get inserted > > Huditsch Roman wrote: > > I am still stuck with the problem, that I can't use > elementTemplates > > properly. > > All I get is a selected Element, but the strucutre defined in my > > elementTemplate doesn't get inserted after it. > > I am able to insert the strucutre by hand, so there should be no > > validation issue. > > Good idea to check this. > > > > > Here is my code: > > > > <cfg:command name="docb.addAfter"> > > <cfg:macro> > > <cfg:sequence> > > <cfg:command name="selectNode" > > parameter="ancestorOrSelf[implicitElement] > > {http://www.lexisnexis.at/schema/norm}absatz > > {http://www.lexisnexis.at/schema/norm}zaehlung > > {http://www.lexisnexis.at/schema/norm}liste > > {http://www.lexisnexis.at/schema/norm}tabelle"/> > > <cfg:command name="insert" parameter="after[implicitElement] > > #template(*,simple)"/> > > </cfg:sequence> > > </cfg:macro> > > </cfg:command> > > Replace: > --- > #template(*,simple) > --- > > by: > --- > #template({http://www.lexisnexis.at/schema/norm}table,simple) > --- > > The syntax is > #template(fully_qualified_element_name_using_{}_notation, > template_name). > > Most errors come from the fact that the element in the > corresponding elementTemplate is not defined in the right namespace. > > > > > <cfg:elementTemplate xmlns="http://www.lexisnexis.at/schema/norm" > > name="simple" selectable="override"> > > <table frame="none"> > > <tgroup cols="2"> > > <colspec colname="col1" colnum="1" colsep="0" colwidth="0.7*" > > rowsep="0"/> > > <colspec colname="col2" colnum="2" colsep="0" colwidth="4.7*" > > rowsep="0"/> > > <tbody> > > <row> > > <entry/> > > <entry/> > > </row> > > <row> > > <entry/> > > <entry/> > > </row> > > </tbody> > > </tgroup> > > </table> > > </cfg:elementTemplate> > > Seems OK. > > [Optional] Unless you want to make the above table your > *default* table, > replace: > --- > selectable="override" > --- > > by: > --- > selectable="false" > --- > > or by: > --- > selectable="true" > --- > > > > > I tried nearly every possible combination. I also defined > my namespace > > directly in the table element (which seems more correct to me), > > Should work fine too. > > > but after reading the examples in the documentation, I > decided to try it > > this way. > > >

