Errors in VOTable-1.1.xsd
Ray Plante
rplante at ncsa.uiuc.edu
Thu May 20 14:17:59 PDT 2004
Hi Francois,
I've had a close look at VOTable-1.1.xsd (which I got from the VOTable
twiki page) to track down some problems we are having incorporating
VOTable into a Web Service (namely, SkyNode). I have subsequently found
two errors in the schema. I also found an inconsistancy between the
prose document and the XSD.
1. Mixed content for INFO, TD, and COOSYS
The error that was the source of our difficulties has to do with the
definition of the content for INFO, TD, and COOSYS. In v1.0, these were
defined as a mixed type that extended the complex type "anyTEXT":
<xs:element name="TD">
<xs:complexType mixed="true"><xs:complexContent>
<xs:extension base="anyTEXT"> <!-- here -->
<xs:attribute name="ref" type="xs:IDREF"/>
</xs:extension>
</xs:complexContent></xs:complexType>
</xs:element>
In v1.1, this was changed to extend "xs:string":
<xs:element name="TD">
<xs:complexType mixed="true"><xs:complexContent>
<xs:extension base="xs:string"> <!-- Error! -->
<!-- xs:attribute name="ref" type="xs:IDREF"/ -->
<xs:attribute name="encoding" type="encodingType"/>
</xs:extension>
</xs:complexContent></xs:complexType>
</xs:element>
This is an error. When a complex type is declared to have complex
content, the type given in the base attribute must be a complex type.
(See http://www.w3.org/TR/xmlschema-0, section 2.5.3; and
http://www.w3.org/TR/xmlschema-1, section 3.4.3, constraint 1.)
xs:string, of course, is a simple type.
I believe the intent for these three elements was to allow them to contain
an arbitrary mix of child text and elements. If so, then the simplest
solution is to change the base type back to "anyTEXT". I don't know what
motivated the change to "xs:string".
2. Pattern for ucdType
In the definition of the simple type "ucdType", the last "-" needs to be
escaped so not to be interpreted as part of a character range. That is,
it should look like this:
<xs:simpleType name="ucdType">
<xs:restriction base="xs:token">
<xs:pattern value="[A-Za-z0-9_.,\-]*"/> <!-- Not "[A-Za-z0-9_.,-]" -->
</xs:restriction>
</xs:simpleType>
3. Inconsistant use of COOSYS attributes in example
In VOTable-1.09.pdf, the example on page 7 shows the COOSYS line:
<COOSYS ID="J2000" equinox="2000." epoch="2000." system="eq_FK5"/>
However, VOTable-1.1.xsd (as well as the 1.0 version, VOTable.xsd) define
the types for equinox and epoch to be "astroYear" which must match the
pattern "[JB][0-9]+([.][0-9]*)?". Thus, the example should look like
this:
<COOSYS ID="J2000" equinox="J2000." epoch="J2000." system="eq_FK5"/>
(FYI, the same inconsistancy existed in the 1.0 versions as well.)
I'm still testing, but I believe that correcting (1) will remove the last
stumbling block to straight-forward integration of VOTable with Web
Services.
thanks,
Ray
More information about the votable
mailing list