[Conglomerate-devel] Exciting new features
Dave Malcolm
david at davemalcolm.demon.co.uk
Tue Jan 20 18:03:49 CET 2004
I've added a couple of new features relating to DTDs to Conglomerate.
The first is in the Properties dialog for a node. If a DTD if found,
the DTD tab of this dialog now has a "content model" view, showing the
valid child elements that are allowed by the DTD.
The second new feature is much more fun. The File->New assistant now
has a "Random Document" plugin.
If you select this, you reach a page where you can select a document
type from those available (based on the dispspec files loaded). You can
also specify a "depth" which is used to give an idea of how deep the
document's tree should be. Other creation parameters could easily be
added to the page if anyone feels like playing.
If a DTD is available, Conglomerate will try to ensure that the document
is valid against that DTD. It also generates random text, to really
push the unicode support (it generates random strings using most of the
full range of Unicode; I don't recognise most of the characters I see).
It's great fun generating random XHTML web pages, and random DocBook
files. Enjoy! hey, if Emacs can have a built-in psychiatrist, we can
have a built-in patient :-)
This is great for testing (I wrote it to give the new widget code I'm
writing a thorough workout) - too good in fact, as it regularly crashes
the old widget implementation (the usual problem; dup of bug 124507).
So I've added a way to turn the widget off altogether; go to
src/cong-primary-window.c and hack #define ENABLE_MAIN_WIDGET from 1 to
0 if you want to play with this feature.
There are various enhancements that could be made to the tool:
- generating attributes (doesn't do this at all yet)
- ability to select the root element. Currently it always just uses the
first element listed in the dispspec - maybe it's time we added a
"can-be-root" attribute to elements?
- it currently ignores namespaces
- being more selective about element choices, to favour the less-common
elements in the document, so as to try and cover as many different
elements as possible (good for testing).
- adding random comments, processing instructions, etc.
- maybe even a random DTD generator?
- add ability to turn off the DTD support to test how it handles grossly
invalid documents?
- perhaps allow user to select DTD files as well as dispspecs?
- RELAX NG support as well as DTDs?
- add ability to generate and use random entities
Much of the above should be doable by anyone with knowledge of Glade and
a little C. Volunteers? Suggestions? Thoughts? Flames? Randomised
hierarchical psychobabble?
--
David Malcolm
www.conglomerate.org
More information about the Conglomerate-devel
mailing list