[plug] Whats a good xml editor for linux?

Derek Fountain derekfountain at yahoo.co.uk
Fri Dec 19 11:56:23 WST 2003


> I don't quite understand this reasoning. For example, OpenOffice
> documents and SVG files are, as I understand it, stored using XML.
> However, it would be crazy to write an OpenOffice wordprocessor document
> using vim to write it in XML. Yet, the question about "XML editors"
> implied to me the idea of actually editing XML in its 'native' fashion.
> In fact, you even mentioned DTDs, and DTDs do not provide information
> about semantics, which I imagine is something you are concerned with
> when you are working with "a totally different kind of editing". By
> that, I mean that if we are concerned with which elements are allowed by
> DTDs, we are working with XML at a level that is lower than, say, the
> OpenOffice wordprocessor.

Actually, it seems you do understand the reasoning! Think of OpenOffice as an 
XML editor - that's exactly what it is. The editor "knows" the basic syntax 
of its input and ouput - XML elements, attributes, text nodes and so on. It 
also knows which elements go in which order and which can have which 
attributes, etc. That information is in the DTD. The program presents a 
mechanism which allows the user to enter their data - a blank page with 
controls for paragraphs, bold, tables, etc. No typing of tags, angle brackets 
or other such things. The user only worries about their data, the editor 
handles the XML.

Now make the concept generic. You can't present a blank page because the user 
(probably) isn't writing a word processor style document, so you have to go 
up the "conceptual levels" until you get to the point where everything is 
generic. Since XML is basically a tree structure, you present a root node. 
When the user clicks on it they can enter the type of node it is. When they 
select it and click "add child" you present them a new node graphically 
attached to the root, and guide them to the list of suitable element types 
this node can be. And so on. The editor allows them to build a tree from 
their data. And not an angle bracket in sight!

In fact, given an XSLT stylesheet and the tree-building framework of XMLSpy, 
the user need never see an angle bracket - unless they open the file in vim 
of course. ;o) In practise, the XMLSpy user like you or I will frequently 
switch between tree mode and text mode (i.e. angle brackets and all mode) 
because sometimes data just looks more sensible when you can see the bones. 
For a specific XML editor like OpenOffice, that's not the case.

Without a DTD the tree building still works, it's just that the editor can't 
offer guidance on what is and is not allowed. XMLSpy just turns off 
validation checking and lets you enter anything you like anywhere you like.

I might be on the edge of ramble-mode now. :o) I'd recommend you have a look 
at the trial of XMLSpy to see what I'm on about. It's not for everyone, in 
the same sense that IDEs aren't for everyone, but the OP asked for an XML 
editor - not a text editor - so it might suit his needs. Only there isn't 
anything like it under Linux. :o(

-- 
> eatapple
core dump




More information about the plug mailing list