users@jaxb.java.net

Re: Resolve the schema location from the classpath?

From: Malachi de Ælfweald <malachid_at_gmail.com>
Date: Sun, 3 Aug 2008 07:59:14 -0700

Nice job!

On Sun, Aug 3, 2008 at 4:46 AM, Aleksei Valikov <valikov_at_gmx.net> wrote:

> Hi folks,
>
> I have resolved both issues discussed in this thread.
>
> 1. I've added a new <catalogResolver/> option to the
> maven-jaxb2-plugin. You can use this option to configure a custom
> catalog resolver (must be a subclass of
> com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver). In
> your subclass you may override a method like
> getResolvedEntity (String publicId, String systemId) so implement your
> own entity resolution.
>
> 2. I've written the
> org.jvnet.jaxb2.maven2.resolver.tools.ClasspathCatalogResolver which
> is capable of handling classpath:com/acme/foo/myschema.xsd links.
>
> 3. Concerning the question by Malachi, it appeares that the catalog
> specification can handle this just fine. There is a reqriteSystem (or
> REWRITE_SYSTEM) element for instance allows to specify that everything
> at http://www.acme.com/foo should be read from classpath:com/acme/foo:
>
> REWRITE_SYSTEM "http://www.acme.com/foo" "classpath:com/acme/foo"
>
> 4. I've updated the catalog and episode tests/samples so you can take
> a look how it's done.
>
>
> For examples, take a look at the following two tests:
>
>
> https://maven-jaxb2-plugin.dev.java.net/svn/maven-jaxb2-plugin/trunk/tests/catalog/
>
> https://maven-jaxb2-plugin.dev.java.net/svn/maven-jaxb2-plugin/trunk/tests/episodes/
>
> All these changes are done in version 0.6.1, will be released this evening.
>
> Bye.
> /lexi
>
> Bye.
> /lexi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>