We've done the same thing - and went with xpath and CBR - works fine. 2017-08-10 16:41 GMT+02:00 Burkard Stephan <stephan.burk...@visana.ch>:
> Hi > > I have a use case where multiple different XML schema files exist (for > different types of messages or schema versions). Whenever a message > arrives, I have to validate it against the correct schema. The correct > schema is derived from the message namespace. > > <document xmlns="A" ...> ==> use A.xsd > > <message xmlns="B" ...> ==> use B.xsd > > <message xmlns="Bv2" ...> ==> use Bv2.xsd > > Ways to implement this: > - Query the document namespace with xpath and use a content based router > to use Camel Validator with the correct schema file > - Build a validation bean with a schema map (namespace as key) and do the > validation in the bean > > Are there other/better/easier ways to implement this? > > Thanks > Stephan > > > -- -- David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen