Lists Home |
Date Index |
- From: Peter Murray-Rust <email@example.com>
- To: firstname.lastname@example.org
- Date: Fri, 16 Jan 1998 11:02:38
At 18:39 13/01/98 -0500, Tyler Baker wrote:
>Steven Ball wrote:
>> I have done this as part of my TclXML package - an XML generator.
>> The generator takes a XML DTD and creates a Tcl command for each element
>> and entity. A Tcl script then calls these commands, nested to reflect the
>> resultant document's structure, with appropriate arguments for attributes,
>> to produce an XML document.
[Haven't seen the full posting... has TclXML been announced?]
> Looked at it briefly and seemed like a great tool for webmasters and web
>content developers, but I am doing work for a standalone application so
>why I need to do this within Java only.
Tcl is a great language for this sort of thing. Joe English wrote CoST in
tcl and I added a tk GUI (costwish) which took exactly this approach. (I
even used colonized names :-). I miss the ability in Java to add
scripts/commands to elements "in clear". The JUMBO approach is to create a
Java class for each element (or the subset that I don't want default
processing for) and to point to this class (bytecode) using a schema file
(using the prototypic namespace ideas in the public domain). Example:
<?xml:namespace href="jumbo/play/schema.xml" as="PLAY"?>
points <PLAY:STAGEDIR> to the PLAY namespace. Within the schema file is
<HELP>... lots of lovely XML-structured help ...</HELP>
Of course I make this up as I go along, and I hope that there will be some
public confluence of approaches here :-). The software is then able to:
- recognise PLAY:STAGEDIR as belonging to a schema.
- find the icon and draw a pretty picture
- locate the help tree under a help icon
- load the STAGEDIRNode class. This class overrides some or all methods
such as process(), display(), toString(), toSGML(),
drawUnscaledObject(Graphics), editContent(), editAttributes(). etc.
(Of course editContent() is a no-op for PLAY :-)
If the document contains a single namespace, but does not have colonized
names, or has colonized names and non-colonized names I have a fudge which
works quite nicely but probably shouldn't be publicly posted :-) or it
might make some people ill.
BTW I shall be releasing a new snapshot of JUMBO with this feature before
Feb 4 (that's a deadline).
Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)