On 10/11/2011 06:26 PM, [email protected] wrote: > > I understand that as a "personal" license holder, I am not entitled to > support for customize.xxe issues, but I believe this is a bug in XMLMind for > docbook5.0 documents and should be reported. >
Thank you for doing this. However this is not a bug in versions 4.9 and 5.0. See below. > I am not sure if this is a known bug (or something I am doing wrong) but I > modified my customize.xxe file to create two special command keys as follows: > > <binding> > <keyPressed code="F5" /> > <command name="convertCase" parameter="upper" /> > </binding> > > <binding> > <keyPressed code="F6" /> > <command name="convert" parameter="command" /> > </binding> > > My intent was that I could highlight some text and press either function key. > The F5 key is supposed to convert the text to uppercase and the F6 key is > supposed to convert the text to a command tag. > > When I use my old Docbook 4.5 documents, both of these commands work fine. > When I try to use this in a new Docbook 5 document, the convertCase command > works fine but the convert command does nothing. Converting the selection to element "command" does not work in a DocBook 5 document because DocBook 5 has no element called "command" (I mean, without a namespace). The DocBook 5 equivalent of the DocBook 4 "command" element is called: --- db:command xmlns:db="http://docbook.org/ns/docbook" --- Because the parameter of a command --a plain string-- does not support namespace prefixes, you need to specify in your customization of the DocBook v5+ configuration: --- <binding> <keyPressed code="F6" /> <command name="convert" parameter="{http://docbook.org/ns/docbook}command" /> </binding> --- Notice that parameter="{http://docbook.org/ns/docbook}command" uses the so-called ``Clark's notation''. See http://www.jclark.com/xml/xmlns.htm Now if you have just a customize.xxe and no proper customizations of the 2 DocBook configurations, you need F6 to work the same for both DocBook 4 and DocBook 5 documents. If this is the case, please specify: --- <command name="convertToCommand"> <macro> <choice> <command name="convert" parameter="{http://docbook.org/ns/docbook}command" /> <command name="convert" parameter="command" /> </choice> </macro> </command> <binding> <keyPressed code="F6" /> <command name="convertToCommand" /> </binding> --- > I have tried this in both XMLMind 4.9 and 5.0 (I just installed 5.0 hoping > that this might be something that was fixed in the latest version which I > understand is intended to support Docbook 5.0 better) but the results are the > same. > > I am assuming there is some kind of bug in the system for Docbook5 or else I > am missing something really basic here. I've attached sample documents in > both Docbook 4.5 and Docbook 5 as well as the customization I added in case > you want to try this out. This is a very simple test. Just highlight a word > in the document(s), for instance Docbook, and then press F5 which will > uppercase the word. Rehighlight and press F6. In the Docbook45test.xml > document, this will convert to a<command> tag, but in Docbook50test.xml, it > will do nothing. > > By the way, if I do the standard keystrokes for this, i.e., Control-T > (convert...), it works in both editors for both types of documents. So it > appears that something is happening weird for Docbook 5 documents when you > use the standard command "convert" with a function key that doesn't happen > for Docbook 4.5. > > Any help you give me would be greatly appreciated. > -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

