Next Previous Up Contents
Next: Writing VOTables
Up: Reading VOTables
Previous: Streamed access

6.3.4 Standards Conformance

The VOTable parser provided is believed to be able to parse correctly any VOTable document which conforms to the 1.0 or 1.1 VOTable recommendations. In addition, it will happily cope with documents which violate the standard in that they contain extra elements or attributes; such elements or attributes will be inserted into the resulting DOM but ignored as far as producing StarTables goes. In general, if there is something obvious that the parser can do to make sense of a document outside of the letter of the standard, then it tries to do that.

There is currently one instance in which, by default, the parser deliberately violates the standard, as a workaround for an error commonly encountered in VOTable documents. According to the standard, if a FIELD (or PARAM) element is declared like this:

   <FIELD datatype="char"/>                 (1)
it is considered equivalent to
   <FIELD datatype="char" arraysize="1"/>   (2)
that is, it describes a column in which each cell contains a single character (the same remarks apply to datatype="unicodeChar"). In fact, when people (or machines) write (1) above, what they usually mean is
   <FIELD datatype="char" arraysize="*"/>   (3)
that is, it describes a column in which each cell contains a variable length string. Working to the letter of the standard, this can lead to columns in which only the first character of the string in cell is visible. As a workaround therefore, by default STIL interprets (1) above to mean (3). If you want to inhibit this behaviour and use the interpretation which is strictly correct (so that (1) means (2)), you can do it from within the program by using the VOElementFactory.setStrict method, or from outside the program by setting the system property votable.strict="true".


Next Previous Up Contents
Next: Writing VOTables
Up: Reading VOTables
Previous: Streamed access

STIL - Starlink Tables Infrastructure Library
Starlink User Note 252
STIL web page: http://www.starlink.ac.uk/stil/
Author email: m.b.taylor@bristol.ac.uk
Starlink: http://www.starlink.ac.uk/