users@jaxb.java.net

Can't Generate Java Classes

From: Khalid <kishaque_at_MLTVACATIONS.COM>
Date: Thu, 05 Dec 2002 11:17:24 -0700

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