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

Re: XObjects (was TLAa was SOX)

  • From: "Bill la Forge" <b.laforge@j...>
  • To: <tyler@i...>, "Graham Moore" <graham.moore@d...>, <peter@u...>
  • Date: Thu, 8 Oct 1998 09:54:36 -0400

inputsource document
>I like XObjects. XObjects IS what we are doing. Its like CLOS - common lisp
>object system.


XObjects captures it perfectly.

>anyway interfaces.........
>
>>        public interface Bindings
>>        {
>>                        public org.w3c.dom.Document
>>                convert(org.xml.sax.InputSource inputSource)
>>                       throws SAXException;
>>        }
>
>i think the above is at the right level. Is this part of a domBuilder
>interface?
>
>if so should 'convert' be 'build'
>
>        public interface domBuilder
>        {
>                        public org.w3c.dom.Document
> build(org.xml.sax.InputSource inputSource)
>                        throws SAXException;
>
>          public org.w3c.dom.Document  build(org.xml.sax.InputSource
>inputSource, org.w3c.dom.Document mappingDOM)
>                        throws SAXException;
>
>          etc.
>        }
>
>The second prototype is an example of how generic binding types might be
>specified. The mappingDOM contains information regarding the instantiation
>of the DOM from the inputSource.
>
>graham.


One area I always need advice on is the names of things. I'm happy with
build and DomBuilder. (I'm thinking Java, so I've capitalized the interface
name.)

When a DomBuilder object is built from a BindingsML document, the DomBuilder
object is the root element of the DOM tree (as defined by BindingsML).
Lets say we have an object, domBuilderBuilder, itself a DomBuilder object,
which builds DomBuilder objects from BindingsML documents:

    Document
myMLBindingsDoc=bindingsBindings.build(myMLBindingsInputSource);
    Element root=myMLBindingsDoc.getDocumentElement();
    DomBuilder myMLBuilder=(DomBuilder)root;
    Document applicationDoc=myMLBuilder.build(applicationInputSource);

The above code then achieves the same effect as the second build method.
Likely best handled as a static method.

So I think we could have only one method in the DomBuilder interface. And
it may be best to have that interface NOT extend any other interface.
That way we can simply subclass existing systems, which already build
DOM trees from XML documents.

For example, the Docuverse class com.docuverse.dom.DOM has
a openDocument which does a build. So we could subclass it and
get immediate conformance. (With only a little care needed to
handle the exceptions properly.)

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.