Skip to content

Commit

Permalink
ttools: provide taplint with VOSITables schema
Browse files Browse the repository at this point in the history
taplint was generating the following warning when validating the
/tables endpoint for some services:

   W-TMV-UNSC-1 Schema from unknown namespace during validation: http://www.ivoa.net/xml/VOSITables/v1.0

I'm not sure why I hadn't noticed this before, or why I hadn't included
the VOSITables schema in taplint's hardwired schema collection before.
Anyway, I have now, so this warning will go away.

NOTE, as pointed out to me by Gregory Mantelet, and earlier
(July 2014) noted by Markus Demleitner on the grid@ivoa.net list,
there appears to be an error in the copy of that schema currently
(29 Oct 2014) hosted at the canonical location
(http://www.ivoa.net/xml/VOSITables/v1.0) - it's got its namespaces
in a twist.  Maybe that's the reason I didn't include it before.

Therefore the VOSITables-v1.0.xsd schema included in this commit
has been copied'n'pasted from the VOSI 1.0 REC standard text
(Appendix A.3), with some whitespace formatting errors and
annoyances adjusted.
  • Loading branch information
mbtaylor authored and mmpcn committed Nov 27, 2014
1 parent 1b82c22 commit 59e1884
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ttools/src/docs/sun256.xml
Expand Up @@ -9870,6 +9870,8 @@ eds. C. Gabriel et al., ASP Conf. Ser. 351, p. 666 (2006)
<li>Add (experimental) read-only support for Gaia/DPAC GBIN format.</li>
<li>Fix <code>taplint</code> to permit application/xml
not just text/xml content-type where appropriate (UWS stage).</li>
<li>Fix <code>taplint</code> so it doesn't warn (W-TMV-UNSC) about
unknown VOSITables schema.</li>
</ul>
</p></dd>

Expand Down
Expand Up @@ -36,6 +36,7 @@ public class IvoaSchemaResolver implements LSResourceResolver {
/** Namespace URI for VOSI availability schema. */
public static final String AVAILABILITY_URI;

private static final String TABLES_URI;
private static final String VORESOURCE_URI;
private static final String TAPREGEXT_URI;
private static final String STC_URI;
Expand All @@ -56,6 +57,9 @@ public class IvoaSchemaResolver implements LSResourceResolver {
map.put( AVAILABILITY_URI =
"http://www.ivoa.net/xml/VOSIAvailability/v1.0",
base.getResource( "VOSIAvailability-v1.0.xsd" ) );
map.put( TABLES_URI =
"http://www.ivoa.net/xml/VOSITables/v1.0",
base.getResource( "VOSITables-v1.0.xsd" ) );
map.put( VORESOURCE_URI =
"http://www.ivoa.net/xml/VOResource/v1.0",
base.getResource( "VOResource-v1.0.xsd" ) );
Expand Down
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.ivoa.net/xml/VOSITables/v1.0"
xmlns:tns="http://www.ivoa.net/xml/VOSITables/v1.0"
xmlns:vr="http://www.ivoa.net/xml/VOResource/v1.0"
xmlns:vs="http://www.ivoa.net/xml/VODataService/v1.1"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="1.0">

<xsd:annotation>
<xsd:documentation>
A schema for formatting table metadata as returned by a
tables resource, defined by the IVOA Support Interfaces
specification (VOSI).
See http://www.ivoa.net/Documents/latest/VOSI.html.
</xsd:documentation>
</xsd:annotation>

<xsd:import namespace="http://www.ivoa.net/xml/VODataService/v1.1"
schemaLocation="http://www.ivoa.net/xml/VODataService/v1.1" />

<!--
- the root element for a VOSI table metadata (section 3.4)
-->
<xsd:element name="tableset" type="vs:TableSet" >
<xsd:annotation>
<xsd:documentation>
A description of the table metadata supported by the
service associated with a VOSI-enabled resource.
</xsd:documentation>
</xsd:annotation>
</xsd:element>

</xsd:schema>

0 comments on commit 59e1884

Please sign in to comment.