On Wed, 29 Jun 2005, Prameela wrote:
> Hi,
>
> The new version of votable i.e VoTable1.1 introduces a new element termed GROUP. The DTD definition for the same is -
>
> <!-- GROUP can contain a description, fields/parameters and sub-groups -->
> <!ELEMENT GROUP (DESCRIPTION?, (FIELD+|PARAM|GROUP|FIELDref|PARAMref)*)>
> <!ATTLIST GROUP
> ID ID #IMPLIED
> name CDATA #IMPLIED
> ref IDREF #IMPLIED
> ucd CDATA #IMPLIED
> utype CDATA #IMPLIED
> >
>
> Does the definition (FIELD+|PARAM|GROUP|FIELDref|PARAMref)* mean that if the element has either PARAM|GROUP|FIELDref|PARAMref it should compulsorily have a FIELD element?
>
> I am a little confused with the interpretation and any pointers to the correct meaning would be greatly appreciated.
>
Prameela,
the DTD excerpt you quote would appear to mean what you think it means. However, it's not the correct definition of GROUP. At version 1.1, VOTable is defined by an XML schema not by a DTD. The relevant part is:
<!-- GROUP groups columns; may include descriptions, fields/params/groups --> <xs:element name="GROUP">
<xs:complexType>
<xs:sequence>
<xs:element ref="DESCRIPTION" minOccurs="0"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="FIELDref"/>
<xs:element ref="PARAMref"/>
<xs:element ref="PARAM"/>
<xs:element ref="GROUP"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="ID" type="xs:ID"/>
<xs:attribute name="name" type="xs:token"/>
<xs:attribute name="ref" type="xs:IDREF"/>
<xs:attribute name="ucd" type="ucdType"/>
<xs:attribute name="utype" type="xs:string"/>
</xs:complexType>
An approximate DTD corresponding to the (definitive) schema is
available from the VOTable web page
(http://www.ivoa.net/twiki/bin/view/IVOA/IvoaVOTable) - the GROUP
element is defined here as
<!-- GROUP can contain a description, fields/parameters and sub-groups --> <!ELEMENT GROUP (DESCRIPTION?, (FIELDref|PARAMref|PARAM|GROUP)*)> <!ATTLIST GROUP ID ID #IMPLIED name CDATA #IMPLIED ref IDREF #IMPLIED ucd CDATA #IMPLIED utype CDATA #IMPLIED
either way, you can see that FIELDs cannot appear within a GROUP. You must have got hold of a DTD from an early draft of VOTable 1.1 or something.
Mark
-- Mark Taylor Starlink Programmer Physics, Bristol University, UK m.b.taylor@bris.ac.uk +44-117-928-8776 http://www.star.bris.ac.uk/~mbt/Received on 2005-06-29Z11:33:25