[ 
https://issues.apache.org/jira/browse/XERCESJ-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13233197#comment-13233197
 ] 

Michael Glavassevich edited comment on XERCESJ-1558 at 3/20/12 4:37 AM:
------------------------------------------------------------------------

Hi Alexander,

> 1) Is it really actual for now?

It's a feature of StAX that Xerces doesn't exist yet support if that's what 
you're asking. We've been gradually getting help from the community on building 
a StAX implementation. All of the serialization parts still need work.

> 2) As I understand such XMLStreamWriter implementation could be well 
> localized (in a couple or little more classes), because I just should 
> Implement a class, matching [1] specification. Of course, there may be some 
> helper classes. Am I right with it?

At the very least there needs to be an XMLOutputFactory (the thing that creates 
XMLStreamWriters) and an XMLStreamWriter implementation, so that's two classes, 
plus any other helper classes you need to support a StAX serializer.

> 3) I have downloaded Xerces and Xalan sources and take a short look on them. 
> But I haven't really understood about existing serializers. Is it about 
> something under org.apache.xml.serializer namespace? Should I use something 
> from there or should just use provided Writer or OutputStream?

Yes, org.apache.xml.serializer.* is the base Xalan serializer. You could use 
this as the base for the XMLStreamWriter (e.g. SerializerFactory and 
SerializationHandler) if you choose.

> 4) At the first look there are not a lot of work (this description is really 
> simplified):

There's more than that, for instance:

- the creation and initialization of the serializer
- managing and recycling of resources which have been returned in close()
- handling of flush() when the XMLStreamWriter is in various states
- error handling / reporting; message files
- build.xml updates, e.g. to include a 
META-INF/services/javax.xml.stream.XMLOutputFactory file

Depending on your interest, the scope of the project could be expanded to 
include more parts of the StAX serialization API (e.g. XMLEventWriter).

Thanks.
                
      was (Author: [email protected]):
    Hi Alexander,

> 1) Is it really actual for now?

It's a feature of StAX that Xerces doesn't exist yet support if that's what 
you're asking. We've been gradually getting help from the community on building 
a StAX implementation. All of the serialization parts still need work.

> 2) As I understand such XMLStreamWriter implementation could be well 
> localized (in a couple or little more classes), because I just should 
> Implement a class, matching [1] specification. Of course, there may be some 
> helper classes. Am I right with it?

At the very least there needs to be an XMLOutputFactory (the thing that creates 
XMLStreamWriters) and XMLStreamWriter implementation, so that's two classes, 
plus any other helper classes you need to support a StAX serializer.

> 3) I have downloaded Xerces and Xalan sources and take a short look on them. 
> But I haven't really understood about existing serializers. Is it about 
> something under org.apache.xml.serializer namespace? Should I use something 
> from there or should just use provided Writer or OutputStream?

Yes, org.apache.xml.serializer.* is the base Xalan serializer. You could use 
this as the base for the XMLStreamWriter (e.g. SerializerFactory and 
SerializationHandler) if you choose.

> 4) At the first look there are not a lot of work (this description is really 
> simplified):

There's more than that, for instance:

- the creation and initialization of the serializer
- managing and recycling of resources which have been returned in close()
- handling of flush() when the XMLStreamWriter is in various states
- error handling / reporting; message files
- build.xml updates, e.g. to include a 
META-INF/services/javax.xml.stream.XMLOutputFactory file

Depending on your interest, the scope of the project could be expanded to 
include more parts of the StAX serialization API (e.g. XMLEventWriter).

Thanks.
                  
> GSoC: Implement the StAX XMLStreamWriter
> ----------------------------------------
>
>                 Key: XERCESJ-1558
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1558
>             Project: Xerces2-J
>          Issue Type: New Feature
>          Components: StAX
>    Affects Versions: 2.11.0
>            Reporter: Michael Glavassevich
>              Labels: gsoc, gsoc2012, mentor
>
> Xerces does not yet have an XMLStreamWriter (the interface in StAX which 
> writes/serializes an XML document). I think a basic implementation of an 
> XMLStreamWriter (one that can write to a java.io.OutputStream and 
> java.io.Writer) would be a good GSoC project.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to