camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Validation supporting schemas with includes?
Date Mon, 31 Oct 2011 16:51:59 GMT

On Sunday, October 30, 2011 11:21:41 PM Christian Müller wrote:
> I wanted to add the missing unit test for handling multiple schema file,
> but it doesn't work. :-(
> I made a test where a root schema file imports a nested schema file. Bot
> schema file was valid. But I got an exception by starting the route. I
> think to support multiple schemas, we have to use
> schemaFactory.newSchema(Source[] sources);
> instead of
> schemaFactory.newSchema(Source source);
> but I'm not sure. We have to figure it out...
> 
> Feel free to open a JIRA to track this issue as improvement.

This is one of those things that's really hard to get working.   And it also 
tends to "break".   Includes are a bit different than imports and just doing 
Source[] doesn't really work either as it still calls the Resolver if the [] 
doesn't have them in "perfect" order (the leafs first).   If you want a 
starting point for some code, look into the CXF EndpointReferenceUtils class.     
There is a SchemaLSResourceResolver class right at the top that makes some 
attempts at this.    It's gone through many iterations trying to get something 
to work and it seems to work OK now.   

Dan



> 
> Best,
> Christian
> 
> On Sat, Oct 29, 2011 at 10:04 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
> > On Fri, Oct 28, 2011 at 1:13 PM, Lars <lars.stuevold@ergogroup.no> wrote:
> > > I'm using Camel 2.8.2 and I try to use the Validator with a schema
> > > which includes other schemas?
> > > Is this functionality supported?
> > > If yes, how do I specify the schemas?
> > 
> > Have you tried to include the other schemas from a schema file?
> > I assume you can use some sort of xsd:include or xsd:import or whatever
> > you do.
> > 
> > > Lars Stuevold
> > > 
> > > --
> > 
> > > View this message in context:
> > http://camel.465427.n5.nabble.com/Validation-supporting-schemas-with-inc
> > ludes-tp4945655p4945655.html> 
> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> > 
> > --
> > Claus Ibsen
> > -----------------
> > FuseSource
> > Email: cibsen@fusesource.com
> > Web: http://fusesource.com
> > Twitter: davsclaus, fusenews
> > Blog: http://davsclaus.blogspot.com/
> > Author of Camel in Action: http://www.manning.com/ibsen/
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Mime
View raw message