This directory contains a sample Java file to show how to use the
XML Class Generator.
-----------------------------------------------------------------

To run the demo, it is required to set the ORACLE_HOME environment
variable. If XDK is not installed in ORACLE_HOME, then set the 
ORACLE_HOME to installation root.

To run the complete demo, use the target make demo

The following is the list of files and directories:

Makefile - Makefile used to compile and run the demo in Unix.
Make.bat - Makefile used to compile and run the demo in Windows
Widl - Directory containing a sample DTD and application showing generation
       of the classes using the DTD and using the generated classes
  ./Widl/Widl.dtd - A sample DTD.
  ./Widl/Widl.xml - A sample XML file based on Widl.dtd
  ./Widl/SamplMain.java - A sample application to generate Java source files
                          based on a DTD.
  ./TestWidl.java - A sample application to construct XML document using
	            the Java source files generated by SampleMain.

Checkbook - Directory containing a sample DTD with an application showing
            data binding support
   ./Checkbook/checkbook.dtd - A sample DTD
   ./Checkbook/checkbook.xml - An XML file based on checkbook.dtd
   ./Checkbook/CheckbookApp.java - A sample application showing data binding
            from the XML file checkbook.xml to the Java objects which are 
            generated based on DTD checkbook.dtd

Trade - Directory containing a sample DTD with an application showing 
        data-binding support.
   ./Trade/trade.dtd = A sample DTD
   ./Trade/trade.xml - An XML file based on trade.dtd
   ./Trade/TradeLister.java - A sample application showing data binding 
            from the XMLfile trade.xml to the Java objects which are generated
            based on the DTD trade.dtd

Node - Directory containing a sample DTD with an application showing data-binding
       support
   ./Node/node.dtd - A sample DTD
   ./Node/node.xml - An XML file based on node.dtd
   ./Node/NodeLister.java - A sample application showing data binding from the 

Car - Directory containing a sample schema 
  ./Car/car.xsd - A sample XML Schema
  ./CarDealer.java - A sample application to construct XML document using
                     the java source generated from car.xsd using

Book - Directory containting a sample schema
  ./book.xsd - A sample XML Schema
  ./BookCatalogue.java - A sample application to construct XML document 
                         using the java sources generated from book.xsd 

Po = Directory containting a sample schema
  ./Po/po.xsd - A sample XML Schema
  ./Po/TestPo.java - A sample application to construct XML document 
                     using the java sources generated from po.xsd 
                

DTD Class Generator
--------------------

To run all the DTD sample program, use the make target 'dtd'

To run the individual sample programs, use the make target pertaining
to the sample programe dtd. 
1. make widl : This will generate the classes using Widl.dtd and the sample
               application TestWidl.java uses the generated classes to
               create java objects based on the generated classes.
2. make checkbook: This will generate the classes using the DTD checkbook.dtd
               The application program CheckbookApp.java shows data binding
               feature by loading the data from the XML file checkbook.xml
               to the Java objects.
3. make trade: This will generate the classes using the dtd trade.dtd. The
               application program TradeLister.java shows data binding feature
               by loading the data from the XML file trade.xml to the Java
               objects.
4. make node: This will generate the classes using the dtd node.dtd. The 
               application program NodeLister.java demonstrates the data 
               binding feature by loading the data from the XML file node.xml
               to the corresponding Java objects.

Schema Class Generator
----------------------

To run all the sample program, use the make target 'schema'

There are three samples - car.xsd, book.xsd, po.xsd
The classes are generated using oracg utility. For example, the 
classes corresponding to car.xsd can be generated by the command line:
oracg -comment -schema car.xsd -package package1
To use the oracg utility the PATH should include $ORACLE_HOME/bin

The classes are generated in the directory called package1

When Makefile is used to run the schema class generator demo, the
classes corresponding to car.xsd is generated in directory package1 
and the demo program CarDealer.java test the generated classes.
The output of the demo generated from the CarDealer.java is stored 
in the file car_out.txt

Similiarly, the classes corresponding to book.xsd is generated in
directory package2 and the demo program BookCatalogue.java test the
generated classes. The output is stored in the file book_out.txt

Also the classes corresponding to po.xsd is generated in directory
package3 and the demo program TestPo.java test the generated classes.
The output is stored in the file po_out.txt


