Sorry for the late response on this. I support the overall idea of moving towards comon serialization code. I have few questions though. Where the code would reside and in what package ? You have expressed the desire of putting common code in xml-commons but you have said that Xalan serializer would become the main code base. Is the plan to put that code in xml-commons ?
Please read more inline..
Elena Litani wrote:
We've compared the HTML and XHTML serializers and found that Xalan's
serializers have better performance and conformance to the HTML
specification.
That's good :-)
Therefore, as a first step, we would like to deprecate the HTML and XHTML serializers in Xerces. To migrate, users should start using the JAXP Transformation API, for example // Create an "identity" transformer - copies input to output Transformer t = TransformerFactory.newInstance().newTransformer();
// for "XHTML" serialization, use the output method "xml" // and set publicId as shown t.setOutputProperty(OutputKeys.METHOD, "xml"); t.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, "-//W3C//DTD XHTML 1.0 Transitional//EN"); t.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd");
// For "HTML" serialization, use t.setOutputProperty(OutputKeys.METHOD, "html");
// Serialize DOM tree t.transform(new DOMSource(doc), new StreamResult(System.out));
Currently, we are investigating what it would take for us to deprecate Xerces' XMLSerializer, since our serializer provides a DOM Level 3 implementation and Xalan's serializer does not have this functionality.
I would like to more here, since XMLSerializer has DOM L3 LS functionality. Would this class also move to Xalan ? Who would maintain this class ? Xalan/Xerces committers ?
In general, as JAXP 1.3 comes out users should not be using Xerces or Xalan serialization code directly. Instead, the JAXP Transformer API should be used to serialize HTML, XHTML, and the SAX and DOM Level 3 API should be used to serialize DOM.
Well, To serialize above mentioned document types, users can still use JAXP 1.2 until JAXP 1.3 comes out :-) Though JAXP 1.3 is not final yet, but JAXP 1.3 apis will be perfectly backward compatible with JAXP 1.2
Thanks, Neeraj
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
