I'm using XML comments to annotate documents with diagnostic messages generated by external tools. These messages can be nicely displayed in XEE. I love this capability very much. XXE is certainly a great product!
In doing so, I've discovered a strange behaviour of text replacement. It has beed detected in xxe-std-26. Upgrading to xxe-st-26p1 doesn't help. In some cases, selecting the whole text of a text node and typing some characters to replace it let the new text go to either the preceding node of the following one, depending on the document structure and DTD restrictions. This effect shows up mainly in documents not restricted by a DTD. But also if a DTD requires that the node must have character contents and the replaced text is near a XML comment. Please find attached minimal sample files to test the above: - open either xcomment1.xml or xcomment2.xml in XXE - double click on some numeric value - type a new value to replace it Please check every item. The behaviour is different in each case. The most surprising case is when replacing the value marked 'out of range' in xcomment2.xml. The new typed value is inserted in front of the comment text, and an empty text node appears after the comment. Now my guessings: It seems that selected text replacement is done in two separate steps: - deleting the selected text, and - inserting the new typed text The first action is done somehow 'intelligently' by XXE. If the text node becomes empty, it is discarded, and the caret is repositioned in a neighbour node. If this is the case, an obvious solution would be to take into account if the goal of the deletion is to replace the text, and avoid to discard the node containing the caret, but keep it as an empty text node. This would apply also when the selected text span several nodes (only one holds the caret). Hope this helps, -- ------------------------------------------------------------------------ Manuel Collado Machuca | Facultad de Informatica UPM Universidad Politecnica de Madrid | Campus de Montegancedo Dep. LSIIS | Boadilla del Monte Tel.+34-91-336.74.57 Fax.+34-91-336.74.12 | 28660 MADRID - SPAIN ------------------------------------------------------------------------ -------------- next part -------------- A non-text attachment was scrubbed... Name: xcomment1.xml Type: text/xml Size: 199 bytes Desc: not available Url : http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20040621/a6f545bf/attachment.xml -------------- next part -------------- A non-text attachment was scrubbed... Name: xcomment2.xml Type: text/xml Size: 237 bytes Desc: not available Url : http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20040621/a6f545bf/attachment-0001.xml -------------- next part -------------- A non-text attachment was scrubbed... Name: xcomment.css Type: text/css Size: 203 bytes Desc: not available Url : http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20040621/a6f545bf/attachment.css -------------- next part -------------- A non-text attachment was scrubbed... Name: xcomment.dtd Type: text/xml Size: 107 bytes Desc: not available Url : http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20040621/a6f545bf/attachment-0002.xml

