Thanks for all the feedback I received. It helped me understand why I had a problem and led me to a solution. The XSL Transformation could not be incremental; it would have to collect the entire tree before processing and then it would use what ever value the parameter had at the time. I would hazard this processing is triggered by the ContentHandler.endDocument() event.

The solution I went with was to create a custom ContentHandler to use when each of the raw XML streams was being processed. This ContentHandler looked for a specific element and then introduced a new element with the value I was trying to set by parameter.

I have chain of Sax handlers which is effectively a XMLReader chained to
SAXTransformer chained to a custom ContentHandler chained to a
Serializer.   I am actually parsing multiple XML input streams to
generate a single output XML stream.   The custom Content Handler
suppresses all but the first startDocument() event and the last
endDocument() event to keep the Serializer which is generating the
single XML output from getting upset.

This is the net chain; my actually chain contains some custom "tee"
ContentHandlers and additional flows of SAX events, but I don't believe
those to be germane to my problem.

I need to change a parameter with the SAXTransformer for each file
processed.  This parameter is used to generate an output element for
each file processed. I can do a setParameter() followed by a
getParameter() and see that the parameter is changed in the Transformer.
  This is done for each file before doing a XMLReader.parse().

My problem is that the elements in the output XML which represent this
changing parameter only have the last value this parameter was set to.
I've tried doing a Transformer.clearParameters() between
XMLReader.parse() actions, but that appears to have no affect.

I would think that each XMLReader.parse() execution and so each XSL
Transformation would be independent of each other. I don't see how
anything other than the value of this changing parameter can be
propagating through the custom ContentHandler given the signatures of
the ContentHandler methods.



-- Edward L. Knoll Phone (FedEx) : (719)484-2717 e-mail (FedEx) : [EMAIL PROTECTED] e-mail (personal) : [EMAIL PROTECTED]



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



Reply via email to