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

From: Steve Lowe <slowe-at-head-cfa.harvard.edu>
Date: Fri, 08 Nov 2002 16:20:29 -0500


I just noticed what I think are some bugs in the definiton of the <DEFINITIONS> element in VOTable.xsd (http://us-vo.org/xml/VOTable.xsd).

First, the verbal definition in section 3.1 of the VOTable description (Version 1.0 (15 Apr 2002) at
http://www.us-vo.org/VOTable/VOTable-1-0.htm) implies that only one <COOSYS> element can occur, whereas the .xsd contains

      <xs:all minOccurs="0" maxOccurs="unbounded">

<xs:element ref="COOSYS" minOccurs="0"/>
<xs:element ref="PARAM" minOccurs="0"/>
</xs:all> which seems to imply an intention that COOSYS and PARAM can occur any
number of times.

Secondly, according to the W3C spec (http://www.w3.org/TR/xmlschema-1/ section 3.8) <all> can't take maxOccurs="unbounded" anyway, nor can the elements within it. The definition probably needs to be

      <xs:sequence>

<xs:element ref="COOSYS" minOccurs="0"/>
<xs:element ref="PARAM" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>

The JAVOT package currently has methods Definition.setParam() and Definition.setCoosys() functions, instead of addParam() and addCoosys(), so only one PARAM and one COOSYS can be inserted into a DEFINITIONS. This shows that Breeze didn't follow the "unbounded" directive (at least not something that permits generating xml with multiple PARAMs in a DEFINITIONS). Also, I think also that the <restriction> in <INFO> should be <extension> instead because it allows additional attributes (W3C spec section 2.2.1.1). I haven't looked at the JAVOT code to see what Breeze did with that.

In case anyone is interested, I ran across this while trying out Sun's JAXB XML binder (beta). It's apparently more strict than Breeze (which created JAVOT). But then on the other hand, after changing the apparently non-conforming elements in the .xsd, JAXB crashed, so maybe I shouldn't depend on Sun's beta code!

Does the group have a plan for how the VOTable xsd will be updated? As we start developing new metadata elements, this will become more of an issue.

Steve

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