[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

MIME

  • From: Peter@u... (Peter Murray-Rust)
  • To: xml-dev@i...
  • Date: Sat, 01 Mar 1997 18:16:03 GMT

converting mime
I believe that the use of MIME types for interacting with legacy data
has great potential for XML.  I'd welcome comments on the following 
ideas.

Many legacy documents have been registered as MIME types, and are also capable
of being represented as structured documents.  This means that an XML
application is capable of reading MIME types on-the-fly and converting to
XML internally.  (The only key requirement is that the document description is
well-defined and stable so that it possible to write a DTD (or meta-DTD)
for it.)  

I have done this for my JUMBO parser.  It is able to read in ~12 MIME types
(belonging to chemistry) in native form.  It then converts them into a
Tree object internally and as it parses the document serially, 
adds Nodes and Attributes where appropriate. This is isomorphic to the 
equivalent XML document and can be displayed in the GUI,
edited, etc. and written out as XML.  It is obviously capable of SD searches
as well. The average user therefore sees JUMBO as a universal browser and
possibly as a transformation tool (though _writing_ legacy formats from an
arbitrary tree is usually difficult and information is lost).

The architecture is (fairly) simple.  Each MIME type requires a Java
subclass of SGMLTree.  As the (FORTRAN) document is read, it is poked into the
nodes as appropriate.  One enormous advantage of this is that the order
of the data in the document doesn't cause any problems in writing the
code (whereas for a conventional parser it can be a nightmare - 'have we
already read this section?').  I am still amazed at how valuable this
simple tree-building is.  Of course, SD search techniques can then be 
used to add contextual information for processssing or the tree can be
reordered, pruned, etc.

I think it would be enormously valuable to have MIME->XML converters for
helping us at the editing stage.

This may be easier than we think.  Reading the Java Beans spec (a few months
old, so it may have changed), there are statements like:

'... the [current proposal] .. is that the MIME namespace for data types
shall be used by _DataFlavors_' [an interface for transferable data].

'we want [Java beans] to be able to pretend to be an Excel document inside
a Word document'.

This implies that interfaces (?IDLs) will be produced for common MIME types.
It should therefore be possible to obtain Word, Excel, GIF, RTF, etc. beans.
The XML immplementation would then be:

legacy--[bean]-->JavaInterface--[Java application]-->SDinMemory--[DTD]-->XML

I haven't kept in close touch with Beans, (although I have played with the
beta-release and it's very powerful for what I want to do).  If we could
offer Java browsers for common MIME types, with automatic viewing, editing
merging and transformation into XML, it could be a very attractive way of
bringing people into this arena.

	P.

[The only downside is that the magic of XML is completely hidden from
the user :-)]

-- 
Peter Murray-Rust, domestic net connection
Virtual School of Molecular Sciences
http://www.vsms.nottingham.ac.uk/

xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo@i... the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.