Referencing in XML for the IVO

Patrick Dowler patrick.dowler at nrc-cnrc.gc.ca
Tue Nov 29 11:53:03 PST 2005


With respect to the following, is there a way to say that at least one
of the attributes must be present? Otherwise, a validating XML 
parser cannot fully validate the document and client code has to
check for null all over the place. The presence of required elements
and attributes is really the most vanilla for of validity checking, and
we are going to give that up if everything is nillable :-(

I realise that even then, use of xlink makes it impossible for the
parser to fully validate... but it would be nice to know (from successfully
parsing) that the document appears to be valid (assuming external 
references via xlink are to the correct kind of thing).

I think it is a nice idea to have something the client can treat as
symbolic, but I'm not sure if I'd give up basic validation to get it.

Pat

On 29.11.2005 09:22, Arnold Rots wrote:
>   <xs:complexType name="stcBaseType" abstract="true">
>     <xs:annotation>
>       <xs:documentation>STC standard base type.
>          Elements of derived types may contain real content,
>          be a reference to another element in the document (idref),
>          or be a reference to a distributed resource;
>          the href is to be a standard IVOA identifier or a valid URL.
>          Actuation is up to the client.
>          At this time it is required to be of type simple.
>          An id is optional; it allows referencing by other elements.
>       </xs:documentation>
>     </xs:annotation>
>     <xs:attribute name="id" type="xs:ID" use="optional"/>
>     <xs:attribute name="idref" type="xs:IDREF" use="optional"/>
>     <xs:attribute ref="xlink:type" use="optional" fixed="simple"/>
>     <xs:attribute ref="xlink:href" use="optional"/>
>   </xs:complexType>
> 
> and allow the elements to be nillable.

-- 
Patrick Dowler
Tel/Tél: (250) 363-6914                  | fax/télécopieur: (250) 363-0045
Canadian Astronomy Data Centre   | Centre canadien de donnees astronomiques
National Research Council Canada | Conseil national de recherches Canada
Government of Canada                  | Gouvernement du Canada
5071 West Saanich Road               | 5071, chemin West Saanich
Victoria, BC                                  | Victoria (C.-B.)



More information about the dm mailing list