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

Re: was Re: XML and Objects

  • From: "Bill la Forge" <b.laforge@j...>
  • To: "Peter Murray-Rust" <peter@u...>, <xml-dev@i...>
  • Date: Thu, 1 Oct 1998 08:16:19 -0400

mapping xml to objects
From: Peter Murray-Rust <peter@u...>
>To contrast SUN and JUMBO2.
>
>SUN has an XmlDocumentBuilder which is passed a list of props. These come
>from a *.props file where elementNames are mapped onto classes. The
>XmlDocumentBuilder (I don't have the code) creates new Instances of each
>subclassed object when SAX processes the event. Additional element-specific
>operations can be added through a doneParse(URI) method which a subclass
>can override.
>
>JUMBO (which was started pre-DOM and old namespaces) uses a PI to map
>namespaces onto code - a legacy of the src= attribute. It's not pretty but
>it works. It has a method processXML() which is called from SAX when an
>endElement event is encountered. [I suspect it's very similar to
doneParse().]
>
>When I create MoleculeNode I endow it with JUMBO methods and therefore it
>doesn't interoperate with SUN. I would be delighted to agree publicly on
>how to do this now. If we leave it we shall be too late and we shall have
>applications-specific )and possibly platform-specific element-oriented
>programming. This would be very sad.


Coins uses an XML Bindings file to define the mapping. I just completed the
documentation for Bindings, including examples (if not the entire web page):
        http://www.jxml.com/coins/index.html

>Here are some general points which I think we need to address now.
>
> - how do we map elements onto classes. Property file? Regexps in PIs?
>Stylesheets? or a mixture

or XML? I would argue that the mapping should be separate, except when
doing object serialization

> - what are the *non-graphics* methods for an element , e.g.:
> doneParse()/processXML()
> isValid() [i.e. non-XML validation - type, values, etc.]

The SAX interface, DocumentHandler, works rather well for much of this.

> write() - recreate XML or other formats

If a document carries a reference to its source, and that source is
writable,
then UPDATE is vital--I explored this in coins v0.

> - what are the graphics methods
> onClick(count)
> redraw()/resize() etc.


I've been looking at graphical elements of late and this looks unnecessary.
Just use wrapper elements. But the key here is to support references between
the wrapped gui objects.

>Rather than try to list more I'd like to see coordinated discussion a la
>SAX. In that case David Megginson offered to take XML-DEVers through a
>series of questions which he then collated and re-offered. The initial pass
>took only a calendar month (including year-end). But he worked VERY hard.
>
>Can we have volunteers for this? It's one of the most critical aspects of
>XML at present that is not covered by other WG programs (if this is covered
>by DOM 2.0 can we wait for this? An XML-DEV API could be a valuable
>creation anyway).


I would be delighted to participate, though I should likely not be the one
to
chair this.

Bill


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto: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.