You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Kevan Miller <ke...@gmail.com> on 2011/09/02 15:38:13 UTC

Re: missing XSD schemas on web

Hi Radim,
Thanks for the detailed explanation.

Could you generate a Jira? Agreed that this is something we should try and support.

--kevan

On Aug 29, 2011, at 1:22 AM, Radim Kolar wrote:

> Dne 29.8.2011 6:25, chi runhua napsal(a):
>> The schema files are actually under http://geronimo.apache.org/xml/ns/, not sure it's the problem of GEP validation,  might need someone else to look into the GEP code.
> I am not talking about GEP code. In GEP it might work because it probably comes comes with xsd schemas already included. I am talking about standard XML validation in any XML editor or Eclipse without GEP.
> 
> I will describe problem in more detail. If you validate against http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1, XML downloads XSD from schema location   xsi:schemaLocation="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1 http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
> 
> 
> ponto:(admin)~>fetch http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1
> web-2.0.1                                     100% of 6143  B  214 kBps
> ponto:(admin)~>
> 
> so we have got file. Now time to parse it with XML parser. File has includes inside:
> 
> ponto:(admin)~>grep -i import web-2.0.1
> <xs:import namespace="http://geronimo.apache.org/xml/ns/naming-1.2" schemaLocation="geronimo-naming-1.2.xsd"/>
> <xs:import namespace="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" schemaLocation="geronimo-application-2.0.xsd"/>
> <xs:import namespace="http://geronimo.apache.org/xml/ns/deployment-1.2" schemaLocation="geronimo-module-1.2.xsd"/>
> <xs:import namespace="http://java.sun.com/xml/ns/persistence" schemaLocation="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"/>
>                            Reference to abstract service element defined in imported
> ponto:(admin)~>
> 
> lets look at first import. We are going to import namespace http://geronimo.apache.org/xml/ns/naming-1.2 from URL http://geronimo.apache.org/xml/ns/j2ee/geronimo-naming-1.2.xsd (schema location is added to current URL) which does not exists on geronimo web server.
> 
> naming schema exists at different location
> 
> ponto:(admin)~>fetch http://geronimo.apache.org/xml/ns/naming-1.2
> naming-1.2                                    100% of   52 kB  624 kBps
> ponto:(admin)~>
> 
> but your schemas refers to xsd import files in same directory like main schema which is good because validation on XSD schemas downloaded localy will work if you dump all schemas into one directory like you do in geronimo distro. To make XML validation work locally you just need to point schema location to your geronimo install directory. something like this:
> 
> xsi:schemaLocation="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1 file:///usr/local/wasce/schema/geronimo-web-2.0.1.xsd"
> 
> and everything works. But for making validation to work over HTTP you need to upload these XSD files with xsd extension to http://geronimo.apache.org/xml/ns/j2ee/ as well to http://geronimo.apache.org/xml/ns/ You need to have them several times on web server, once for xs:import with XSD extension and second without extension for xsi:schemalocation.
> 


Re: missing XSD schemas on web

Posted by Radim Kolar <hs...@sendmail.cz>.
Could you generate a Jira? Agreed that this is something we should try 
and support.

Jira opened for this problem : GERONIMO-6141 
<https://issues.apache.org/jira/browse/GERONIMO-6141>