Re: PROPOSAL (round 2): Extensions to MDR XMI API
Libor Kramolis <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.devel |
|---|---|
| Organization | Sun Microsystems, Inc. |
| Message-ID | <[email protected]> |
Hello,
I am new here, so can just comment API from XML point of view ...
Martin Matula wrote:
> [snip]
>>
>> 8. I recommend renaming methods in OutputTarget as follows:
>> rename getByteStream to getOutputStream
>> rename getCharacterStream to getWriter
>> These are the names used for similar methods in
>> javax.servlet.ServletResponse.
>
>
> I wanted to be consistent with xml API, rather than servlet API. In
> org.xml.sax there is a class called InputSource. OutputTarget was meant
> to be the same thing but for output. So I used the same names as in
> InputSource.
SAX is older API, maybe that JAXP is better for inspiration:
http://java.sun.com/xml/jaxp/dist/1.1/docs/api/
http://java.sun.com/xml/jaxp/dist/1.1/docs/api/javax/xml/transform/sax/SAXResult.html
http://java.sun.com/xml/jaxp/dist/1.1/docs/api/javax/xml/transform/sax/SAXSource.html
http://java.sun.com/xml/jaxp/dist/1.1/docs/api/javax/xml/transform/stream/StreamResult.html
http://java.sun.com/xml/jaxp/dist/1.1/docs/api/javax/xml/transform/stream/StreamSource.html
i.e. getOutputStream() and getWriter() methods.
They also introduced Source and Result interfaces, maybe you could use
it instead of InputSource and OutputTarget.
>
> [snip]
> Martin
>
Regards,
Libor
--
Libor Kramolis, Software Engineer | <[email protected]>
NetBeans/Sun Microsystems, XML Project | http://xml.netbeans.org/