I'm a little confused - it might help to have an abbreviated code sample
showing how you're invoking the transformer.  Xalan doesn't know anything
implicitly about schema validation, so there's no magic bullet for this
case.

If you're already using an ErrorHandler, then why isn't that just reporting
the error as you prefer, re-throwing the exception, which should cause the
transformer to stop?

Oh, wait: are you saying that you want to replace just this one bit of data
(which happens to violate a schema constraint, which caused your
ErrorHandler's error() to fire, where you're then ignoring the error and
asking the parser and transformer to continue) with a new bit of data and
hoping the parse & transform will continue normally?  I'm not sure that
there's a generic way to replace just one value element in the middle of a
parse like this.

- Shane

---- you "Pawel Bieryt" <[EMAIL PROTECTED]> wrote ----
hi all, I use SAX to SAX transformation.
I have to parse my xml file with schema validation and
transform using the XSL stylesheet to produce SAXResult as output
of transformation.
Using the latest xalan(xalan-j_2_2_D10) and xerces (xerces-2_0_0_beta4) I
can do that
almost simultaneously (I mean I can start the transformation during the
parsing)

Let's assume I have the occurrence constraint 'minOccurs'
in my schema file. So if my xml file violates this constraint
the SAX parser raises the exception which I can handle by implementing
ErrorHandler interface (the method 'error' in this case). The SAX parser
continuos parsing...

Such processed data I have to pass to some other application. And the
problem:
I can NOT pass the data which violate the the constraints.
So can I somehow filter the input for the transformer ?
Can I somehow force the transformer not to process the data which
violate the constraints? Thanks for your help or suggestions in advance.

Reply via email to