Hussein Shafie wrote: > > Tahia wrote: > > > > > > About convert element: > > > > > > > > We can select a text and converted to <b> for exemple. > > > > <b> is an element without parameter. > > > > I realised that we can not convert text to an element within attributes. > > > > > > > > See the exemple of xhtml: > > > > > > > > --<command name="xhtml.convertToLink"> > > > > <macro> > > > > <sequence> > > > > <command name="convert" parameter="a" /> > > > > <command name="putAttribute" parameter="%*" /> > > > > </sequence> > > > > </macro> > > > > ---</command> > > > > > > > > it uses a method "xhtml.convertToLink". It works well. > > > > > > > > How could I convert a text to an element within attributes ? > > > > I tried: > > > > > > > > --<command name="myConvertToLink"> > > > > <macro> > > > > <sequence> > > > > <command name="convert" parameter="a" /> > > > > <command name="putAttribute" parameter="%*" /> > > > > </sequence> > > > > </macro> > > > > ---</command> > > > > > > > > --- <button toolTip="Convert to link" icon="../icons2/link_menu.gif"> > > > > <menu> > > > > <item label="a[externe link]" command="myConvertToLink" > > > > parameter="href http://XXX.YYY" /> > > > > <item label="a[interne link]" command="myConvertToLink" > > > > parameter="href urn:XXX:YYY" /> > > > > </menu> > > > > ---</button> > > > > > > > > my element <a> is not the same as the one declared with XHTML!!
> > You forgot to add entry for your DTD in config/catalog.xml: > > -------------------------------------- > <public publicId="-//INRIA//DTD specification 20020115//EN" > uri="interstices/dtd/interstices.dtd"/> > -------------------------------------- > That is not true, it is at the end of the file config/catalog.xml. Those lines are the last entry. > Due to this omission and because all your templates begin with: > > ----------------------------------------- > <?xml version="1.0" encoding="iso-8859-1" ?> > <!DOCTYPE document PUBLIC "-//INRIA//DTD specification 20020115//EN" > "http://www.inria.fr/xml/dtd/stic/document.dtd" [ > > ]> > ----------------------------------------- > > The DTD was download from http://www.inria.fr/xml/dtd/stic/document.dtd > (very quick, not noticeable) > > and this version of the DTD does not define a <a> element at all! That is true. The DTD is an old version at this url. But I do not want that the editor use this version for the moment. > > PS 1: After adding an entry to catalog.xml, do not forget to clear the > DTD cache using Options|Options, Schema Tab, Clear cache. If you are in > the process of developing your dtd, it is a good idea to temporarily > disable this cache. It is already done. > > PS 2: Your localize elements are taken from an old version of a > configuration file. > > PS 3: The <detect> and <dtd> element as written are not useful because > you have added a <!DOCTYPE> to all your document templates. > > PS 4: Some element templates are still missing xmlns="" (ex. > <elementTemplate name="simpleObject">) > Ok I will check. > PS 5: I think you load useless things from the docbook configuration > (ex. docbook_help.jar) I know it is useless, lot of things should be erased. But I don't think about for the moment. Thank you for all, but still have the problem with the <a> element and adding the buttom as I wanted. Tahia

