ADQL usage and schema generation steps

Below given are the way ADQL was initially used and later how the schema was generated.

ADQL use without adql schema

  1. We have a ADQL BNF Grammar on the twiki page. 
    http://www.ivoa.net/internal/IVOA/IvoaVOQL/adql.ycc
    This is our standard. It is a scaled down SQL grammar, the original provided by the Visual Parse tool. A parser in C# was built using this grammar and the Visual Parse tool.
  2. The ADQL class library was written in C# to record the parsed data, additionally Arnold Rots space-time-coordinate schema was used to generate Region classes. [See below for more info on how they were generated]
  3. Web services were implemented based on these classes.
  4. The client and server code for the web service including the ADQL classes can be generated using :-
    1. wsdl.exe tool on .Net platform for .Net languages
    2. apache axis for java

The ADQL schema generation until now (ADQL ver 0.7.1 and before)

  1. The code for the ADQL class library was written in C#.
  2. The code for region classes were generated from Arnold Rots Space Time coordinates Schema using the xsd.exe tool.
  3. The generated region classes were included in ADQL.
  4. ADQL.dll the class library was generated by compiling the C# code.
  5. The xsd.exe tool is used on ADQL class library to generate XSDs. This resulted in many xsds one for space-time, one for region, one for coords, one for ADQL classes and one for namespaces & root elements.

The process has not changed much, but the ADQL code has been simplified and compacted to make the generated schema and xml look elegant.

The present way of generation (ADQL ver 0.7.3), Same as above from Steps 1. to 5. & In addition to that :-

  1. Select only the schema with ADQL classes.
  2. Open in XMLspy and remove all duplicate namespaces and modify the references to those namespaces.
  3. Remove reference to local copies of the region and coords schemas and instead import the corresponding schemas on Arnold Rots website.
  4. Add documentation of xml annotation to each newly added type or element.
  5. Change the cardinality of arrays as per the SQL requirements.

And the Schema is ready.

With this we can write xml [ (directly) or (using the C# & java adql classes) ] that conforms to the XML schema.

The schema has sufficient documentation to be a starting point for either steps.