Referencing in XML for the IVO
Arnold Rots
arots at head.cfa.harvard.edu
Tue Nov 29 09:22:17 PST 2005
While reworking the STC XML schemata, I had fairly extensive
discussions on the general topic of referencing within the VO.
The main contributors were Ed Shaya and Gerard Lemson.
I want to let you know in which direction this is all going.
Gerard emphasized the need for a general referencing mechanism to
allow a document to refer to anything from a fragment of XML to an
image to a publication to any snippet of information.
Ed made the case for Xlink: it allows inserting such references but
leaves it up to the client what action to take.
That is attractive for STC since it allows, for instance in
referencing coordinate systems, on the server side, to put multiple
definitions in a single library document and, on the client side, the
choice of either retrieving the XML describing the coordinate system
or interpreting the given URI in order to decide what action to take
(if any). It appears a very attractive alternative to XInclude.
In the process of revising the STC schemata I am now deriving the most
crucial types from a base type:
<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.
The optional id attribute allows the element to be referenced within
its own document through an IDREF.
What this all means is that any of the important elements may either
be specified by an Xlink to another or the same document, or by an
IDREF, or by its actual contents.
IDREF will supersede Xlink and content will supersede both Xlink and
IDREF. The href is a URI and may be a standard IVOA identifier or
an actual URL.
I believe type=simple will suffice for our purposes, though other
values may turn out to be useful in other contexts.
The namespace is:
xmlns:xlink="http://www.w3.org/1999/xlink"
and the xlink schema that I use is the one found on p. 174 of Eric van
der Vlist's "XML Schema".
Cheers,
- Arnold
--------------------------------------------------------------------------
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