> I am having a problem getting the Entity Resolver working with XJC. i am
> using JAXB version 1.02 and Windows XP.
>
> In my bindings file (JAXBBinding3.xjb) I have the following:
>
> <jxb:bindings schemaLocation="datatypes.xsd" >
>
> where datatypes.xsd is the schema that has name collisions.
>
> In my catalog file (catalog.cat) I have the following
>
> SYSTEM "datatypes.xsd"
> "file:///C:/WSAD-IE5-WS/Workspace-01/JAXB/dt/datatypes.xsd"
>
> and my xjc command is as follows:
>
> C:\Data\etp>xjc -b JAXBBinding3.xjb -catalog catalog.cat ......
>
> but I get the error
> [ERROR] "file:/C:/Data/etp/datatypes.xsd" is not a part of this
> compilation
> line 4 of JAXBBinding3.xjb
>
> I could put the full path name in the bindings file, but I don' t think
> that is the correct solution.
This does seem like a bug.
>
> Can someone also explain why Entity Resolving with the XJC JAXB
> compiler is different than when you use Entity Resolving at runtime?
> What I mean is that at runtime I use a Catalog.properties file to define
> the Catalog.xml files that hold the entity resolving statements. These
> are in xml format as defined at
> http://java.sun.com/webservices/docs/1.2/jaxb/catalog.html but the
> catalog examples in JAXB samples/catalog-resolver use simple text files
> without any mention of the Catalog.properties file. Can anybody explain
> this?
Catalog.properties is an optional file you don't have to use. And Sun's
"XML Entity and URI Resolver" implementation supports many formats,
including the XML based one and TR9401.
So you can use either format and it should work.
> Also, if you use the full path name of the bindings file, and it has a
> space in it, then XJC won't work even if you surround the filename in
> quotes.
Thanks. I'll look into it. You can file a bug in the issue track if
you'd like to keep track of it.
regards,
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net