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
- 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.
- 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]
- Web services were implemented based on these classes.
- The client and server code for the web service including the ADQL classes
can be generated using :-
- wsdl.exe tool on .Net platform for .Net languages
- apache axis for java
The ADQL schema generation until now (ADQL ver 0.7.1 and before)
- The code for the ADQL class library was written in C#.
- The code for region classes were generated from Arnold Rots Space Time
coordinates Schema using the xsd.exe tool.
- The generated region classes were included in ADQL.
- ADQL.dll the class library was generated by compiling the C# code.
- 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 :-
- Select only the schema with ADQL classes.
- Open in XMLspy and remove all duplicate namespaces and modify the
references to those namespaces.
- Remove reference to local copies of the region and coords schemas and
instead import the corresponding schemas on Arnold Rots website.
- Add documentation of xml annotation to each newly added type or element.
- 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.