I'm wondering about StAXSource support in Xalan v2.7.1.
I've inherited a piece of code that creates a
javax.xml.transform.stax.StAXSource object, which is then fed into a
schema validator producted by a javax.xml.validation.SchemaFactory. When
validating, the schema validator creates a
javax.xml.transform.Transformer from a
javax.xml.transform.sax.SAXTransformerFactory. Now, when my transformer
factory is set to
"com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl",
everything works fine, but when it's set to
"org.apache.xalan.xsltc.trax.TransformerFactoryImpl", I get the message,
"ERROR: 'Source object passed to ''{0}'' has no contents.'", followed
by the exception, "javax.xml.stream.XMLStreamException: Trying to write
END_DOCUMENT when document has no root (ie. trying to output empty
document)".
Questions:
1. What's the difference between "com.sun.org.apache.xalan.*" and
"org.apache.xalan.*"?
2. Is one better to use versus the other?
3. If "com.sun.org.apache.xalan.*" has StAXSource support (even if it's
just a wrapper for SAX), why doesn't "org.apache.xalan.*"?
4. I came across a blurb that indicated that the
"com.sun.org.apache.xalan.*" was based off of "org.apache.xalan.*"
v2.6.0, but I think that was an older version of the JRE. I'm currently
working with Java 6 update 16. What version of "org.apache.xalan.*" is
"com.sun.org.apache.xalan.*" based off of in this JRE?
---
Myles Bunbury, P.Eng., BASc.
Software Development Engineering Specialist
Omni Access 8550 Web Services Gateway
Security Solutions Group - Applications Software Group
Alcatel-Lucent
Phone: (613) 784-4325
Fax: (613) 784-8944
Web: www.alcatel-lucent.com