Validating capabilities document

Mark Taylor m.b.taylor at bristol.ac.uk
Fri Mar 8 03:24:13 PST 2013


On Fri, 8 Mar 2013, Markus Demleitner wrote:

> 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.

that's what I kind of thought.

> 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.

Thanks Markus, yes, I suppose that is the Right Thing to do,
ideally with local copies of the schemas.

Nauseam is right - I'm going to leave it until I have leisure to
navigate the big nest of schema dependencies to see what's required
and also work out how to force the java generic validation machinery
to pay attention to them.  Until then, I think I'll leave that
(fairly minor) bit of XSD validation non-working in taplint by default.

If the VOSICapabilities XSD gets (re-?)instated at www.ivoa.net/xml
I'll have another go with that.

Mark

--
Mark Taylor   Astronomical Programmer   Physics, Bristol University, UK
m.b.taylor at bris.ac.uk +44-117-9288776  http://www.star.bris.ac.uk/~mbt/


More information about the grid mailing list