Philippe Nobili wrote: > > Back to this problem, i.e. not being able to add a list item in XHTML > section using Ctr-<Enter>, there is no visible crash. Might the problem > be due to XML namespaces ? Our XHTML elements are in 'xhtml' namespace, > and XMLMind behaves as if it were not possible to add a list item when > the selected element is a list item. > > The toolbar button 'Add li' behaves exactly as Ctrl-<Enter>: if a list > item is selected, it does nothing, if the caret is at the end of the > first paragraphi in the list item, it selects the list item itself > instead of appending a new list item.... >
"Add li" and Ctrl-<Enter> both end up to invoke the following macro: Excerpt from XXE_install_dir/addon/config/xhtml/xhtml_support.incl (XXE v4.5.2): --- <command name="xhtml.appendListItem"> <macro undoable="true"> <sequence> <command name="selectNode" parameter="ancestorOrSelf[implicitElement] {http://www.w3.org/1999/xhtml}li {http://www.w3.org/1999/xhtml}dd {http://www.w3.org/1999/xhtml}dt" /> <choice> <sequence> <match context="$selected" pattern="html:li" /> <command name="insertNode" parameter="sameElementAfter" /> </sequence> <sequence> <!-- Match dd|dt --> <!-- Assumes that a dt is followed by a dd. --> <choice> <match context="$selected" pattern="html:dd" /> <command name="selectNode" parameter="nextSibling {http://www.w3.org/1999/xhtml}dd"/> </choice> <command name="insert" parameter="after {http://www.w3.org/1999/xhtml}dt" /> <command name="insert" parameter="after {http://www.w3.org/1999/xhtml}dd" /> <command name="selectNode" parameter="previousSibling" /> </sequence> </choice> </sequence> </macro> </command> --- --> I suggest to add trace="true" to this macro and then to invoke it using "Add li" for example (OR Ctrl-ENTER OR "Esc x" then type "xhtml.appendListItem"). May be the trace printed on the console will show you why it does not work in your context. --> My guess is that your problem comes from: --- <match context="$selected" pattern="html:li" /> --- for this to work, your document must define the "html" prefix (e.g. xmlns:html="http://www.w3.org/1999/xhtml" on the root element). If you prefer to use "xhtml" as a namespace prefix, then you'll have to redefine this macro in your configuration file. That is, simply copy the macro and replace 'html:' by 'xhtml:' *everywhere* in the macro. -- XMLmind XML Editor Support List xmleditor-support@xmlmind.com http://www.xmlmind.com/mailman/listinfo/xmleditor-support