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 "Fuller, Alex" <Al...@Lodestarcorp.com> on 2004/05/11 17:34:41 UTC
couple of questions
Hi,
I've seen some questions in the archives, but no answers for this.
I've got a transformation followed by a SAX parse in which I run a
schema validation and do a few other things (the validation prevents me
from using a SAXResult). I think I could use the
SAXTransformationFactory and XMLFilters to consolidate this operation,
but I don't see a way to set parameters on the XSLT. Is this
unsupported in a SAXTransform? I'm also assuming I could set schema
validation on the second XMLFilter so that validation would occur at
that point and not earlier. Is this true? Currently, I'm operating a
transform thread that writes to a PipedOutputStream and a parsing thread
that reads from a PipedInputStream. It seems to work, but I
occasionally get concurrency issues with the exception handling. If I
can set up some sort of filter chain it might be a better solution.
Thanks,
Alex
Re: couple of questions
Posted by Santiago Pericas-Geertsen <Sa...@sun.com>.
On Tue, 2004-05-11 at 11:34, Fuller, Alex wrote:
> Hi,
> I've seen some questions in the archives, but no answers for this.
> I've got a transformation followed by a SAX parse in which I run a
> schema validation and do a few other things (the validation prevents me
> from using a SAXResult).
Interesting, this issue is solved in the latest JAXP with the
introduction of Validators and ValidatorHandlers.
> I think I could use the
> SAXTransformationFactory and XMLFilters to consolidate this operation,
> but I don't see a way to set parameters on the XSLT.
On a TransformerHandler, you can call getTransformer() to set
parameters. I think this is what you're asking, but I'm not sure
XMLFilters will solve your problem.
> Is this
> unsupported in a SAXTransform? I'm also assuming I could set schema
> validation on the second XMLFilter so that validation would occur at
> that point and not earlier. Is this true?
Hmmm, I think you're best bet would be to give JDK 1.5.0 beta a spin. I
believe you can solve your problems with TransformerHandlers and
ValidatorHandlers.
Hope this helps.
-- Santiago