Hi Shameera, Shameera Rathnayaka <[email protected]> wrote on 12/04/2013 02:12:42 PM:
> Hi Michael, > > On Tue, Apr 9, 2013 at 1:08 AM, Michael Glavassevich <[email protected] > > wrote: > > For the implementation I was thinking that the Xalan serializer (currently > used for DOM serialization) could be used as a base, with the > XMLStreamWriter wrapping that to handle the StAX specific processing. > > It seems Xerces uses org.apache.xml.serializer.dom3.LSSerializerImpl > of Xalan to serialize the DOM object. In LSSerializer which is > implemented by LSSerializerImpl, has three ways to serialize DOM > 1. boolean write(org.w3c.dom.Node node, org.w3c.dom.ls.LSOutput lsOutput) > 2. boolean writeToURI(org.w3c.dom.Node node, java.lang.String s) > 3. java.lang.String writeToString(org.w3c.dom.Node node) > > As you suggest we can call these three method under our > XMLStreamWriter implementations accordingly. But I have some concern > how we use this serializer for StAX implementations, > To leverage the same serializer(Writing Nodes to output streams) we > need to know complete model of that XML node, it seems to be again > DOM inside the XMLStreamWriter not StAX. Do i missing something here? No, you wouldn't use those DOM methods. LSSerializerImpl is an extension of Xalan's base serializer. I was suggesting that you could build a StAX serializer on top of Xalan's base serialization support (see the main org.apache.xml.serializer package). I believe those methods look more like SAX, allowing you to stream the result. You should not need to build an in-memory model of the document. > Thanks, > Shameera. > > > An > XMLEventWriter could be layered on top of the XMLStreamWriter. > > If you'd like to get a feel for what a good proposal looks like (content > and structural wise) there's a number of successful GSoC proposals from > previous years up on the Xerces Wiki [1] which are great examples. > > Thanks. > > [1] http://wiki.apache.org/xerces/FrontPage > > Michael Glavassevich > XML Technologies and WAS Development > IBM Toronto Lab > E-mail: [email protected] > E-mail: [email protected] > > Shameera Rathnayaka <[email protected]> wrote on 06/04/2013 02:12:02 > AM: > > > Hi devs/Michael Glavassevich, > > > > I have successfully done 2012 GSOC with Apache Axis2. In that I > > wrote a StAX XMLStreamWriter/Reader implementation to provide XML > > info-set using JSON input and output streams[1]. AXIOM use that to > > get the XML infoset. > > > > Xerces has proposed similar requirement which is to implement StAX > > XMLStreamWriter[2]. I have talked abut this under particular jira > > issue. Thought it would be good talk more about how to create an > > excellent proposal for that in dev list other than ruin the jira issue > :). > > > > As i have mentioned we can provide XMLOutputFactory api which > > provide StAX XMLStreamWriter via createXMLStreamWriter(OutputStream > > stream), createXMLStreamWriter(OutputStream stream, String encoding) > > and createXMLStreamWriter(Writer stream). > > > > Above implementatinos , Documentation and unit test to cover those > > functionalities would perfectly match with GSOC scope. WDYT? > > > > Regars, > > Shameera > > > > [1] https://issues.apache.org/jira/browse/AXIS2-5270 > > [2] https://issues.apache.org/jira/browse/XERCESJ-1558 > > > > -- > > Best Regards, > > Shameera Rathnayaka. > > > > Blog : http://shameerarathnayaka.blogspot.com/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] Thanks. Michael Glavassevich XML Technologies and WAS Development IBM Toronto Lab E-mail: [email protected] E-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
