You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/03/18 17:59:35 UTC
DO NOT REPLY [Bug 7212] New: -
XSLTC: can't serialize stylesheet
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7212>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7212
XSLTC: can't serialize stylesheet
Summary: XSLTC: can't serialize stylesheet
Product: XalanJ2
Version: 2.3
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Xalan-Xsltc
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: jgauthier@silverstream.com
Using xalan 2.3.1, I'm unable to serialize a stylesheet with an xsltc
TransformerFactory implementation. The same code works fine with the default
xalan TransformerFactory. The xsltc implementation will serialize a non-
namespaced xml document but not a namespaced xsl document.
Here's sample code to demonstrate the problem.
DocumentBuilderFactory domFactory =
DocumentBuilderFactory.newInstance();
domFactory.setNamespaceAware(true); // or false, doesn't matter
DocumentBuilder builder = domFactory.newDocumentBuilder();
doc = builder.parse(new FileInputStream(file_name));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
TransformerFactory tfactory = TransformerFactory.newInstance();
Transformer serializer = tfactory.newTransformer();
DOMSource domSource = new DOMSource(doc);
serializer.transform(domSource, new StreamResult(baos));
When I execute this code for any stylesheet (e.g., the identity stylesheet), I
receive the following error:
ERROR: Namespace for prefix 'mlns' has not been declared.
javax.xml.transform.TransformerException: java.lang.RuntimeException: Namespace
for prefix 'mlns' has not been declared.
at org.apache.xalan.xsltc.trax.TransformerImpl.transform
(TransformerImpl.java:547)
at org.apache.xalan.xsltc.trax.TransformerImpl.transform
(TransformerImpl.java:179)