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=13237>. 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=13237 setParameter() does not work when using transformation chaining Summary: setParameter() does not work when using transformation chaining Product: XalanJ2 Version: 2.4Dx Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: org.apache.xalan.transformer AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] When using transformation chaining, the setParameter()-method does not work. The parameter is not passed to the stylesheet. When just using a normal transformation (not chaining) it works fine. The difference is that for chaining, the TransformerIdentityImpl is used instead of the TransformerImpl. In the TransformerIdentityImpl, the parameter is just put in a Hashtable and nothing is done with it afterwards. example: SAXTransformerFactory stf = (SAXTransformerFactory) TransformerFactory.newInstance(); XMLFilter filter = stf.newXMLFilter(new StreamSource("test.xslt")); StreamResult sr = new StreamResult(System.out); Transformer transformer = stf.newTransformer(); SAXSource transformSource = new SAXSource(filter, new InputSource ("test.xml")); transformer.setParameter("testParam", "value"); transformer.transform(transformSource, sr); I made it work by hacking into Xalan: - add a getter method in the TrAXFilter class for the m_transformer field. - after creating an XMLFilter from the SAXTransformerFactory, do the following: Transformer transformer = ((TrAXFilter)filter).getTransformer(); transformer.setParameter("testParam", "value");
