Results 1 to 1 of 1
Thread: JAXB Binding
- 06-11-2010, 10:06 PM #1
Member
- Join Date
- Jun 2010
- Posts
- 1
- Rep Power
- 0
JAXB Binding
Hi!
I tried to parse a schema using XJC and got the following errors:
So I read that I should write an external bindings file. The relevant journalpublishing3.xsd snippet is:[ERROR] Property "Title" is already defined.
line 1185 of file:/C:/Users/Lenovo/Desktop/XSD%20Generated%20Java%20Classes/XS
D-Blue/journalpublishing3.xsd
[ERROR] The following location is relevant to the above error
line 1227 of file:/C:/Users/Lenovo/Desktop/XSD%20Generated%20Java%20Classes/XS
D-Blue/journalpublishing3.xsd
[ERROR] Property "MiOrMoOrMn" is already defined.
line 132 of file:/C:/Users/Lenovo/Desktop/XSD%20Generated%20Java%20Classes/XSD
-Blue/ncbi-mathml2/presentation/scripts.xsd
[ERROR] The following location is relevant to the above error
line 138 of file:/C:/Users/Lenovo/Desktop/XSD%20Generated%20Java%20Classes/XSD
-Blue/ncbi-mathml2/presentation/scripts.xsd
Where I've denoted the relevant lines in red.Java Code:<xs:element name="bio"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" ref="sec-meta"/> <xs:element minOccurs="0" ref="label"/> [B][COLOR="Red"] <xs:element minOccurs="0" ref="title"/>[/COLOR][/B] <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="address"/> <xs:element ref="alternatives"/> <xs:element ref="array"/> <xs:element ref="boxed-text"/> <xs:element ref="chem-struct-wrap"/> <xs:element ref="fig"/> <xs:element ref="fig-group"/> <xs:element ref="graphic"/> <xs:element ref="media"/> <xs:element ref="preformat"/> <xs:element ref="supplementary-material"/> <xs:element ref="table-wrap"/> <xs:element ref="table-wrap-group"/> <xs:element ref="disp-formula"/> <xs:element ref="disp-formula-group"/> <xs:element ref="p"/> <xs:element ref="def-list"/> <xs:element ref="list"/> <xs:element ref="tex-math"/> <xs:element ref="mml:math"/> <xs:element ref="related-article"/> <xs:element ref="related-object"/> <xs:element ref="disp-quote"/> <xs:element ref="speech"/> <xs:element ref="statement"/> <xs:element ref="verse-group"/> </xs:choice> <xs:element minOccurs="0" maxOccurs="unbounded" ref="sec"/> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="fn-group"/> <xs:element ref="glossary"/> <xs:element ref="ref-list"/> </xs:choice> </xs:sequence> <xs:attribute name="id" type="xs:ID"/> <xs:attribute name="rid" type="xs:IDREFS"/> <xs:attribute name="content-type"/> <xs:attribute name="specific-use"/><xs:attribute ref="xlink:type"/> <xs:attribute ref="xlink:href"/> <xs:attribute ref="xlink:role"/> [COLOR="Red"][B] <xs:attribute ref="xlink:title"/>[/B][/COLOR] <xs:attribute ref="xlink:show"/> <xs:attribute ref="xlink:actuate"/> </xs:complexType> </xs:element>
I'm not quite sure why the XJC compiler thinks that "xlink:title" and "title" are the same, but I'm assuming it has something to do with the colon being a break character. There is a schema included with the zip I dowloaded called "xlink.xsd" Is the compiler missing the reference to the external file? That would be strange since journalpublishing3.xsd includes a declaration:
My question is: If I write an external binding to change the ref property for one of these, will I have to change the original name that these are a reference to, and will I have to change all the references to it as well? How do I go about fixing these errors?Java Code:<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
Last edited by Fusebox; 06-11-2010 at 10:46 PM.
Similar Threads
-
Trouble binding a Java Bean to XML using JAXB
By jazzy_jeff in forum XMLReplies: 0Last Post: 05-04-2010, 10:10 PM -
Jaxb
By Paul Richards in forum XMLReplies: 1Last Post: 08-03-2009, 09:56 PM -
JAXB Marshalling
By akbar4ums in forum XMLReplies: 1Last Post: 12-20-2008, 04:39 AM -
Custom XML to Java Type Binding using JAXB
By surajkumar in forum XMLReplies: 0Last Post: 09-02-2008, 12:32 PM -
JAXB Unmarshalling
By prateek in forum XMLReplies: 0Last Post: 07-10-2008, 06:53 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks