[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: AW: [sdo] Methods to create XMLStreamReader and ContentHandler
Hi Blaise, hi all,
SDOSource and SDOResult would be a good way to
communicate with other frameworks as JAXB or
javax.xml.transform.Transformer.
To be understood by other frameworks, we have to extend
an existing well-supported Source and Result.
Well supported Sources and Results
are:
StreamSource and StreamResult,
DOMSource and DOMResult,
StAXSource and StAXResult,
SAXSource and SAXResult.
StreamSource and
StreamResult
A stream-based approach is not very efficient because
it requires always a full serialization or deserialization.
DOMSource and
DOMResult
This approach requires DOM as interim format. Because
of most SDO implementations are not based on an internal DOM representation this
would be not efficient.
StAXSource and
StAXResult
This can be implemented in an efficient
way, but it requires some implementation effort by SDO
vendors.
The StAXSource implementation requires the
XMLStreamReader-implementation I proposes in the XMLHelper
interface.
The StAXResult would require an
XMLStreamWriter that creates directly an SDO
tree.
StAXSource and
StAXResult require JAVA 6! (A StAX library is not
enough.)
SAXSource and
SAXResult
This is the way JAXB has
chosen.
An SAXSource can be
stream-based or XMLReader-based. As mentioned above, a stream-based approach is
not very efficient.
The more efficient way
requires the implementation of an XMLReader as I proposed in the XMLHelper
interface. JAXBSource has chosen that way
too.
The SAXResult requires
the SdoContentHandler, I proposed in the XMLHelper interface. JAXBResult goes a
similar way.
As a compromise we could
say that we implement SAXSource and SAXResult,
but let the vendors decide, if they implement the SAXSource the
stream-based or the XMLReader-based
way.
Stefan.
Von: Blaise Doughan [mailto:blaise.doughan@oracle.com] Gesendet: Dienstag, 24. Februar 2009 17:49 An: Buennig, Stefan Cc: sdo@lists.oasis-open.org Betreff: Re: [sdo] Methods to create XMLStreamReader and ContentHandler I like SDOContentHandler and the idea of SDOSource and SDOResult, these align well with their JAXB counterparts. I'm not so sure about the SDO implementations of XMLReader and XMLStreamReader which roughly equates to writing SAX and StAX parsers that act on SDO input. The implementation of these does not appear trivial to write. -Blaise Buennig, Stefan wrote: 45E8ACF4DC4D7148AB9A906B6B216DAD01C319F4@dewdfe1m.wdf.sap.corp type="cite"> |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]