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

Re: YAXPAPI (Yet Another XML Parser API)- an XDEV proposal

  • From: "Don Park" <donpark@q...>
  • To: "Tim Bray" <tbray@t...>, <xml-dev@i...>
  • Date: Sat, 13 Dec 1997 16:05:47 -0800

com.ms.xml.om api
>Hmm, your proposal is coherent, but why is it better?  It's certainly a
>bit more complex than what I proposed, and I'd need to see evidence that
>my proposal fails to meet the needs of the basic application programmer.


>From the parser writer's point of view, they would rather create their own
object model than changing the code to produce W3C DOM objects which will be
incompatible with the version deployed in IE 4.0.  My proposal allows
parsers like MSXML to remain unchanged and still support W3C DOM.
Furthermore it allows application programmers to access MSXML objects for
features not supported by W3C DOM.

public class XmlObject {
    Object peer;
    public Object getPeer () { return peer; }
}

public class XmlDocument extends XmlObject { ... }

XmlDocument obj;
Object peer = obj.getPeer();
if (peer instanceof com.ms.xml.om.Document) {
    com.ms.xml.om.Document elem = (com.ms.xml.om.Document)peer;
    elem.setOutputStyle(XMLOutputStream.PRETTY);
    ...

My proposal makes it easier for parser writers to support the standard API
and it does not limit applications programmers to the functionalities in the
standard API.  I have designed object-oriented software for fifteen years
and I have learned from past mistakes that, while what I propose might seem
more complex, it will meet the harsh reality of the marketplace better.

>One of the things I did with Lark was hook it up to the Swing Tree
Renderer/
>JTree package, got a nice little XML document tree-walker, even works with
>Unicode fonts; I only needed calls like the ones I outlined and it was
>no big deal. - Tim

The reason I mentioned Swing's TreeModel was to point out the way it allows
any tree structure to be used as model for JTree.  It is true that you can
use JTree's default model but then you end up with two models: XML document
tree and JTree's default model tree which is resource intensive.

Don



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.