You can maybe plugin a custom resource resolver and let it return null /empty or something.
Check the docs https://github.com/apache/camel/blob/master/camel-core/src/main/docs/validator-component.adoc And you can find some unit tests that test this resolver On Tue, Feb 21, 2017 at 6:55 PM, Leber, Thomas <thomas.le...@omnetric.com> wrote: > Hi, > > I'm using the camel validator component to validate an XML. The XML has a DTD > declaration inside. This points to a relative path, where I don't want to > have the DTD. > > <!DOCTYPE ScheduleMessage SYSTEM "../scheduleV2r3/dtd/schedule-xml.dtd"> > > Is there any way to disable the DTD validation or resolve the declared DTD to > a path where I want to have the DTD? > > I tried until now to use the VM property: > > -Djavax.xml.stream.supportDTD=false > > but I had no luck with that. > > While stepping trough the code I also noticed that, between different starts > of camel, it uses once the StAX implementation and another time the SAX. Any > glue why? I'm using all the time the same file and not changing the code. > > This question is x-posted on > http://stackoverflow.com/questions/42374455/apache-camel-disable-dtd-validation-or-resolve-to-relativ-path > > Best Regards, > Thomas Leber -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2