[
Lists Home |
Date Index |
Thread Index
]
- From: Peter Murray-Rust <peter@ursus.demon.co.uk>
- To: xml-dev@ic.ac.uk
- Date: Mon, 27 Apr 1998 12:38:54
Thanks very much Matt,
At 10:05 27/04/98 +0000, Matt Mower wrote:
>Hi.
>
>I am looking for some advice on possible approaches, useful tools, and
>helpful resources on developing an XML based editor.
>
>Some general requirements for the editor are:
>
>0. It be simple enough to just "sit down and use"
>1. It require no knowledge of XML to use
>2. It be based entirely pre-prepared DTD's
I take this to mean "you can only use it if you have a DTD, but it will
accept any DTD", rather than "a set of DTDs must be hardwired in (as in
HTML editors)"
>3. It only allow creation of documents conforming to a DTD
>4. It provides help to users converting existing documents*
>5. It be written in Java
There are some additional requirements that I expect you will want very
shortly :-). Think of (say) Netscape Composer (which is similar to an
SGML/XML editor with a fixed DTD) and ask what additional possibilities
would be useful. You may (rightly) reject them as bloating your ideas but
you will certainly find other people wanting them :-)
It should support tree-based and stream-based editing (my guess is that
you were primarily thinking of streams)
It should support ID/IDREF and xml:link in a graphical manner (e.g.
dragon-drop)
It should be possible to embed images (and possibly other non-textual
material)
It should allow searching ('Find')
It should support entity management.
[I could add lots more, but I suspect that this gives you an idea of the
increasing range.]
Note that there is a lot of experience in the SGML (sic) community about
creating editors and it's worth talking to experienced people and getting
demos to find out exactly what the range of things you really want is.
>
>(* this might be as simple as allowing them to copy&paste from another
>window.)
>
>What I generally envisage is a kind of toolbar/wizard oriented editor
>where the user selects the type of document they want to edit by
>choosing a DTD. Then at each stage of editing they are presented with
>only the elements appropriate as children of the currently selected
>element. A wizard should be able to help them build complex elements &
>attributes. Basically at every stage of the editing process the document
>should be valid.
'every stage' means that every keystroke in a text window must be checked
for validity. It would be impossible to type a start tag without the end
tag. So I suspect you will allow some relaxation of this :-)
>
[...]
>
>I would be grateful for any and all help that anyone in the XML-Dev
>community can provide. In particular I would be interested in :-
>
>1. helpful resources and/or technologies
>2. estimates of how hard this might be to develop
>3. existing projects or code
>4. people willing to collaborate on such a development
>
>Obviously if anyone has a strong opinion that this particular kind of
>tool is going to be commercially available soon (e.g. Front page,
>NetObjects Fusion, ...) I would be interested in those as well.
If you are simply interested in getting a usable editor (i.e. your
documents are more important than the tools to create them), it may be
worth waiting. If you are impatient, or have an application (like I do)
that requires a bespoke editor, read on.
1. The com.sun.java.swing class library is undoubtedly the single most
powerful Java resource that I know about. It's freely available, the source
is open and it is being used by thousands. The only downside is that it is
so comprehensive that it takes a lot of effort to get to grips with. This
is mainly because developing editors is much tougher than you might think :-)
As an example there are nearly 50 classes in the swing.tree package and a
similar number in swing.text. I am almost certain that everything you need
to create a high-quality XML browser/editor is there (except, of course,
the parser/API :-). I don't know whether it's a spinoff from hotjava, but
the text classes pay homage to SGML as their inspiration.
2. To do a full job, starting from scratch is hard. To do a partial job ...
depends how partial. BUT...
3/4. I have rewritten JUMBO2 to use Swing wherever possible. I am making
the source public (in the next few days). I would be delighted for this to
act as a seed in a communal project. JUMBO2 uses SAX to choose parsers,
uses JTree/DefaultMutableTreeNode to give a Tree-based display, uses JTable
for attribute display and editing, uses DefaultStyledDocument for the text,
etc. The main things I am concentrating on now are: how to apply
namespaces; how to apply simple style interactively; how to validate
partially formed documents (I will do this with a SAX1.0-compliant
validating parser when one appears).
There is a lot to be gained by doing this collaboratively. For example, I
have encountered a few buglets I can't track down (e.g. icons don't display
reliably). I'd really like to concentrate on the XML stuff, while I'm sure
there are Swing experts out there who would take a fraction of the time.
P.
>Matt Mower, Information Systems Team, University of North London
>T: +44-(0)171-753-3288 F: +44-(0)171-753-5120 E: m.mower@unl.ac.uk
If you are interested in meeting in a pub, I live in London.
Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|