[ http://nagoya.apache.org/jira/browse/XALANJ-1205?page=history ]

Henry Zongaro updated XALANJ-1205:
----------------------------------

    Priority: Major  (was: Blocker)

> setParameter() does not work when using transformation chaining
> ---------------------------------------------------------------
>
>          Key: XALANJ-1205
>          URL: http://nagoya.apache.org/jira/browse/XALANJ-1205
>      Project: XalanJ2
>         Type: Bug
>   Components: JAXP
>     Versions: 2.4Dx
>  Environment: Operating System: Windows NT/2K
> Platform: PC
>     Reporter: Robbie

>
> 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");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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

Reply via email to