Hi,
no, the uriResolver is used to resolve the xslt file only.
I've found a way, using a processor, that creates a XMLReader using the CatalogResolver and puts a SAXSource using this xmlReader into the exchange.
@Override
public void process(Exchange exchange) throws Exception {
InputStream inputStream = exchange.getIn().getBody(InputStream.class);
XMLReader xmlReader = XMLReaderFactory.createXMLReader();
xmlReader.setEntityResolver(new CatalogResolver());
exchange.getIn().setBody(new SAXSource(xmlReader, new InputSource(inputStream)));
}
The Transformer used by the xsltComponent will then use this xmlReader.
Dirk
-------- Original-Nachricht --------
> Datum: Tue, 19 Feb 2013 20:04:54 +0100
> Von: Claus Ibsen <
[hidden email]>
> An:
[hidden email]
> Betreff: Re: Make xslt component not to validate dtd\'s (or use local copy)
> On Tue, Feb 19, 2013 at 1:56 PM, <
[hidden email]> wrote:
> > Hello,
> >
> > We are using the camel xslt component to transform a xhtml file. But for
> > transforming the file, the used XMLReader tries to download the dtd from
> thw
> > w3c website.
> >
> > Is it possible, to tell the xslt component, to configure the xml reader
> to
> > use local version (e.g. by using xml catalogs) or not to validate dtd's
> at
> > all?
> >
>
> Hi
>
> You can use a custom uriResolver. Would that do the trick?
>
http://camel.apache.org/xslt>
> > thanks
> > Dirk
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email:
[hidden email]
> Web:
http://fusesource.com> Twitter: davsclaus
> Blog:
http://davsclaus.com> Author of Camel in Action:
http://www.manning.com/ibsen