December 1, 2001
This is the second patch release of class generator v9.0.1
August 1, 2001
This is the first patch release of class generator v9.0.1
April 17, 2001
This is the production release of class generator
Oracle XML Class Generator 9.0.0.0.0A Beta
Mar 31, 2001
This is the second beta release of class generator
Bug fixes:
Bug#1480409 THE CLASS GENERATOR TRANSLATES '(#PCDATA)'
INTO '(#PCDATA)*'
Oracle XML Class Generator 9.0.0.0.0 Beta
Jan 25, 2001
XML Class generator generates a set of Java source files based on an input DTD or Schema. The generated classes can be used to programmatically construct XML documents. It also optionally generates javadoc comments on the generated source files.
The Oracle XML Class Generator requires Oracle XML Parser and Oracle Schema Parser.
The Class Generator consists of DTD Class Generator and the Schema Class
Generator which could be invoked from a common command line utility called
oracg.
Schema Class Generator Features:
General
- A Java class is generated for each top level element (i.e. global element), simpleType element and complexType element.
- The classes corresponding to the top level elements (i.e global elements) extend CGXSDElement.
- The type hierarchy among the elements is maintained in the generated
java classes. If the complexType or simpleType element extends any
other complexType or simpleType element, then the class corresponding to
them extends the base type simpleType or complexType element. Otherwise,
they extend CGSXDElement class.
Namespace
- For each namespace, a package is created and corresponding to the elements in the namespace, the java classes are generated in that package. If there is no namespace defined, then the classes are generated in the default package. If targetNamespace is specified in the schema, then a package name is required to generate the classes.
- If there is a namespace defined then the user needs to specify the package name through the command line utility. The number of packages specified should match the command line arguments corresponding to the package names.
- There is a single distinct symbol space within a given target namespace for each kind of definition and declaration component identified in XML Schema, except that within a target namespace, simple type definitions and complex type definitions share a symbol space. Within a given symbol space, names are unique, but the same name may appear in more than one symbol space without conflict. For example, the same name can appear in both a type definition and an element declaration, without conflict or necessary relation between the two. In such conflict situation, the class name generated corresponding to the simpleType/complexType element is appended with the key work "Type".
- Any methods which takes the 'type' of an element (corresponding to
which there is a generated java classes) as parameter takes the fully
resolved name with the package name to avoid conflict.
Oracg utility
- The oracg utility is used to invoke the DTD or Schema class generator depending on the input arguments given. The various input arguments supported are:
-h
Prints the help message text
- d <dtd file>
DTD file (.dtd file)
- s <schema file>
Schema file (.xsd file)
- o <Output dirname> Output
directory
- c
Comment option
- p <package name/s>
the package names corresponding to namespace
Details about classes generated for top level element
- A class corresponding to the element name is generated in the package associated with the namespace.
- The element has a method called setType to set the type of the element in the element class. The setType takes fully resolved pacakge name to avoid conflict.
- If the element has inline simpleType or complexType, a public static class inside the element class is created which follows all the rules specified in the simpleType/complexType. The name of the public static class is Element name suffixed by Type. e.g if the element name is PurchaseOrder which has an inline complexType definition, then the public static inner class will have the name PurchaseOrder_Type
- The name clash in class names between elements and complexType using "Type" as sufix.
- The element name and namespace is stored inside the element class (which could be used for serialization & validation )
- A validate method is provided inside the elements to accept an XMLSchema object to validate.
- A print method is provided inside the element to print the node.
Details about classes generated for top level complexType elements
- If the complexType element is a top level element, then a class is generted in the package assoicated with the namespace. If the complexType element extends a base type element, then the class corresponding to the complexType element also extends the base Type element. Otherwise, it extends the CGXSDElement class.
- The class contains fields corresponding to the attributes. The fields are made protected, so that they can be accessed from subtypes. The fields are added only for the attributes that not present in the base type.
- The class contains methods to set and get attributes.
- For each local element, a public static class is created exactly
similiar to top level elements, except that it will be completely inside
the complexType class.
Details about the classes generated for simpleType elements
- A class is generated for each top level simpleType element
- The hierarchy of the simpleType element is maintained in the generated class. If the simpleType element extends a base class then the class corresponding to the simpleType element also extends the base class corresponding to the base element. Otherwise the simpleType element extends the CGXSDElement class.
- If the simpleType element extends the schema data type, then the class class extends the class corresponding to the schema data type. (e.g., if the base type is string, then the schema equivalent class is taken as XSDStringType etc)
- The class contains a field to store the simpleType value.
- The constructor of the simpleType element class sets the schema facets
- The constructor sets the simpleType data value (XSDDataValue) in the constructor after validating against the facets.
Oracle XML Class Generator 2.0.0.0.0 Beta
October 12, 2000
Bug fix in Class Generator
New features in Class Generator
A command line utility called oracg is included to invoke the DTD and Schema Class generator to generate classes based on DTD and Schema respectively.
This release includes Schema Class Generator (Beta version) based on Schema Specification (W3C Working Draft 22 September 2000)
Bug# 1410656 :The generated files searches the java CLASSPATH
to locate and load the DTD file.
New features in Class Generator
A command line utility called oracg is included to invoke the DTD and Schema Class generator to generate classes based on DTD and Schema respectively.
This release includes Schema Class Generator (Beta version) based
on Schema Specification (W3C Working Draft 22 September 2000)
Oracle XML Class Generator 1.0.2.0.0
May 18, 2000
Changes:
Bug fix for #1179636 - Add support for adding CData Section Bug fix for #1305125 - Cannot insatiate multiple document classes
Oracle XML Class Generator 1.0.1.0.0
September 30, 1999
This release of XML Class Generator requires XML Parser Version 2.
Changes:
Bug fixes for #959042, i.e., Fixed the default encoding of XML output; #959057, i.e., validateContent function need to throw InvalidContentException.
NOTE: See v2changes.txt and the .diff difference files in the sample directory for changes required to use XML Parser Version 2
This is the first production release.
Oracle XML Class Generator 1.0.0.1.0
April 9, 1999
Fixed a bug #860168 to handled DTD having Java keywords as attributes. Added functionality to serialize the DTD, instead of re-parsing the text DTD.
New APIs in the following Classes:
1. oracle.xml.classgen.ClassGenerator
-setSerializationMode( Sets
flag to determine if the DTD should be saved as a serialized object or
as text file)
Oracle XML Class Generator 1.0.0.0.0
January 15, 1999
The Oracle XML Class Generator, written in Java, will generate a set of Java source files based on an input DTD. The generated Java source files can then be used to construct, optionally validate, and print a XML document that is compliant to the DTD specified. This is an early beta release.
The licensing agreement is found in LICENSE. The XML Class Generator is currently available only for testing purposes. We expect to make it available for commercial use in the future.
Please post any questions, comments, or bug reports to the XML Forum on the Oracle Technology Network at http://technet.oracle.com. At this time OTN is your only support resource.
The Oracle XML Class Generator requires Oracle XML Parser. The XML Document, printed by the generated classes, confirms to the W3C recommendation for Extensible Markup Language (XML) 1.0.
The Oracle XML Class Generator can optionally generate validating Java source files. It also optionally generates Javadoc comments in the source files.
The Oracle XML Class Generator supports the following encodings for printing the XMLDocument: UTF-8, UTF-16, ISO-10646-UCS-2, ISO-10646-UCS-4, US-ASCII, EBCDIC-CP-US, ISO-8859-1, and Shift_SJIS. ASCII is the default encoding if none is specified. Any other ASCII or EBCDIC based encodings that are supported by the JDK may be used.
The following directories and files are found in the release:
license.html - licensing agreement
readme.html - this file
doc/ - API documentation
lib/ - contains the XML Class Generator archive
sample/ - contains examples of how to use the XML Class
Generator