Re: Usability of XML editors
Peter Flynn <[email protected]> Thu, 22 Nov 2007 22:18:30 +0000
| Newsgroups | gmane.editors.conglomerate.devel |
|---|---|
| Organization | University College Cork Human Factors Research Group |
| Message-ID | <[email protected]> |
Steinar Bang wrote: > Some of the nice things about conglomerate, was the things it got for > free from libxml2. One of these nice things, was the care libxml2 takes > to not mess up the formatting of the original document. > > The Java based XML editors I've seen, have not been very good at keeping > to and keeping existing formatting. So when I have to edit those same > files later with emacs+nxml, things look really bad! Almost all XML editors do this, unfortunately. Emacs/psgml inherits the sanctity of irrelevant white-space in element-content from SGML, which is optional in XML, but is detectable if you use a DTD (because you know which content models are mixed-content and which are element-content). Sadly, this has not been realized by the editor-makers. It's a pain in both directions: if you create a document using Emacs/psgml and then later open it using something else, the something else preserves the irrelevant white-space in the formatting, which is wrong; and if you create a document using something else and then later open it in Emacs/psgml, there isn't any easy way to force it to the nice indented model psgml and xxml use (unless someone has written a macro to do this that I haven't found). > The Java based editors also reformat the CDATA content and mixed content > elements, which is _really_ bad, from a text/document editor POV. Formatting CDATA content is an absolute no-no and means the editor is broken. Reformatting mixed content is harmless, if sometimes inelegant. ///Peter