TAP Examples - DALI

A /examples endpoint is an RDFa document. Basically, it is an XHTML document whose some nodes have specific attributes. These attributes aim to help client automatic processing. Thus, clients like TOPCAT are able to retrieve the list of examples that a TAP service provides (see TOPCAT documentation for a more specific illustration).

DALI syntax

UML diagram of the structure expected by DALI.

(see DALI IVOA Recommendation document for more details)

Example

Here is a simple example of a such examples list. This list is actually included hidden in this XHTML page ; so, if a client like TOPCAT can read this document and extract this example.

<div vocab="ivo://ivoa.net/std/DALI-examples">
	<div id="Example1" resource="#Example1" typeof="example">
		<h3 property="name">List all tables</h3>
		<p property="capability">ivo://ivoa.net/std/TAP/v1.0</p>
		<span property="table">TAP_SCHEMA.tables</span>
		<div property="generic-parameter" typeof="keyval">
			<span property="key">QUERY</span>
			<pre property="value">SELECT *
FROM TAP_SCHEMA.tables
WHERE schema_name <> 'TAP_SCHEMA'</pre>
		</div>
		<div property="generic-parameter" typeof="keyval">
			<span property="key">REQUEST</span>
			<span property="value">doQuery</span>
		</div>
		<div property="generic-parameter" typeof="keyval">
			<span property="key">LANG</span>
			<span property="value">ADQL</span>
		</div>
	</div>
</div>

Note that you can set the vocab attribute to any XHTML node that can have children, including body.

You should also note that since the ADQL query is written in an XHTML document, any < and > should be encoded as the XML entities: &lt; and &gt;.

List all tables

ivo://ivoa.net/std/TAP/v1.0

TAP_SCHEMA.tables
QUERY
SELECT *
FROM TAP_SCHEMA.tables
WHERE schema_name <> 'TAP_SCHEMA'
REQUEST doQuery
LANG ADQL