Menu

#7 XML schema producer for control classes

open
5
2007-08-08
2007-08-08
Sam Huang
No

The suite can generate XML Schema for control classes derived from AbstractControl.

Spec:
1. Input either a class file or a directory of class files;
2. Output either a DTD or a XSD file for the input classes;

Design:
begin a new schema;
while(the class is not of AbstractControl){
element = add a new element with the name of the class;
list = get the setter properties of the class;
for each(element in the list) {
add a new attribute to the current element;
}
class = get the base class of the current class;
}
end the schema.

Issues:
1. How to determine which elements are mandatory?
A: Annotation in Java 5.0 may solve this issue, the use of an external configuration file for storing this information in situations of below Java 5.0 JVMs.
2. When input is a package or a directory, how to get the underlying classes and subordinate packages or directories?

Discussion

  • Sam Huang

    Sam Huang - 2007-08-08
    • labels: --> subproject-xmlns
    • assigned_to: nobody --> samhuang
     
  • Sam Huang

    Sam Huang - 2007-08-08
    • summary: Schema generator for control classes --> XML schema producer for control classes
     

Log in to post a comment.

Monday.com Logo