TIBCOSoftware / genxdm

GenXDM: XQuery/XPath Data Model API, bridges, and processors for tree-model neutral access to XML.
http://www.genxdm.org/
9 stars 4 forks source link

Provide input and output adapters for easier integration with existing APIs #89

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We have considered that existing APIs ought to be modified in order to make use 
of GenXDM, typically by replacing DOM-related abstractions with XDM 
abstractions. Many APIs, however, do not make use of a tree model internally 
(or make use of a custom model), but instead provide a means of supplying XML 
input, and generate XML output onto provided abstractions.

For input (into such an API), common abstractions (apart from DOM Node) include 
InputStream, Reader, InputSource (SAX), XMLStreamReader (StAX), and less 
commonly File, URL, (StAX) XMLEventReader, and javax.xml.transform Source 
(which is a bad API to implement, as it's no more than a marker and leads to a 
proliferation of hard-coded support mistakes, rather than providing a unifying 
API). Propose: we implement the more common of these interfaces, as a facade 
over Cursor, in the input-output processor.

For output (from such an API), common abstractions are OutputStream, Writer, 
(SAX) ContentHandler, and (StAX) XMLStreamWriter, with less common File, (StAX) 
XMLEventWriter, and probably others. Propose: we implement the more common of 
these as drivers for a FragmentBuilder.

Original issue reported on code.google.com by aale...@gmail.com on 16 Jul 2012 at 4:10

GoogleCodeExporter commented 9 years ago
in process

Original comment by aale...@gmail.com on 18 Jul 2012 at 1:30

GoogleCodeExporter commented 9 years ago
We have CursoryInputStream and CursoryReader for input, and we have 
NodeBuilderContentHandler (based on SAX) for output. That was all done around 
r349. I'm going to mark this one completed; if we want *more*, we should say 
exactly what else it is that we want (these three seem to have assuaged well 
over 90% of the demand, possibly 100%).

Original comment by aale...@gmail.com on 23 Oct 2013 at 9:36