Referencing in XML for the IVO

Arnold Rots arots at head.cfa.harvard.edu
Wed Nov 30 07:06:10 PST 2005


Ed Shaya was arguing that validation should be implemented as an
option, through a stylesheet that substitutes all references against a
version of the schema that has the reference options removed.

  - Arnold

Patrick Dowler wrote:
[ Charset ISO-8859-1 unsupported, converting... ]
> 
> 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.)
> 
--------------------------------------------------------------------------
Arnold H. Rots                                Chandra X-ray Science Center
Smithsonian Astrophysical Observatory                tel:  +1 617 496 7701
60 Garden Street, MS 67                              fax:  +1 617 495 7356
Cambridge, MA 02138                             arots at head.cfa.harvard.edu
USA                                     http://hea-www.harvard.edu/~arots/
--------------------------------------------------------------------------



More information about the dm mailing list