Hi Khalid,
jaxb-1.0-beta supports only XML Schema and the binding architecture has
changed. Please see docs/users-guide/index.html in your installation
directory and the FAQ:
http://java.sun.com/xml/jaxb/faq.html.
Regards,
--
Ed Mooney |Sun Microsystems, Inc.|Time flies like
Java Web Services |UBUR02-201 |an arrow, but
Ed.Mooney_at_Sun.COM |1 Network Drive |fruit flies like
781-442-0459 |Burlington, MA 01803 |a banana. Groucho
Khalid wrote:
> Here is my Simple Book.dtd
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!--DTD generated by XML Spy v4.4 U (http://www.xmlspy.com)-->
> <!ELEMENT book (title, preface)>
> <!ELEMENT preface (#PCDATA)>
> <!ELEMENT title (#PCDATA)>
>
>
> Here is my Simple Book.xjs
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <xml-java-binding-schema version="1.0-ea">
> <options package="example"/>
> <element name="Book" type="class" root="true">
> <content property="preface" />
> <content property="title" />
> </element>
> </xml-java-binding-schema>
>
> And here is the error message I get when I try to generate classes using xjc
> /------------------- START ERROR Message--------------------------/
> schema_reference.4: Failed to read schema document 'file:///C:/Projects/JAXB/xml
> /Book.xjs', because 1) could not find the document; 2) the document could not be
> read; 3) the root element of the document is not <xsd:schema>.
> line 3 of Book.xjs
>
> Failed to parse a schema.
> C:\Projects\JAXB\xml>xjc -p Book.dtd Book.xjs
> parsing a schema...
> s4s-elt-schema-ns: The namespace of element 'xml-java-binding-schema' must be from the schema namespace.
> line 3 of Book.xjs
>
> s4s-elt-invalid: Element 'xml-java-binding-schema' is not a valid element in schema document.
> line 3 of Book.xjs
>
> schema_reference.4: Failed to read schema document 'file:///C:/Projects/JAXB/xml
> /Book.xjs', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. line 3 of Book.xjs
>
> Failed to parse a schema.
> /------------------- END ERROR MESSAGE --------------------------/
>
>
>
>
> Any suggestions???
>
> Thanks
>
> --Khalid