You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "Beryozkin, Sergey" <Se...@iona.com> on 2007/09/01 23:28:01 UTC

RE: Using catalog.cat files

Thanks. I'll try to investigate what would it take to use catalog.cat...

Cheers, Sergey

-----Original Message-----
From: Dan Diephouse [mailto:dan.diephouse@mulesource.com] 
Sent: 31 August 2007 22:10
To: cxf-dev@incubator.apache.org
Subject: Re: Using catalog.cat files

Sergey Beryozkin wrote:
> Hi
>
> Can someone please explain me how and when catalog.cat files availbale
for every module are used ?
>   
I have no idea about anything catalog related...
> Another question : a validation can be disabled through the
configuration, where's the code which interacts with the Spring
validation layer (to disable the validation, for ex ?).
>
> What would be nice is to tell this validation layer to use catalog.cat
files somehow, perhaps implement a schema resolver Spring will use and
which will refer to catalog.cat files as the source of information and
then simplify the configuration significantly by removing xsi:location
and xsi ns declaration and still do the validation...
>   
The Spring ApplicationContext is responsible for validaiton. See 
BusApplicationContext.initBeanDefinitionReader for more details.
Cheers,
- Dan

-- 
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com/blog

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Re: Using catalog.cat files

Posted by Sergey Beryozkin <se...@iona.com>.
Hi

I've done some investigation and unfortunately there appears to be no way to remove
an xsi:location attribute while still doing the validation. Spring DocumentLoader delegates
to the JAXP DocumentBuilder, for ex, to the Xerces-based one. The Xerces validator would then expect
to find the schema files as specified in the xsi:location attribute.

The only way one can help the validator is to provide, through a Spring XmlBeanDefinitionReader, a custom EntityResolver which will help the underlying validator to process this xsi:location attribute. This attribute and a custom EntityResolver apppear to be the only way to tell the validator where to find the schemas...

If xsi:location is missing then the validator will need to find out about the schema locations through some other mechanism and as far as I'm aware, it would require a non-portable coding, specifically, one would need to programm directly against a xerces schema cache.

Any ideas on how to solve this problem ? The problem is not how to use catalog.cat in order to help it to validate, bur rather how to remove an xsi:location and still be asked for schema locations and use catalog.cat at that stage

Thanks, Sergey


> Hey Sergey,
> 
> I was always under the impression that the catalog.cat files were  
> used at /compile/ time, to locate schema that were imported from  
> other schema, but I could be wrong about that.  Polar knows a bit  
> about that, but he's no longer a contractor at Iona.
> 
> You could try asking him, though.  polar@adiron.com
> 
> 
> -Fred
> 
> On Sep 1, 2007, at 5:28 PM, Beryozkin, Sergey wrote:
> 
>> Thanks. I'll try to investigate what would it take to use  
>> catalog.cat...
>>
>> Cheers, Sergey
>>
>> -----Original Message-----
>> From: Dan Diephouse [mailto:dan.diephouse@mulesource.com]
>> Sent: 31 August 2007 22:10
>> To: cxf-dev@incubator.apache.org
>> Subject: Re: Using catalog.cat files
>>
>> Sergey Beryozkin wrote:
>>> Hi
>>>
>>> Can someone please explain me how and when catalog.cat files  
>>> availbale
>> for every module are used ?
>>>
>> I have no idea about anything catalog related...
>>> Another question : a validation can be disabled through the
>> configuration, where's the code which interacts with the Spring
>> validation layer (to disable the validation, for ex ?).
>>>
>>> What would be nice is to tell this validation layer to use  
>>> catalog.cat
>> files somehow, perhaps implement a schema resolver Spring will use and
>> which will refer to catalog.cat files as the source of information and
>> then simplify the configuration significantly by removing xsi:location
>> and xsi ns declaration and still do the validation...
>>>
>> The Spring ApplicationContext is responsible for validaiton. See
>> BusApplicationContext.initBeanDefinitionReader for more details.
>> Cheers,
>> - Dan
>>
>> -- 
>> Dan Diephouse
>> MuleSource
>> http://mulesource.com | http://netzooid.com/blog
>>
>> ----------------------------
>> IONA Technologies PLC (registered in Ireland)
>> Registered Number: 171387
>> Registered Address: The IONA Building, Shelbourne Road, Dublin 4,  
>> Ireland
>> 

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Re: Using catalog.cat files

Posted by Fred Dushin <fr...@dushin.net>.
Hey Sergey,

I was always under the impression that the catalog.cat files were  
used at /compile/ time, to locate schema that were imported from  
other schema, but I could be wrong about that.  Polar knows a bit  
about that, but he's no longer a contractor at Iona.

You could try asking him, though.  polar@adiron.com


-Fred

On Sep 1, 2007, at 5:28 PM, Beryozkin, Sergey wrote:

> Thanks. I'll try to investigate what would it take to use  
> catalog.cat...
>
> Cheers, Sergey
>
> -----Original Message-----
> From: Dan Diephouse [mailto:dan.diephouse@mulesource.com]
> Sent: 31 August 2007 22:10
> To: cxf-dev@incubator.apache.org
> Subject: Re: Using catalog.cat files
>
> Sergey Beryozkin wrote:
>> Hi
>>
>> Can someone please explain me how and when catalog.cat files  
>> availbale
> for every module are used ?
>>
> I have no idea about anything catalog related...
>> Another question : a validation can be disabled through the
> configuration, where's the code which interacts with the Spring
> validation layer (to disable the validation, for ex ?).
>>
>> What would be nice is to tell this validation layer to use  
>> catalog.cat
> files somehow, perhaps implement a schema resolver Spring will use and
> which will refer to catalog.cat files as the source of information and
> then simplify the configuration significantly by removing xsi:location
> and xsi ns declaration and still do the validation...
>>
> The Spring ApplicationContext is responsible for validaiton. See
> BusApplicationContext.initBeanDefinitionReader for more details.
> Cheers,
> - Dan
>
> -- 
> Dan Diephouse
> MuleSource
> http://mulesource.com | http://netzooid.com/blog
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4,  
> Ireland
>