Re: Bug(s) in definition of <DEFINITIONS> and <INFO>?

From: Steve Lowe <slowe-at-head-cfa.harvard.edu>
Date: Tue, 12 Nov 2002 09:18:09 -0500


In addition to the question of maintaining the official definition of the VOTable schema as it evolves, I'm also interested in the easiest way to keep development code in sync with the schema.

I appreciate Ed Shaya's comment earlier on this group that XML binders only get you part of the way to an implementation. Nevertheless, I think the example of Roy & Co.'s JAVOT, generated by the Breeze binder, suggests that the binder can help, especially for the parts of the schema that is mainly defining a set of nested data structures. JAVOT was definitely helpful to us in implementing some FITS-to-VOTable conversion. As the schema evolves, though, the Java classes will have to be re-created, and so we may all need language-to-XML binders. Is it the opinion of the XML experts here that Breeze is the way to go? I took a look at Sun's JAXB, which I should stress is a currently beta version, and it's Java-code output was less transparent than JAVOT, and also lacked the Javadoc comments that made JAVOT a lot easier for us to navigate.

On the other hand, I must point out that the definition of DEFINITIONS apparently confused Breeze. Here is a simple example in which it leaves out the <DEFINITIONS> tag when it creates an XML file. I don't know whether the problem is caused by the <xs:all ... maxOccurs=unbounded> being non-compliant or by something else.

import VOTableUtil.*;
import java.io.*;

class testdef {
  public static void main(String[] args) throws Exception {

        Votable votable = new Votable();
        OutputStream votableStream = System.out;
        Definitions d = new Definitions();
        votable.setDefinitions( d );
        Param p = new Param();
        p.setId("p");
        d.setParam( p );
        votable.marshal( votableStream );
  }
}

produces the output:

<?xml version="1.0" encoding="UTF-8"?>
<VOTABLE>

        <PARAM ID="p" />
</VOTABLE>

Any ideas on the code-maintenance question in general?

Steve

Markus Dolensky wrote:
>
> Francois Ochsenbein wrote:
> > BTW, following Markus' message, shouldn't the XML-Schema and DTD be
> > referred as http://xml.ivoa.net/VOTable.xsd ?
> > or some similar name ?
>
> Hi Francois,
>
> yesterday's message about the status of the new domain ivoa.net you were
> referring to just went to the IVOA chair plus a few others in the CC
> list, but not to the votable forum.
>
> Nonetheless, it appears natural to create a VOTable topic based on the
> collaborative tool TWiki hosted at www.ivoa.net which will include the
> schema file VOTable.xsd and DTD. So, before advertising a new URL
> pointing to the schema file let us set this up in a way that allows
> trusted users to update and maintain the VOTable pages remotely.
>
> Markus
>
> +---
> | Markus Dolensky Mailto:Markus.Dolensky-at-eso.org
> | AVO Senior System Engineer Web: www.euro-vo.org
> | Voice: ++49 89 32006/261 Fax: ++49 89 32006/480
> +---

-- 
Steve Lowe
Smithsonian Astrophysical Observatory
Harvard-Smithsonian Center for Astrophysics
slowe-at-cfa.harvard.edu
1-617-496-1661
Received on 2002-11-12Z15:20:00