You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by ro...@kbc.be on 2002/10/02 16:07:02 UTC

set stylesheet parameters when using transformation chaining!

I am using the SAX Transformation chaining capabilities of Xalan. However,
setting a parameter to the transformer doesn't seem to work.

code:
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);


The parameter is not passed to the stylesheet. It works when I just
transform the xml from the commandline (org.apache.xalan.xslt.Process).

When I had a look at the code I saw that for transformation chaining, the
TransformerIdentityImpl is used instead of the TransformerImpl. The
implementation of the setParameter()-method is quiet different. The method
in the TransformerIdentityImpl only seems to put the parameter in a
Hashtable, and that's it. I don't see any place in the code where this
Hashtable is used afterwards.

Is this a bug or am I not supposed to use the setParameter()-method when
doing transformation chaining? (or am I doing something wrong)


Thanks alot for any help,
Robbie



________________________________________________
DISCLAIMER

This e-mail and any attached files are confidential and may be legally privileged. If you are not the addressee, any disclosure, reproduction, copying, distribution, or other dissemination or use of this communication is strictly prohibited. If you have received this transmission in error please notify KBC immediately and then delete this e-mail.
KBC does not accept liability for the correct and complete transmission of the information, nor for any delay or interruption of the transmission, nor for damages arising from the use of or reliance on the information.
All e-mail messages addressed to, received or sent by KBC or KBC employees are deemed to be professional in nature. Accordingly, the sender or recipient of these messages agrees that they may be read by other KBC employees than the official recipient or sender in order to ensure the continuity of work-related activities and allow supervision thereof.