What I would like to see in an XML editor

NOTE: This is a restored version from this archive.

  1. When I type </, the last opened tag is closed, and the cursor is positioned after the closing tag.
  2. The editor can be switched from whitespaces sensitive to whitespaces insensitive. In the first mode, whitespaces are kept and displayed. In the second mode they are discarded, but the document is presented and saved in a nice indented way (a few intelligent pretty-printing rules can really make an XML document more readable).
  3. When I type Alt+(left) or Alt+(right), the cursor is positioned at the beginning of the next or previous XML node in serial mode (i.e. following a depth-first tree traversal mode). If the cursor is inside a node, Alt+(left) jumps to the beginning of the node.
  4. When I type Alt+(up) the cursor is positionned at the beginning of the parent node. There may be a better action to perform but for now I don’t see any.
  5. When I type Alt+(down) the cursor is positioned after the last child of the parent of the current node. This allows to quickly get to an insertion point after having typed a series of embedded elements.
  6. When I double click an element name, the whole element and its content is selected. I can copy/past, drag and drop etc. a whole tree branch easily this way.
  7. There should be XML-specific simple search & replace dialogs for element and attributes names.
  8. For more complex transformations, it should be possible to type a standalone set of XSLT template to be directly applied to the document. A preview buffer would be available to check if the transformation is correct, but once accepted, the whole document would be changed. No need to use an external tool and to juggle with three files (input, stylesheet, output). The templates would be saved in a recent templates list to be reused (for long-term persistence the user would save them in a file).
  9. It should be possible to bind a transformation to a toolbar button and/or a keyboard shortcut. The transformation scope would be restricted to the currently selected nodes (or node part if the current node is a text node). Example : I select some text, press Ctrl+B, and the text is embedded into a <b> element. Either we try to have a toggle system (pressing Ctrl+B once more would remove the <b>s) or not, it depends on the ease of implementation and/or the limitation we’re ready to put on the system.
  10. WF checks would be made in the background and the WF status would be signalled by an icon. A double click on the ’not WF’ icon would position the cursor on the error with a status message indicating the error. Another way to do this could be to display a small icon in the margin of the line where the error is.
  11. Validation - it should be possible to validate the current document against a DTD, XML Schema, RELAX NG, etc schema. The binding could be internal to the document (through DOCTYPES or xsi:schemaLocation) or external (useful for RELAX NG schemas). Like for point 10, if possible, the validation should be performed in the background, and errors signaled by an icon. Since a document can’t be always valid during its creation, validation should not be intrusive or blocking.
  12. Tag name completion taking into account the current DTD/schema. When opening a tag, if the current document has an associated schema, only the valid tag names are presented.

That’s all for the moment :).