OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: XML as an alternative to Object Serialization?

[ Lists Home | Date Index | Thread Index ]
  • From: Peter Murray-Rust <peter@ursus.demon.co.uk>
  • To: xml-dev@ic.ac.uk
  • 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
that is
>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
something like:
  <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
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary

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)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS