Validating capabilities document

Markus Demleitner msdemlei at ari.uni-heidelberg.de
Fri Mar 8 02:51:31 PST 2013


Hi all,

On Fri, Mar 08, 2013 at 10:25:35AM +0000, Mark Taylor wrote:
> against the appropriate schema.  But I don't know how to get a
> suitable XSD document.  I tried looking at
> 
>    http://www.ivoa.net/xml/VOSICapabilities/v1.0
> 
> since it's the target namespace and in most cases for IVOA schemas
> the XSD can be found there.  However that's a 404.
Ah -- that should be fixed.  The IVOA promised (somewhere) to keep the
namespace URLs resolvable to the XML schema definitions unless I'm
gravely mistaken.

>    Validating http://dc.g-vo.org/tap/capabilities against file:/data/andromeda1/starjava/source/ttools/build/classes/uk/ac/starlink/ttools/taplint/VOSICapabilities-v1.0.xsd
>    cvc-elt.4.2: Cannot resolve 'tr:TableAccess' to a type definition for element 'capability'.
[...]
> any ideas?

Well, if your validator evaluated schemaLocation, this would have
worked.  I'm pointing to copies of the schema files on docs.g-vo.org
in the schemaLocation, though.

For a validator, I give you that relying on the schemaLocation in the
document isn't good (I don't think VOSI requires people to give it,
and of course they might cheat and give you their own mogrifications
of the schema documents).  You can, however, usually force the
parsers to use your own schemaLocation; for Xerces, I'm using
something like

parser.setProperty(
  "http://apache.org/xml/properties/schema/external-schemaLocation", 
  "http://www.ivoa.net/xml/VOSICapabilities/v1.0"
  " http://docs.g-vo.org/schemata/VOSICapabilities-v1.0.xsd"
  <and so on and so forth ad nauseam>)

Admittedly, it's a bit clunky, in particular if you'd like to be
independent of ivoa.net, but it should still work.

Cheers,

        Markus




More information about the grid mailing list