I'm working on a subclass of AbstractSAXTransformer. It produces XML by exec of another program. The input stream from the exec(ed) process is parsed into a DOM and passed to sendEvents() to move down the pipeline.

The DOM creation part of this seems to work - I can transform the resulting DOM and output its xml to System.out. However when I pass that DOM's root element to sendEvents(), no events are produced to the serializer following this transformer. Am I not using sendEvents() properly? Any tips on using sendEvents()?

We're running cocoon 2.1.4 with j2sdk1.4.1_02 on linux. Below is the main part of the code:

                Runtime rt = Runtime.getRuntime();
                Process p = rt.exec(cmd,envp);
                InputStream is = p.getInputStream();

DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance();
dFactory.setNamespaceAware(false);
DocumentBuilder dBuilder = dFactory.newDocumentBuilder();
Document doc = dBuilder.parse(is);
Node root = (Node) doc.getDocumentElement();
super.sendEvents( root );


TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();


                DOMSource source = new DOMSource(doc);
                StreamResult result = new StreamResult(System.out);
                transformer.transform(source, result);

Thanks in advance.



Bill Parod
Architect for Scholarly Technologies, Academic Technologies
1970 Campus Drive, Evanston, IL 60208
[EMAIL PROTECTED]  847-491-5368


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to