You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Jacek Laskowski <ja...@hp.com> on 2003/09/26 13:55:21 UTC
o.a.g.client.Launcher and its LocalEntityResolver
Hi,
Yesterday I worked on the sample files Jeremy had sent recently and the
problem with xml parsing hit me again. That's because I worked offline,
so LocalEntityResolver wasn't able to handle
http://www.w3.org/2001/xml.xsd and
http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd.
They're not file:// urls and are not stored in Geronimo's local store of
schema files, so when Geronimo couldn't resolve it it handed it over to
a XML parser that in turn tried to fetch the files from the original
location.
Currently, Geronimo can resolve only the most known schemas, but I think
we should introduce a configuration file where a user will be able to
map a publicId to systemId. That solution would have at least two
benefits over the present LocalEntityResolver:
1. it would differentiate between http://x.com/xml.xsd and
http://y.com/xml.xsd
2. a user wouldn't have to copy a schema to the schemas' directory,
but would have it elsewhere
Here's a bit more explanation:
The 1st benefit is crucial as now Geronimo looks up a schema by
stripping off the last part of systemId (e.g.
http://x.com/a/path/xml.xsd --> xml.xsd) and tries to get at the file in
the local repository. Doing so, it doesn't care about the location of
the systemId, so http://x.com/a/path/xml.xsd and
http://y.com/foo/xml.xsd point to the same file - xml.xsd.
The 2nd one makes working offline a bit easier. Beside what's already
said we could map any URL to a local file and wouldn't have to change
anything, but the mapping file.
If we all agree with the outlined solution, LocalEntityResolver's ctor
would change its signature and accept a file reference to the
configuration file instead of directory.
How do I handle the parsing - xmlbeans, xbeans or what?
Also, shouldn't o.a.g.xml.deployment.EntityResolverTest (core module)
change its name to o.a.g.xml.deployment.LocalEntityResolverTest? I'm
going to create a few unit tests, but it would be much easier if I could
already be working on the class with the valid name. Am I supposed to
send a patch for it?
Pozdrawiam,
-Jacek
Re: o.a.g.client.Launcher and its LocalEntityResolver
Posted by Dain Sundstrom <da...@coredevelopers.net>.
On Friday, September 26, 2003, at 06:55 AM, Jacek Laskowski wrote:
> Currently, Geronimo can resolve only the most known schemas, but I
> think we should introduce a configuration file where a user will be
> able to map a publicId to systemId. That solution would have at least
> two benefits over the present LocalEntityResolver:
>
> 1. it would differentiate between http://x.com/xml.xsd and
> http://y.com/xml.xsd
>
> 2. a user wouldn't have to copy a schema to the schemas' directory,
> but would have it elsewhere
That is a really good idea. I suggest you make it an MBean so you can
manage the list on the fly, which other MBeans can add additional
schemas as they load. It will also help in debugging the system.
-dain
/*************************
* Dain Sundstrom
* Partner
* Core Developers Network
*************************/