Hi,
sound absolutely brilliant to me. How about raising a new feature
request at
http://jira.codehaus.org/browse/CASTOR
with the very same information attached ? Most likely it will be me or
Joachim joining you in getting this done and integrated.
If you have any questions re: Castor and its internals, feel free to ask.
Regards
Werner
PS One more question: are you deliberately using the 'pretty printing'
feature of Castor ? 'cause if not, there's no dependency to Xerces anymore.
PSS With SVN trunk, we have completely revamped how SAX parsers get
created, removing the dependency on Xerces for (un)marshalling
completely. In other words, Xerces is required only when you want to use
the pretty printing during marshalling.
[EMAIL PROTECTED] wrote:
Hello,
I am using castor 1.1.2 on Java >= 5 and would like to avoid shipping an
extra Xerces with my application. Therefore, I unset the
org.exolab.castor.parser property so that castor looks for a parser
through JAXP and I set the org.exolab.castor.xml.serializer.factory
property to org.exolab.castor.xml.XercesJDK5XMLSerializerFactory.
Unfortunately, XercesJDK5XMLSerializerFactory explicitly uses the
non-public com.sun.org.apache.xml.internal.serialize package. Therefore,
it might not work on future Java versions or non-Sun java
implementations. I wondered if it was not possible to write an
XMLSerializerFactory that uses just the public API of Java 5. It seems
to me that this can be done rather easily using the javax.xml.transform,
javax.xml.transform.stream and javax.xml.transform.sax packages.
org.exolab.castor.xml.XMLSerializerFactory ->
javax.xml.transform.sax.SAXTransformerFactory.
(getSerializer() -> newTransformerHandler())
org.exolab.castor.xml.Serializer ->
javax.xml.transform.sax.TransformerHandler +
javax.xml.transform.stream.StreamResult
Almost all the OutputFormat properties can be found in
javax.xml.transform.OutputKeys and can be set on TransformerHandler with
getTransformer().setOutputProperty().
If no-one else wants to try I might do so myself, so please tell me what
you think of the idea.
Best regards,
M. Ringler
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email