I know this isn't what you asked...
In my scenario I only validate uploads of XML docs (very small percentage of site's use). My site's "contract" is that any files existent on the server are valid to the schema. For me it was easiest to create an action that basically invokes Xerces dom.ASBuilder.main against the uploaded file and the XSD schema and succeeds or fails as appropriate. Then the regular sitemap logic can be used to provide feedback to the user.
It isn't as clever as hooking right into the stream as you propose but it was expedient for my situation.
Maybe this helps if you don't have to validate too many documents and can afford the disk writes/reads.
Best regards Steve
From: "Stephanie Zohner" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: "Cocoon Users" <[EMAIL PROTECTED]> Subject: Sitemap Component for XML Validation? Date: Mon, 29 Sep 2003 13:57:52 +0200
Hi,
I would like to validate (with an XML Schema) a SAX Stream in the sitemap before it is processed in the next sitemap component. Does anybody know of a component (Transformer) that can validate an XML Stream against a specified XML Schema? Or do I have to implement it myself. Has anybody already imlemented a similar component? Would an implementation with JAXB (Java Architecture for XML Binding) be a good approach?
Thanks,
Stephanie
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
High-speed Internet access as low as $29.95/month (depending on the local service providers in your area). Click here. https://broadband.msn.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
