users@jaxb.java.net

Re: Multiple schema and maven plugin

From: Josyula Jagadeesh <josyulajj_at_yahoo.com>
Date: Wed, 6 Jun 2007 19:31:23 -0700 (PDT)

Hi lexi,

Many thanks for your inputs.

I could generate the jaxb classes, using the xjb bindings.

I had a problem when i place two jaxb bindings in a single .xjb file.
(i.e)

<jaxb:bindings
        version="1.0"
        xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd">
   
    <jaxb:bindings schemaLocation="first.xsd" node="/xs:schema">
        <jaxb:schemaBindings>
            <jaxb:package name="org.main.purchase.po"/>
        </jaxb:schemaBindings>
    </jaxb:bindings>

    <jaxb:bindings schemaLocation="second.xsd" node="/xs:schema">
         <jaxb:schemaBindings>
             <jaxb:package name="org.main.item.itm"/>
         </jaxb:schemaBindings>
     </jaxb:bindings>
 
</jaxb:bindings>

The error was second.xsd is not a part of this compilation.

Greatly appreciate your help.


----- Original Message ----
From: Aleksei Valikov <valikov_at_gmx.net>
To: users_at_jaxb.dev.java.net
Sent: Wednesday, June 6, 2007 2:40:09 AM
Subject: Re: Multiple schema and maven plugin

Hi.


  I have the following error message with my maven compile

[ERROR] [ERROR] XPath evaluation of "/xs:schema" results in empty target node.

My XML schema dose have xs,



...


    <?xml version="1.0" encoding="UTF-8"?>
<jaxb:bindings
        version=" 2.1"
        xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
        xmlns:xs=" http://www.w3.org/2001/XMLSchema "
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
        xsi:schemaLocation=" http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd ">








I think there's a trailing space in xmlns:xs, maybe it produces the error?

Bye.
/lexi





       
____________________________________________________________________________________
Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php